IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 30, 2011, 9:39:01 AM (15 years ago)
Author:
eugene
Message:

merging changes from trunk

Location:
branches/eam_branches/ipp-20110213/ppImage/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/ppImage/src

  • branches/eam_branches/ipp-20110213/ppImage/src/ppImageOptions.c

    r30680 r31086  
    126126        exit(EXIT_FAILURE);
    127127    }
    128 
     128    psMetadata *format = config->format;
     129   
    129130    // Non-linearity recipe options
    130131    if (psMetadataLookupBool(NULL, recipe, "NONLIN")) {
     
    237238    options->doFringe = psMetadataLookupBool(NULL, recipe, "FRINGE");
    238239    options->doShutter = psMetadataLookupBool(NULL, recipe, "SHUTTER");
     240
     241    // PATTERN.ROW is selected by the recipe.  If it is selected, we search for the table
     242    // PATTERN.ROW.SUBSET.  If this is found in our format file, we use that version;
     243    // otherwise, we use the table provided in the recipe file "ppImage.config".  Within that
     244    // table, we select the entry that matches our CHIP.NAME.  This will be either a boolean or
     245    // a string of bits.  If it is a boolean, it specified whether or not to correct the entire
     246    // chip; if it is a string, the bits specify which cells to correct (sequence is order of
     247    // CELLS in the format:CHIPS metadata table)
     248
     249    // We also check the chip header for the boolean 'PTRN_ROW' : if this is true, we have
     250    // already applied this correct to this data, so we simply skip the correction for this
     251    // chip.
     252
    239253    options->doPatternRow = psMetadataLookupBool(NULL, recipe, "PATTERN.ROW");
    240254    options->doPatternCell = psMetadataLookupBool(NULL, recipe, "PATTERN.CELL");
     255
    241256    options->doMaskStats = psMetadataLookupBool(NULL, recipe, "MASK.STATS");
    242257    options->addNoise = psMetadataLookupBool(NULL, recipe, "ADDNOISE");
     
    344359
    345360    // Pattern correction
    346     options->patternRowOrder = psMetadataLookupS32(NULL, recipe, "PATTERN.ROW.ORDER");
    347     options->patternRowIter = psMetadataLookupS32(NULL, recipe, "PATTERN.ROW.ITER");
    348     options->patternRowRej = psMetadataLookupF32(NULL, recipe, "PATTERN.ROW.REJ");
    349     options->patternRowThresh = psMetadataLookupF32(NULL, recipe, "PATTERN.ROW.THRESH");
    350     options->patternRowMean = psStatsOptionFromString(psMetadataLookupStr(NULL, recipe, "PATTERN.ROW.MEAN"));
    351     options->patternRowStdev = psStatsOptionFromString(psMetadataLookupStr(NULL, recipe, "PATTERN.ROW.STDEV"));
    352     options->patternCellBG = psStatsOptionFromString(psMetadataLookupStr(NULL, recipe, "PATTERN.CELL.BG"));
    353     options->patternCellMean = psStatsOptionFromString(psMetadataLookupStr(NULL, recipe, "PATTERN.CELL.MEAN"));
     361    if (psMetadataLookup(format, "PATTERN.ROW.ORDER")) {
     362      options->patternRowOrder = psMetadataLookupS32(NULL, format, "PATTERN.ROW.ORDER");
     363    }
     364    else {
     365      options->patternRowOrder = psMetadataLookupS32(NULL, recipe, "PATTERN.ROW.ORDER");
     366    }
     367    if (psMetadataLookup(format, "PATTERN.ROW.ITER")) {
     368      options->patternRowIter = psMetadataLookupS32(NULL, format, "PATTERN.ROW.ITER");
     369    }
     370    else {
     371      options->patternRowIter = psMetadataLookupS32(NULL, recipe, "PATTERN.ROW.ITER");
     372    }
     373    if (psMetadataLookup(format, "PATTERN.ROW.REJ")) {
     374      options->patternRowRej = psMetadataLookupF32(NULL, format, "PATTERN.ROW.REJ");
     375    }
     376    else {
     377      options->patternRowRej = psMetadataLookupF32(NULL, recipe, "PATTERN.ROW.REJ");
     378    }
     379    if (psMetadataLookup(format, "PATTERN.ROW.THRESH")) {
     380      options->patternRowThresh = psMetadataLookupF32(NULL, format, "PATTERN.ROW.THRESH");
     381    }
     382    else {
     383      options->patternRowThresh = psMetadataLookupF32(NULL, recipe, "PATTERN.ROW.THRESH");
     384    }
     385    if (psMetadataLookup(format, "PATTERN.ROW.MEAN")) {
     386      options->patternRowMean = psStatsOptionFromString(psMetadataLookupStr(NULL, format, "PATTERN.ROW.MEAN"));
     387    }
     388    else {
     389      options->patternRowMean = psStatsOptionFromString(psMetadataLookupStr(NULL, recipe, "PATTERN.ROW.MEAN"));
     390    }
     391    if (psMetadataLookup(format, "PATTERN.ROW.STDEV")) {
     392      options->patternRowStdev = psStatsOptionFromString(psMetadataLookupStr(NULL, format, "PATTERN.ROW.STDEV"));
     393    }
     394    else {
     395      options->patternRowStdev = psStatsOptionFromString(psMetadataLookupStr(NULL, recipe, "PATTERN.ROW.STDEV"));
     396    }
     397    if (psMetadataLookup(format, "PATTERN.CELL.BG")) {
     398      options->patternCellBG = psStatsOptionFromString(psMetadataLookupStr(NULL, format, "PATTERN.CELL.BG"));
     399    }
     400    else {
     401      options->patternCellBG = psStatsOptionFromString(psMetadataLookupStr(NULL, recipe, "PATTERN.CELL.BG"));
     402    }
     403    if (psMetadataLookup(format, "PATTERN.CELL.MEAN")) {
     404      options->patternCellMean = psStatsOptionFromString(psMetadataLookupStr(NULL, format, "PATTERN.CELL.MEAN"));
     405    }
     406    else {
     407      options->patternCellMean = psStatsOptionFromString(psMetadataLookupStr(NULL, recipe, "PATTERN.CELL.MEAN"));
     408    }
     409
    354410
    355411    // Remnance options
Note: See TracChangeset for help on using the changeset viewer.