IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 28, 2005, 2:27:22 PM (21 years ago)
Author:
Paul Price
Message:

Adding pmChipMosaic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/scripts/src/phase2/pmFPAConceptsGet.c

    r5564 r5621  
    344344          case PS_TYPE_S32:
    345345            value = item->data.S32;
     346            break;
     347          case PS_TYPE_F32:
     348            psLogMsg(__func__, PS_LOG_WARN, "Concept %s (%s) should be S32, but is F32 --- converting.\n",
     349                     name, comment);
     350            value = (int)item->data.F32;
     351            break;
     352          case PS_TYPE_F64:
     353            psLogMsg(__func__, PS_LOG_WARN, "Concept %s (%s) should be S32, but is F64 --- converting.\n",
     354                     name, comment);
     355            value = (int)item->data.F64;
    346356            break;
    347357          default:
     
    977987    }
    978988
     989    // These are new and experimental concepts: CELL.X0 and CELL.Y0
     990
     991    // CELL.X0
     992    p_pmFPAConceptGetS32(fpa, chip, cell, db, cell->concepts, "CELL.X0", "Position of (0,0) on the chip ");
     993    // CELL.Y0
     994    p_pmFPAConceptGetS32(fpa, chip, cell, db, cell->concepts, "CELL.Y0", "Position of (0,0) on the chip");
     995    // Add corrective
     996    {
     997        const psMetadata *camera = fpa->camera;
     998        bool mdok = false;              // Result of MD lookup
     999        psMetadata *formats = psMetadataLookupMD(&mdok, camera, "FORMATS");
     1000        if (mdok && formats) {
     1001            psString format = psMetadataLookupString(&mdok, formats, "CELL.X0");
     1002            if (mdok && strlen(format) > 0 && strcasecmp(format, "FORTRAN") == 0) {
     1003                psMetadataItem *cellx0 = psMetadataLookup(cell->concepts, "CELL.X0");
     1004                cellx0->data.S32 -= 1;
     1005            }
     1006            format = psMetadataLookupString(&mdok, formats, "CELL.Y0");
     1007            if (mdok && strlen(format) > 0 && strcasecmp(format, "FORTRAN") == 0) {
     1008                psMetadataItem *celly0 = psMetadataLookup(cell->concepts, "CELL.Y0");
     1009                celly0->data.S32 -= 1;
     1010            }
     1011        }
     1012    }
     1013
    9791014    // Pau.
    9801015}
Note: See TracChangeset for help on using the changeset viewer.