Changeset 16870
- Timestamp:
- Mar 7, 2008, 9:31:00 AM (18 years ago)
- Location:
- trunk/ppImage/src
- Files:
-
- 2 edited
-
ppImageDetrendReadout.c (modified) (3 diffs)
-
ppImageParseCamera.c (modified) (1 diff)
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."); -
trunk/ppImage/src/ppImageParseCamera.c
r16844 r16870 431 431 } 432 432 433 // Change the input dark type between the old (IMAGE) and new (multi-DARK). 434 // Hopefully this is a temporary change until we all move over to using the new dark types 435 bool mdok; // Status of MD lookup 436 if (options->doDark && psMetadataLookupBool(&mdok, recipe, "OLDDARK")) { 437 pmFPAfile *dark = psMetadataLookupPtr(NULL, config->files, "PPIMAGE.DARK"); 438 assert(dark); 439 dark->type = PM_FPA_FILE_IMAGE; 440 } 441 433 442 return (options); 434 443 }
Note:
See TracChangeset
for help on using the changeset viewer.
