IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26864


Ignore:
Timestamp:
Feb 10, 2010, 4:04:02 PM (16 years ago)
Author:
eugene
Message:

updates from trunk

Location:
branches/eam_branches/20091201/ppMerge/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/ppMerge/src/ppMergeArguments.c

    r24837 r26864  
    265265        !strcasecmp(typeStr, "FLAT_RAW") ||
    266266        !strcasecmp(typeStr, "SKYFLAT_RAW") ||
     267        !strcasecmp(typeStr, "SKYFLATTEST_RAW") ||
    267268        !strcasecmp(typeStr, "DOMEFLAT_RAW") ||
    268269        !strcasecmp(typeStr, "FLAT_PREMASK") ||
  • branches/eam_branches/20091201/ppMerge/src/ppMergeScaleZero.c

    r24909 r26864  
    6767        pmChip *chip;                   ///< Chip of interest
    6868        while ((chip = pmFPAviewNextChip(view, fpa, 1))) {
    69             if (!chip->process || !chip->file_exists) {
    70                 continue;
    71             }
     69            if (!chip->process || !chip->file_exists) {
     70                continue;
     71            }
    7272            if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
    7373                goto ERROR;
     
    7676            pmCell *cell;               ///< Cell of interest
    7777            while ((cell = pmFPAviewNextCell(view, fpa, 1))) {
    78                 if (!cell->process || !cell->file_exists) {
    79                     continue;
    80                 }
     78                if (!cell->process || !cell->file_exists) {
     79                    continue;
     80                }
    8181                if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
    8282                    goto ERROR;
     
    8787                }
    8888
    89                 // skip cells with video data
     89                // skip cells with video data
    9090                if (cell->readouts->n > 1) {
    91                     // psError(PS_ERR_BAD_PARAMETER_VALUE, true, "File %d chip %d cell %d contains more than one readout (%ld)", i, view->chip, view->cell, cell->readouts->n);
    92                     // goto ERROR;
    93                   psWarning("File %d chip %d cell %d contains more than one readout (%ld), skipping", i, view->chip, view->cell, cell->readouts->n);
    94                   continue;
     91                    // psError(PS_ERR_BAD_PARAMETER_VALUE, true, "File %d chip %d cell %d contains more than one readout (%ld)", i, view->chip, view->cell, cell->readouts->n);
     92                    // goto ERROR;
     93                  psWarning("File %d chip %d cell %d contains more than one readout (%ld), skipping",
     94                            i, view->chip, view->cell, cell->readouts->n);
     95                  continue;
    9596                }
    9697                pmReadout *readout = cell->readouts->data[0]; ///< Readout of interest
     
    104105                      float gain = psMetadataLookupF32(NULL, cell->concepts, "CELL.GAIN"); ///< Cell gain
    105106                      if (!isfinite(gain)) {
    106                         // psError(PS_ERR_BAD_PARAMETER_VALUE, false,
    107                         // "CELL.GAIN for file %d chip %d cell %d is not set.",
    108                         // i, view->chip, view->cell);
    109                         // goto ERROR;
    110                         psWarning ("CELL.GAIN for file %d chip %d cell %d is NaN", i, view->chip, view->cell);
     107                          psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes,
     108                                                                        PPMERGE_RECIPE); // Recipe
     109                          psAssert(recipe, "Should be there!");
     110                          bool override = psMetadataLookupBool(NULL, recipe,
     111                                                               "GAIN.OVERRIDE"); // Override the bad gain?
     112                          if (override) {
     113                              psWarning("CELL.GAIN is not set for readout (%d,%d,%d) on file %d "
     114                                        "--- setting to unity.",
     115                                        view->chip, view->cell, view->readout, i);
     116                              psMetadataItem *item = psMetadataLookup(cell->concepts, "CELL.GAIN"); // Item with gain
     117                              psAssert(item, "Should be there!");
     118                              item->data.F32 = 1.0;
     119                             
     120                              // for unity gain, there is no modification for the readnoise, note that it has (effectively) been updated
     121                              psMetadataRemoveKey(cell->concepts, "CELL.READNOISE.UPDATE");
     122                          } else {
     123                              // psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     124                              // "CELL.GAIN for file %d chip %d cell %d is not set.",
     125                              // i, view->chip, view->cell);
     126                              // goto ERROR;
     127                              psWarning("CELL.GAIN for file %d chip %d cell %d is NaN",
     128                                        i, view->chip, view->cell);
     129                          }
    111130                      }
    112131                      gains->data.F32[cellNum] = gain;
     
    118137                        // i, view->chip, view->cell);
    119138                        // goto ERROR;
    120                         psWarning ("Unable to get statistics for file %d chip %d cell %d", i, view->chip, view->cell);
     139                        psWarning ("Unable to get statistics for file %d chip %d cell %d",
     140                                   i, view->chip, view->cell);
    121141                        background->data.F32[i][cellNum] = NAN;
    122142                      } else {
Note: See TracChangeset for help on using the changeset viewer.