- Timestamp:
- Jan 26, 2010, 5:10:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/psphot.stack.20100120/src/psphotSkyReplace.c
r21183 r26688 1 1 # include "psphotInternal.h" 2 3 bool psphotSkyReplace (pmConfig *config, const pmFPAview *view) 4 { 5 bool status = true; 6 7 int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 8 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 9 10 // loop over the available readouts 11 for (int i = 0; i < num; i++) { 12 if (!psphotReadout (config, view, "PSPHOT.INPUT", i)) { 13 psError (PSPHOT_ERR_CONFIG, false, "failed on saturated star deblend analysis for PSPHOT.INPUT entry %d", i); 14 return false; 15 } 16 } 17 return true; 18 } 2 19 3 20 // XXX make this an option? 4 21 // in order to successfully replace the sky, we must define a corresponding file... 5 bool psphotSkyReplace (pmConfig *config, const pmFPAview *view) {22 bool psphotSkyReplaceReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index) { 6 23 7 24 psTimerStart ("psphot.skyreplace"); 8 25 9 26 // find the currently selected readout 10 pmReadout *readout = pmFPAfileThisReadout (config->files, view, "PSPHOT.INPUT"); 11 if (readout == NULL) psAbort("input not defined"); 27 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest 28 psAssert (readout, "missing file?"); 29 30 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 31 psAssert (readout, "missing readout?"); 12 32 13 33 // select background pixels, from output background file, or create
Note:
See TracChangeset
for help on using the changeset viewer.
