- 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/psphotBasicDeblend.c
r20453 r26643 1 1 # include "psphotInternal.h" 2 2 3 bool psphotBasicDeblend (p sArray *sources, psMetadata *recipe) {3 bool psphotBasicDeblend (pmConfig *config, const pmFPAview *view, const char *filename, int index) { 4 4 5 5 int N; … … 8 8 pmSource *source, *testSource; 9 9 10 psTimerStart ("psphot.deblend.basic"); 11 10 12 int Nblend = 0; 11 13 12 psTimerStart ("psphot.deblend.basic"); 14 // find the currently selected readout 15 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest 16 psAssert (readout, "missing file?"); 17 18 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 19 psAssert (readout, "missing readout?"); 20 21 psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES"); 22 psAssert (sources, "missing sources?"); 23 24 // select the appropriate recipe information 25 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 26 psAssert (recipe, "missing recipe?"); 13 27 14 28 float FRACTION = psMetadataLookupF32 (&status, recipe, "DEBLEND_PEAK_FRACTION"); … … 128 142 return true; 129 143 } 144 145 // for now, let's store the detections on the readout->analysis for each readout 146 bool psphotBasicDeblend (pmConfig *config, const pmFPAview *view) 147 { 148 bool status = true; 149 150 int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 151 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 152 153 // loop over the available readouts 154 for (int i = 0; i < num; i++) { 155 if (!psphotBasicDeblendReadout (config, view, "PSPHOT.INPUT", i)) { 156 psError (PSPHOT_ERR_CONFIG, false, "failed on saturated star deblend analysis for PSPHOT.INPUT entry %d", i); 157 return false; 158 } 159 } 160 return true; 161 }
Note:
See TracChangeset
for help on using the changeset viewer.
