- Timestamp:
- Jan 20, 2010, 12:59:49 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/psphot.stack.20100120/src/psphotDeblendSatstars.c
r25885 r26643 1 1 # include "psphotInternal.h" 2 2 3 bool psphotDeblendSatstars (pmReadout *readout, psArray *sources, psMetadata *recipe) {3 bool psphotDeblendSatstarsReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index) { 4 4 5 5 int N; … … 10 10 int Nblend = 0; 11 11 float SAT_MIN_RADIUS = 5.0; 12 13 // find the currently selected readout 14 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest 15 psAssert (readout, "missing file?"); 16 17 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 18 psAssert (readout, "missing readout?"); 19 20 psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES"); 21 psAssert (sources, "missing sources?"); 22 23 // select the appropriate recipe information 24 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 25 psAssert (recipe, "missing recipe?"); 12 26 13 27 bool status; … … 169 183 return true; 170 184 } 185 186 // for now, let's store the detections on the readout->analysis for each readout 187 bool psphotDeblendSatstars (pmConfig *config, const pmFPAview *view) 188 { 189 bool status = true; 190 191 int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 192 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 193 194 // loop over the available readouts 195 for (int i = 0; i < num; i++) { 196 if (!psphotDeblendSatstarsReadout (config, view, "PSPHOT.INPUT", i)) { 197 psError (PSPHOT_ERR_CONFIG, false, "failed on saturated star deblend analysis for PSPHOT.INPUT entry %d", i); 198 return false; 199 } 200 } 201 return true; 202 }
Note:
See TracChangeset
for help on using the changeset viewer.
