IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 5, 2008, 4:08:29 PM (18 years ago)
Author:
Paul Price
Message:

Mask value isn't available until images have been read in.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeScaleZero.c

    r18756 r18930  
    1212    psStatsOptions stdevStat = psMetadataLookupS32(NULL, config->arguments, "STDEV"); // Statistic for stdev
    1313    int shutterSize = psMetadataLookupS32(NULL, config->arguments, "SHUTTER.SIZE"); // Size of shutter region
    14 
    15     psMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
    1614
    1715    psVector *gains = NULL;             // Gains for each cell
     
    8280                pmReadout *readout = cell->readouts->data[0]; // Readout of interest
    8381
     82                psMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
     83
    8484                switch (type) {
    8585                  case PPMERGE_TYPE_FLAT:
     
    8888                      float gain = psMetadataLookupF32(NULL, cell->concepts, "CELL.GAIN"); // Cell gain
    8989                      if (!isfinite(gain)) {
    90                         // psError(PS_ERR_BAD_PARAMETER_VALUE, false,
    91                         // "CELL.GAIN for file %d chip %d cell %d is not set.",
    92                         // i, view->chip, view->cell);
    93                         // goto ERROR;
    94                         psWarning ("CELL.GAIN for file %d chip %d cell %d is NaN", i, view->chip, view->cell);
     90                        // psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     91                        // "CELL.GAIN for file %d chip %d cell %d is not set.",
     92                        // i, view->chip, view->cell);
     93                        // goto ERROR;
     94                        psWarning ("CELL.GAIN for file %d chip %d cell %d is NaN", i, view->chip, view->cell);
    9595                      }
    9696                      gains->data.F32[cellNum] = gain;
     
    9898                      // Measure the background
    9999                      if (!psImageBackground(stats, NULL, readout->image, readout->mask, maskVal, rng)) {
    100                         // psError(PS_ERR_UNKNOWN, false,
    101                         // "Unable to get statistics for file %d chip %d cell %d",
    102                         // i, view->chip, view->cell);
    103                         // goto ERROR;
    104                         psWarning ("Unable to get statistics for file %d chip %d cell %d", i, view->chip, view->cell);
    105                         background->data.F32[i][cellNum] = NAN;
     100                        // psError(PS_ERR_UNKNOWN, false,
     101                        // "Unable to get statistics for file %d chip %d cell %d",
     102                        // i, view->chip, view->cell);
     103                        // goto ERROR;
     104                        psWarning ("Unable to get statistics for file %d chip %d cell %d", i, view->chip, view->cell);
     105                        background->data.F32[i][cellNum] = NAN;
    106106                      } else {
    107                         background->data.F32[i][cellNum] = psStatsGetValue(stats, meanStat);
    108                       }
     107                        background->data.F32[i][cellNum] = psStatsGetValue(stats, meanStat);
     108                      }
    109109                      break;
    110110                  }
Note: See TracChangeset for help on using the changeset viewer.