Changeset 16844
- Timestamp:
- Mar 6, 2008, 10:51:20 AM (18 years ago)
- Location:
- trunk/ppImage/src
- Files:
-
- 3 edited
-
ppImageArguments.c (modified) (2 diffs)
-
ppImageDetrendReadout.c (modified) (3 diffs)
-
ppImageParseCamera.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageArguments.c
r14000 r16844 10 10 fprintf(stderr, "\t-stats STATS.mdc: Output statistics into STATS.mdc\n"); 11 11 fprintf(stderr, "\t-isfringe: The input image contains fringe data.\n"); 12 fprintf(stderr, "\t-isdark: The input image contains dark data.\n"); 12 13 fprintf(stderr, "\t-usemask MASKVAL: Use this mask value (override recipe).\n"); 13 14 fprintf(stderr, "\t-chip CHIPNUM: Only process this chip number.\n"); … … 71 72 "Input is fringe image", true); 72 73 } 74 if ((argnum = psArgumentGet(argc, argv, "-isdark"))) { 75 psArgumentRemove(argnum, &argc, argv); 76 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "INPUT_IS_DARK", PS_META_REPLACE, 77 "Input is dark image", true); 78 } 73 79 74 80 // the following options override the PPIMAGE recipe options -
trunk/ppImage/src/ppImageDetrendReadout.c
r16084 r16844 32 32 # endif 33 33 34 // set up the readouts fordark and bias35 pm Readout*dark = NULL;34 // set up the dark and bias 35 pmCell *dark = NULL; 36 36 pmReadout *bias = NULL; 37 37 if (options->doBias) { … … 39 39 } 40 40 if (options->doDark) { 41 dark = pmFPAfileThis Readout(config->files, detview, "PPIMAGE.DARK");41 dark = pmFPAfileThisCell(config->files, detview, "PPIMAGE.DARK"); 42 42 } 43 43 44 44 // Bias, dark and overscan subtraction are all merged. 45 if (options->doBias || options->do Dark || options->doOverscan) {46 if (!pmBiasSubtract(input, options->overscan, bias, dark, view)) {47 psError(PS_ERR_UNKNOWN, false, "Unable to subtract bias. \n");45 if (options->doBias || options->doOverscan) { 46 if (!pmBiasSubtract(input, options->overscan, bias, NULL, view)) { 47 psError(PS_ERR_UNKNOWN, false, "Unable to subtract bias."); 48 48 return false; 49 49 } … … 54 54 // create the target mask and weight images 55 55 pmReadoutGenerateWeight(input, true); 56 } 57 58 if (options->doDark) { 59 if (!pmDarkApply(input, dark, options->maskValue)) { 60 psError(PS_ERR_UNKNOWN, false, "Unable to subtract dark."); 61 return false; 62 } 56 63 } 57 64 -
trunk/ppImage/src/ppImageParseCamera.c
r16357 r16844 59 59 } 60 60 if (options->doDark) { 61 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_ IMAGE, PM_DETREND_TYPE_DARK)) {61 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_DARK, PM_DETREND_TYPE_DARK)) { 62 62 psError (PS_ERR_IO, false, "Can't find a dark image source"); 63 63 psFree (options); … … 393 393 outImage->type = PM_FPA_FILE_FRINGE; 394 394 } 395 if (psMetadataLookupBool(NULL, config->arguments, "INPUT_IS_DARK")) { 396 // It's a dark file, so change the file type 397 input->type = PM_FPA_FILE_DARK; 398 outImage->type = PM_FPA_FILE_DARK; 399 } 395 400 396 401 // Turn off mask and weight output if we're not doing anything interesting
Note:
See TracChangeset
for help on using the changeset viewer.
