- 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/psphotSourceFreePixels.c
r12792 r26688 1 1 # include "psphotInternal.h" 2 2 3 void psphotSourceFreePixels (psArray *sources) { 3 bool psphotSourceFreePixels (pmConfig *config, const pmFPAview *view) 4 { 5 bool status = true; 4 6 5 if (!sources) return; 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 (!psphotSourceFreePixelsReadout (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 } 19 20 bool psphotSourceFreePixelsReadout(pmConfig *config, const pmFPAview *view, const char *filename, int index) { 21 22 // find the currently selected readout 23 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest 24 psAssert (readout, "missing file?"); 25 26 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 27 psAssert (readout, "missing readout?"); 28 29 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); 30 psAssert (detections, "missing detections?"); 31 32 psArray *sources = detections->allSources; 33 psAssert (sources, "missing sources?"); 6 34 7 35 for (int i = 0; i < sources->n; i++) { … … 9 37 pmSourceFreePixels (source); 10 38 } 11 return ;39 return true; 12 40 }
Note:
See TracChangeset
for help on using the changeset viewer.
