- Timestamp:
- Jan 25, 2010, 7:52:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/psphot.stack.20100120/src/psphotGuessModels.c
r25755 r26681 7 7 // 3) define the threaded function to work with sources for a given cell 8 8 9 // for now, let's store the detections on the readout->analysis for each readout 10 bool psphotGuessModels (pmConfig *config, const pmFPAview *view) 11 { 12 bool status = true; 13 14 int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 15 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 16 17 // loop over the available readouts 18 for (int i = 0; i < num; i++) { 19 if (!psphotGuessModelsReadout (config, view, "PSPHOT.INPUT", i)) { 20 psError (PSPHOT_ERR_CONFIG, false, "failed on saturated star deblend analysis for PSPHOT.INPUT entry %d", i); 21 return false; 22 } 23 } 24 return true; 25 } 26 9 27 // construct an initial PSF model for each object 10 bool psphotGuessModels (pmConfig *config, pmReadout *readout, psArray *sources, pmPSF *psf) {28 bool psphotGuessModelsReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index) { 11 29 12 30 bool status; 13 31 14 32 psTimerStart ("psphot.models"); 33 34 // find the currently selected readout 35 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest 36 psAssert (readout, "missing file?"); 37 38 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 39 psAssert (readout, "missing readout?"); 40 41 psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES"); 42 psAssert (sources, "missing sources?"); 43 44 if (!sources->n) { 45 psLogMsg ("psphot", PS_LOG_INFO, "no sources, skipping model guess"); 46 return true; 47 } 48 49 pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.PSF"); 50 psAssert (sources, "missing psf?"); 15 51 16 52 // select the appropriate recipe information
Note:
See TracChangeset
for help on using the changeset viewer.
