Changeset 6817 for trunk/ppImage/src/ppImageParseDetrend.c
- Timestamp:
- Apr 7, 2006, 5:57:23 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageParseDetrend.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageParseDetrend.c
r6747 r6817 1 #include <stdio.h>2 #include "pslib.h"3 #include "psmodules.h"4 #include "ppFile.h"5 #include "ppImageData.h"6 #include "ppImageOptions.h"7 1 #include "ppImage.h" 8 2 9 // open all needed detrend files 10 // read in primary headers 11 // validate camera for each detrend image 3 // identify all needed detrend and other I/O files 4 // create the pmFPAfiles for the active I/O files 12 5 13 // XXX : keep the primary headers in data? 14 // XXX : add fringe frame 6 bool ppImageParseDetrend(ppImageOptions *options, pmConfig *config) 7 { 15 8 16 bool ppImageParseDetrend(ppImageData *data, ppImageOptions *options, pmConfig *config) 17 { 18 ppFileOpen(data->mask, "mask", options->doMask); 19 ppFileOpen(data->bias, "bias", options->doBias); 20 ppFileOpen(data->dark, "dark", options->doDark); 21 ppFileOpen(data->flat, "flat", options->doFlat); 9 bool status; 10 11 // some of the output files are associated with the input fpa 12 pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "PPIMAGE.INPUT"); 13 14 // the following are defined from the argument list, if given, 15 // otherwise they revert to the config information 16 17 if (options->doBias) { 18 bool status = false; 19 pmFPAfileFromArgs (&status, config, "PPIMAGE.BIAS", "BIAS"); 20 pmFPAfileFromConf (&status, config, "PPIMAGE.BIAS", input->fpa); 21 if (!status) psAbort ("ppImageParseDetrend", "can't find a bias image source"); 22 } 23 24 if (options->doDark) { 25 bool status = false; 26 pmFPAfileFromArgs (&status, config, "PPIMAGE.DARK", "DARK"); 27 pmFPAfileFromConf (&status, config, "PPIMAGE.DARK", input->fpa); 28 if (!status) psAbort ("ppImageParseDetrend", "can't find a dark image source"); 29 } 30 31 if (options->doMask) { 32 bool status = false; 33 pmFPAfileFromArgs (&status, config, "PPIMAGE.MASK", "MASK"); 34 pmFPAfileFromConf (&status, config, "PPIMAGE.MASK", input->fpa); 35 if (!status) psAbort ("ppImageParseDetrend", "can't find a mask image source"); 36 } 37 38 if (options->doFlat) { 39 bool status = false; 40 pmFPAfileFromArgs (&status, config, "PPIMAGE.FLAT", "FLAT"); 41 pmFPAfileFromConf (&status, config, "PPIMAGE.FLAT", input->fpa); 42 if (!status) psAbort ("ppImageParseDetrend", "can't find a flat image source"); 43 } 44 45 // the following files are output targets 46 // XXX which of these are required? 47 pmFPAfileDefine (config->files, config->camera, input->fpa, "PPIMAGE.OUTPUT"); 48 49 // XXX do these need to construct a new fpa? 50 // pmFPAfileDefine (config->files, config->camera, input->input, "PPIMAGE.BIN1"); 51 // pmFPAfileDefine (config->files, config->camera, input->input, "PPIMAGE.BIN2"); 52 // pmFPAfileDefine (config->files, config->camera, input->input, "PPIMAGE.JPG1"); 53 // pmFPAfileDefine (config->files, config->camera, input->input, "PPIMAGE.JPG2"); 54 55 // ppImage is supplied with an output name, which may be used by multiple 56 // output files to construct the output names. supply this value to the 57 // files which are write types. 58 char *output = psMetadataLookupPtr(&status, config->arguments, "OUTPUT"); 59 pmFPAfileAddFileNames (config->files, "OUTPUT", output, PM_FPA_MODE_WRITE); 60 22 61 return true; 23 62 }
Note:
See TracChangeset
for help on using the changeset viewer.
