IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 19, 2010, 2:30:36 PM (16 years ago)
Author:
Paul Price
Message:

Recipe value GAIN.OVERRIDE specifies whether the gain should be set to unity in the event it is non-finite in ppImage and ppMerge. This seems to be a problem for GPC1, where some gains are not set because they haven't been measured. GAIN.OVERRIDE is turned on for ppImage on GPC1, and off for everything else.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImageDetrendReadout.c

    r25930 r26629  
    8989            psFree (binning);
    9090        }
     91
     92        // Check that the gain is set
     93        float gain = psMetadataLookupF32(NULL, input->parent->concepts, "CELL.GAIN"); // Gain for cell
     94        if (!isfinite(gain)) {
     95            psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, RECIPE_NAME); // Recipe
     96            psAssert(recipe, "Should be there!");
     97            bool override = psMetadataLookupBool(NULL, recipe, "GAIN.OVERRIDE"); // Override the bad gain?
     98            if (override) {
     99                psWarning("CELL.GAIN is not set for readout (%d,%d,%d) --- setting to unity.",
     100                          view->chip, view->cell, view->readout);
     101                psMetadataItem *item = psMetadataLookup(input->parent->concepts, "CELL.GAIN"); // Gain item
     102                psAssert(item, "Should be there!");
     103                item->data.F32 = 1.0;
     104            } else {
     105                psError(PS_ERR_BAD_PARAMETER_VALUE, false, "CELL.GAIN is not set for readout (%d,%d,%d)",
     106                        view->chip, view->cell, view->readout);
     107                return false;
     108            }
     109        }
     110
    91111        pmReadoutGenerateVariance(input, noiseImage, true);
    92112        psFree (noiseImage);
Note: See TracChangeset for help on using the changeset viewer.