Changeset 42964 for trunk/ppImage/src/ppImageDetrendReadout.c
- Timestamp:
- Mar 9, 2026, 11:06:00 AM (2 months ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageDetrendReadout.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageDetrendReadout.c
r42890 r42964 24 24 pmReadout *input = pmFPAfileThisReadout(config->files, view, "PPIMAGE.INPUT"); 25 25 26 // Check that the gainis set (this is used by both pmReadoutGenerateMask and pmReadoutGenerateVariance)26 // Check that the GAIN is set (this is used by both pmReadoutGenerateMask and pmReadoutGenerateVariance) 27 27 { 28 float gain = psMetadataLookupF32(NULL, input->parent->concepts, "CELL.GAIN"); // Gain for cell 29 if (!isfinite(gain)) { 28 bool mdok = true; // Status of MD lookup 29 float gain = psMetadataLookupF32(&mdok, input->parent->concepts, "CELL.GAIN"); // Gain for cell 30 if (!mdok || !isfinite(gain)) { 30 31 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, RECIPE_NAME); // Recipe 31 32 psAssert(recipe, "Should be there!"); … … 44 45 } 45 46 } 46 // psLogMsg ("ppImage", 6, "check gain: %f sec\n", psTimerMark ("detrend.readout")); 47 48 // Check that the SATURATION is set (this is used by pmReadoutSetMask) 49 // NOTE: here we use the value of SATURATION.OVERRIDE as a signal : NAN means do not override 50 { 51 bool mdok = true; // Status of MD lookup 52 float saturation = psMetadataLookupF32(&mdok, input->parent->concepts, "CELL.SATURATION"); // Saturation for cell 53 if (!mdok || !isfinite(saturation)) { 54 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, RECIPE_NAME); // Recipe 55 psAssert(recipe, "Should be there!"); 56 float override = psMetadataLookupF32(NULL, recipe, "SATURATION.OVERRIDE"); // Override the bad saturation? 57 if (isfinite(override)) { 58 psMetadataItem *item = psMetadataLookup(input->parent->concepts, "CELL.SATURATION"); // Saturation item 59 psAssert(item, "Should be there!"); 60 item->data.F32 = override; 61 psWarning("CELL.SATURATION is not set for readout (%d,%d,%d) --- setting to %f.", view->chip, view->cell, view->readout, override); 62 } else { 63 psWarning("CELL.SATURATION is NAN for readout (%d,%d,%d), image will be masked.", view->chip, view->cell, view->readout); 64 } 65 } 66 } 47 67 48 68 // Check to see if we're in a chip that contains video
Note:
See TracChangeset
for help on using the changeset viewer.
