- Timestamp:
- May 3, 2010, 8:41:49 AM (16 years ago)
- Location:
- branches/tap_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppImage/src/ppImageDetrendReadout.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/tap_branches
- Property svn:mergeinfo changed
-
branches/tap_branches/ppImage/src/ppImageDetrendReadout.c
r25299 r27838 14 14 // find the currently selected readout 15 15 pmReadout *input = pmFPAfileThisReadout(config->files, view, "PPIMAGE.INPUT"); 16 17 // Check that the gain is set (this is used by both pmReadoutGenerateMask and pmReadoutGenerateVariance) 18 { 19 float gain = psMetadataLookupF32(NULL, input->parent->concepts, "CELL.GAIN"); // Gain for cell 20 if (!isfinite(gain)) { 21 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, RECIPE_NAME); // Recipe 22 psAssert(recipe, "Should be there!"); 23 bool override = psMetadataLookupBool(NULL, recipe, "GAIN.OVERRIDE"); // Override the bad gain? 24 if (override) { 25 psWarning("CELL.GAIN is not set for readout (%d,%d,%d) --- setting to unity.", view->chip, view->cell, view->readout); 26 psMetadataItem *item = psMetadataLookup(input->parent->concepts, "CELL.GAIN"); // Gain item 27 psAssert(item, "Should be there!"); 28 item->data.F32 = 1.0; 29 30 // for unity gain, there is no modification for the readnoise, note that it has (effectively) been updated 31 psMetadataRemoveKey(input->parent->concepts, "CELL.READNOISE.UPDATE"); 32 } else { 33 psWarning("CELL.GAIN is NAN for readout (%d,%d,%d), image will be masked.", view->chip, view->cell, view->readout); 34 } 35 } 36 } 16 37 17 38 // Masking on the basis of pixel value needs to be done before anything else, so the values are pristine. … … 89 110 psFree (binning); 90 111 } 112 91 113 pmReadoutGenerateVariance(input, noiseImage, true); 92 114 psFree (noiseImage); … … 128 150 } 129 151 130 // Pattern noise correction 131 if (options->doPattern) { 132 if (!pmPatternRow(input, options->patternOrder, options->patternIter, options->patternRej, 133 options->patternThresh, options->patternMean, options->patternStdev, 134 options->maskValue, options->darkMask)) { 135 psFree(detview); 136 return false; 137 } 138 } 152 /* // Pattern noise correction */ 153 /* if (options->doPattern) { */ 154 /* if (!pmPatternRow(input, options->patternOrder, options->patternIter, options->patternRej, */ 155 /* options->patternThresh, options->patternMean, options->patternStdev, */ 156 /* options->maskValue, options->darkMask)) { */ 157 /* psFree(detview); */ 158 /* return false; */ 159 /* } */ 160 /* } */ 139 161 140 162 // Normalization by a single (known) constant
Note:
See TracChangeset
for help on using the changeset viewer.
