Changeset 14892
- Timestamp:
- Sep 19, 2007, 12:04:37 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotDefineFiles.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotDefineFiles.c
r14212 r14892 16 16 17 17 // the output sources are carried on the input->fpa structures 18 pmFPAfile *outsources = pmFPAfileDefineOutput (config, input->fpa, "PSPHOT.OUTPUT");18 pmFPAfile *outsources = pmFPAfileDefineOutputFromFile (config, input, "PSPHOT.OUTPUT"); 19 19 if (!outsources) { 20 20 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.OUTPUT"); … … 27 27 if (!psMetadataLookupBool (NULL, recipe, "SAVE.OUTPUT")) { 28 28 pmFPAfileActivate (config->files, false, "PSPHOT.OUTPUT"); 29 outsources->save = false;29 outsources->save = false; 30 30 } 31 31 32 32 // optionally save the residual image 33 33 if (psMetadataLookupBool(NULL, recipe, "SAVE.RESID")) { 34 pmFPAfile *output = pmFPAfileDefineOutput (config, input->fpa, "PSPHOT.RESID");35 if (!output) {34 pmFPAfile *output = pmFPAfileDefineOutputFromFile (config, input, "PSPHOT.RESID"); 35 if (!output) { 36 36 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.RESID"); 37 37 return false; 38 38 } 39 output->save = true;39 output->save = true; 40 40 } 41 41 // optionally save the background model (small FITS image) … … 43 43 int DX = psMetadataLookupS32 (&status, recipe, "BACKGROUND.XBIN"); 44 44 int DY = psMetadataLookupS32 (&status, recipe, "BACKGROUND.YBIN"); 45 pmFPAfile *output = pmFPAfileDefineFromF PA (config, input->fpa, DX, DY, "PSPHOT.BACKMDL");46 if (!output) {45 pmFPAfile *output = pmFPAfileDefineFromFile (config, input, DX, DY, "PSPHOT.BACKMDL"); 46 if (!output) { 47 47 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.BACKMDL"); 48 48 return false; 49 49 } 50 output->save = true;50 output->save = true; 51 51 } 52 52 // optionally save the background model's standard deviation (small FITS image) … … 54 54 int DX = psMetadataLookupS32 (&status, recipe, "BACKGROUND.XBIN"); 55 55 int DY = psMetadataLookupS32 (&status, recipe, "BACKGROUND.YBIN"); 56 pmFPAfile *output = pmFPAfileDefineFromF PA (config, input->fpa, DX, DY, "PSPHOT.BACKMDL.STDEV");57 if (!output) {56 pmFPAfile *output = pmFPAfileDefineFromFile (config, input, DX, DY, "PSPHOT.BACKMDL.STDEV"); 57 if (!output) { 58 58 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.BACKMDL.STDEV"); 59 59 return false; 60 60 } 61 output->save = true;61 output->save = true; 62 62 } 63 63 // optionally save the full background image 64 64 if (psMetadataLookupBool(NULL, recipe, "SAVE.BACKGND")) { 65 pmFPAfile *output = pmFPAfileDefineFromF PA (config, input->fpa, 1, 1, "PSPHOT.BACKGND");66 if (!output) {65 pmFPAfile *output = pmFPAfileDefineFromFile (config, input, 1, 1, "PSPHOT.BACKGND"); 66 if (!output) { 67 67 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.BACKGND"); 68 68 return false; 69 69 } 70 output->save = true;70 output->save = true; 71 71 } 72 72 // optionally save the background-subtracted image 73 73 if (psMetadataLookupBool(NULL, recipe, "SAVE.BACKSUB")) { 74 pmFPAfile *output = pmFPAfileDefineFromF PA (config, input->fpa, 1, 1, "PSPHOT.BACKSUB");75 if (!output) {74 pmFPAfile *output = pmFPAfileDefineFromFile (config, input, 1, 1, "PSPHOT.BACKSUB"); 75 if (!output) { 76 76 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT."); 77 77 return false; 78 78 } 79 output->save = true;79 output->save = true; 80 80 } 81 81 // optionally save the PSF Model 82 82 if (psMetadataLookupBool(NULL, recipe, "SAVE.PSF")) { 83 pmFPAfile *output = pmFPAfileDefineOutput (config, input->fpa, "PSPHOT.PSF.SAVE");84 if (!output) {83 pmFPAfile *output = pmFPAfileDefineOutputFromFile (config, input, "PSPHOT.PSF.SAVE"); 84 if (!output) { 85 85 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.PSF.SAVE"); 86 86 return false; 87 87 } 88 output->save = true;88 output->save = true; 89 89 } 90 90 … … 92 92 // allow specific plots only 93 93 if (psMetadataLookupBool(NULL, recipe, "SAVE.PLOTS")) { 94 pmFPAfile *output = NULL;95 output = pmFPAfileDefineOutput (config, input->fpa, "SOURCE.PLOT.MOMENTS");96 if (!output) {94 pmFPAfile *output = NULL; 95 output = pmFPAfileDefineOutputFromFile (config, input, "SOURCE.PLOT.MOMENTS"); 96 if (!output) { 97 97 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for SOURCE.PLOT.MOMENTS"); 98 98 return false; 99 99 } 100 output->save = true;101 output = pmFPAfileDefineOutput (config, input->fpa, "SOURCE.PLOT.PSFMODEL");102 if (!output) {100 output->save = true; 101 output = pmFPAfileDefineOutputFromFile (config, input, "SOURCE.PLOT.PSFMODEL"); 102 if (!output) { 103 103 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for SOURCE.PLOT.PSFMODEL"); 104 104 return false; 105 105 } 106 output->save = true;107 output = pmFPAfileDefineOutput (config, input->fpa, "SOURCE.PLOT.APRESID");108 if (!output) {106 output->save = true; 107 output = pmFPAfileDefineOutputFromFile (config, input, "SOURCE.PLOT.APRESID"); 108 if (!output) { 109 109 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for SOURCE.PLOT.APRESID"); 110 110 return false; 111 111 } 112 output->save = true;112 output->save = true; 113 113 } 114 114
Note:
See TracChangeset
for help on using the changeset viewer.
