Changeset 11862 for trunk/dvoTools
- Timestamp:
- Feb 16, 2007, 1:46:31 PM (19 years ago)
- Location:
- trunk/dvoTools/src
- Files:
-
- 1 added
- 5 edited
-
Makefile.am (modified) (1 diff)
-
dvoApplyCorr.h (modified) (1 diff)
-
dvoApplyCorrArguments.c (modified) (3 diffs)
-
dvoApplyCorrLoop.c (modified) (2 diffs)
-
dvoApplyCorrParseCamera.c (modified) (2 diffs)
-
dvoApplyCorrReadout.c (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dvoTools/src/Makefile.am
r11804 r11862 24 24 dvoApplyCorrParseCamera.c \ 25 25 dvoApplyCorrLoop.c \ 26 dvoApplyCorrReadout.c \ 26 27 dvoApplyCorrCleanup.c \ 27 28 dvoApplyCorrOptions.c \ -
trunk/dvoTools/src/dvoApplyCorr.h
r11804 r11862 31 31 bool dvoApplyCorrLoop(pmConfig *config, dvoApplyCorrOptions *options); 32 32 33 // apply the correction factor pixel-by-pixel 34 bool dvoApplyCorrReadout (pmConfig *config, pmFPAview *view, char *inName, char *corrName); 35 33 36 // free memory, check for leaks 34 37 void dvoApplyCorrCleanup (pmConfig *config, dvoApplyCorrOptions *options); -
trunk/dvoTools/src/dvoApplyCorrArguments.c
r11804 r11862 6 6 7 7 static void usage (void) { 8 fprintf(stderr, "USAGE: dvoApplyCorr MOSAIC.fits OUTPUT\n\n");8 fprintf(stderr, "USAGE: dvoApplyCorr -file INPUT.fits OUTPUT\n\n"); 9 9 exit (2); 10 10 } … … 50 50 } 51 51 52 if (argc != 2) usage ();53 54 52 // the input file is a required argument; if not found, we will exit 55 53 bool status = pmConfigFileSetsMD (config->arguments, config, "INPUT", "-file", "-list"); … … 58 56 } 59 57 58 pmConfigFileSetsMD (config->arguments, config, "CORR", "-corr", "-corrlist"); 59 60 if (argc != 2) usage (); 61 60 62 // Add the output image (which remain on the command-line) to the arguments list 61 63 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "Name of the output image", argv[1]); -
trunk/dvoTools/src/dvoApplyCorrLoop.c
r11804 r11862 14 14 // psMetadata *recipe = psMetadataLookupMetadata(&status, config->recipes, RECIPE_NAME); 15 15 16 pmFPAfile *input = psMetadataLookupPtr(&status, config->files, "DVO CORR.INPUT");16 pmFPAfile *input = psMetadataLookupPtr(&status, config->files, "DVOFLAT.INPUT"); 17 17 if (!status) { 18 18 psErrorStackPrint(stderr, "Can't find input data!\n"); … … 58 58 if (!readout->data_exists) continue; 59 59 60 // XXX put the function here which unbins the input image 60 // XXX put the function here which multiplies the input image and the correction image 61 dvoApplyCorrReadout (config, view, "DVOFLAT.INPUT", "DVOFLAT.CORR"); 61 62 62 63 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) { -
trunk/dvoTools/src/dvoApplyCorrParseCamera.c
r11804 r11862 10 10 11 11 // the input image defines the camera, and all recipes and options the follow 12 // XXX we need to change this: mosaic.fits is not in pmFPA format?? 13 // - determine the camera from the header keywords 14 pmFPAfile *input = pmFPAfileDefineFromArgs (&status, config, "DVOCORR.INPUT", "INPUT"); 15 if (!status || !input) { 16 psError(PS_ERR_IO, false, "Failed to build FPA from DVOCORR.INPUT"); 12 pmFPAfile *input = pmFPAfileDefineFromArgs (NULL, config, "DVOFLAT.INPUT", "INPUT"); 13 if (!input) { 14 psError(PS_ERR_IO, false, "Failed to build FPA from DVOFLAT.INPUT"); 17 15 return NULL; 18 16 } … … 25 23 26 24 // the following files are output targets 27 pmFPAfile *output = pmFPAfileDefineOutput(config, input->fpa, "DVO CORR.OUTPUT");25 pmFPAfile *output = pmFPAfileDefineOutput(config, input->fpa, "DVOFLAT.OUTPUT"); 28 26 if (!output) { 29 psError(PS_ERR_IO, false, _("Unable to generate output file from DVO CORR.OUTPUT"));27 psError(PS_ERR_IO, false, _("Unable to generate output file from DVOFLAT.OUTPUT")); 30 28 psFree(options); 31 29 return NULL; 32 30 } 33 31 32 // find the flat-field correction image (from command-line, config file, or detrend db) 33 status = false; 34 pmFPAfileDefineFromArgs (&status, config, "DVOFLAT.CORR", "CORR"); 35 psErrorClear(); 36 pmFPAfileDefineFromConf (&status, config, "DVOFLAT.CORR"); 37 psErrorClear(); 38 pmFPAfileDefineFromDetDB (&status, config, "DVOFLAT.CORR", input->fpa, PM_DETREND_TYPE_FLAT_CORRECTION); 39 if (!status) { 40 psError (PS_ERR_IO, false, "can't find a flat-field correction image source"); 41 return NULL; 42 } 43 34 44 // Chip selection: turn on only the chips specified (pass status to suppress missing-key log msg) 45 status = false; 35 46 char *chipLine = psMetadataLookupStr(&status, config->arguments, "CHIP_SELECTIONS"); 36 47 psArray *chips = psStringSplitArray (chipLine, ",", false);
Note:
See TracChangeset
for help on using the changeset viewer.
