- 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/psphotRoughClass.c
r26643 r26681 7 7 } } 8 8 9 bool psphotRoughClassRegion (int nRegion, psRegion *region, psArray *sources, psMetadata *target, psMetadata *recipe, const bool havePSF); 9 // for now, let's store the detections on the readout->analysis for each readout 10 bool psphotRoughClass (pmConfig *config, const pmFPAview *view) 11 { 12 bool status = true; 10 13 11 // 2006.02.02 : no leaks 12 bool psphotRoughClassReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, const bool havePSF) { 14 // select the appropriate recipe information 15 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 16 psAssert (recipe, "missing recipe?"); 17 18 int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 19 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 20 21 // loop over the available readouts 22 for (int i = 0; i < num; i++) { 23 if (!psphotRoughClassReadout (config, view, "PSPHOT.INPUT", i, recipe)) { 24 psError (PSPHOT_ERR_CONFIG, false, "failed on saturated star deblend analysis for PSPHOT.INPUT entry %d", i); 25 return false; 26 } 27 } 28 return true; 29 } 30 31 bool psphotRoughClassReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, psMetadata *recipe) { 13 32 14 33 bool status; … … 23 42 psAssert (readout, "missing readout?"); 24 43 44 // if we have a PSF, use the existing PSF clump region below 45 bool havePSF = false; 46 if (psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.PSF")) { 47 havePSF = true; 48 } 49 25 50 psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES"); 26 51 psAssert (sources, "missing sources?"); 27 52 28 // select the appropriate recipe information 29 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 30 psAssert (recipe, "missing recipe?"); 53 if (!sources->n) { 54 psLogMsg ("psphot", PS_LOG_INFO, "no sources, skipping rough classification"); 55 return true; 56 } 31 57 32 58 // we make this measurement on a NxM grid of regions across the readout … … 125 151 return true; 126 152 } 127 128 // for now, let's store the detections on the readout->analysis for each readout129 bool psphotRoughClass (pmConfig *config, const pmFPAview *view, const bool havePSF)130 {131 bool status = true;132 133 int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM");134 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM");135 136 // loop over the available readouts137 for (int i = 0; i < num; i++) {138 if (!psphotRoughClassReadout (config, view, "PSPHOT.INPUT", i, havePSF)) {139 psError (PSPHOT_ERR_CONFIG, false, "failed on saturated star deblend analysis for PSPHOT.INPUT entry %d", i);140 return false;141 }142 }143 return true;144 }
Note:
See TracChangeset
for help on using the changeset viewer.
