Changeset 16870 for trunk/ppImage/src/ppImageDetrendReadout.c
- Timestamp:
- Mar 7, 2008, 9:31:00 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageDetrendReadout.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageDetrendReadout.c
r16844 r16870 33 33 34 34 // set up the dark and bias 35 pmCell *dark = NULL; 35 pmCell *dark = NULL; // Multi-dark 36 pmReadout *oldDark = NULL; // Old-fashioned dark 36 37 pmReadout *bias = NULL; 37 38 if (options->doBias) { … … 39 40 } 40 41 if (options->doDark) { 41 dark = pmFPAfileThisCell(config->files, detview, "PPIMAGE.DARK"); 42 bool mdok; // Status of MD lookup 43 psMetadata *recipe = psMetadataLookupPtr (&mdok, config->recipes, RECIPE_NAME); 44 assert(mdok && recipe); 45 if (psMetadataLookupBool(&mdok, recipe, "OLDDARK")) { 46 oldDark = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.DARK"); 47 } else { 48 dark = pmFPAfileThisCell(config->files, detview, "PPIMAGE.DARK"); 49 } 42 50 } 43 51 44 52 // Bias, dark and overscan subtraction are all merged. 45 53 if (options->doBias || options->doOverscan) { 46 if (!pmBiasSubtract(input, options->overscan, bias, NULL, view)) {54 if (!pmBiasSubtract(input, options->overscan, bias, oldDark, view)) { 47 55 psError(PS_ERR_UNKNOWN, false, "Unable to subtract bias."); 48 56 return false; … … 56 64 } 57 65 58 if (options->doDark ) {66 if (options->doDark && dark) { 59 67 if (!pmDarkApply(input, dark, options->maskValue)) { 60 68 psError(PS_ERR_UNKNOWN, false, "Unable to subtract dark.");
Note:
See TracChangeset
for help on using the changeset viewer.
