Changeset 27267
- Timestamp:
- Mar 12, 2010, 9:37:09 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20100225/psphot/src/psphotMagnitudes.c
r26894 r27267 14 14 // loop over the available readouts 15 15 for (int i = 0; i < num; i++) { 16 if (!psphotMagnitudesReadout (config, view, "PSPHOT.INPUT", i, recipe)) { 16 17 // find the currently selected readout 18 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PSPHOT.INPUT", i); // File of interest 19 psAssert (file, "missing file?"); 20 21 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 22 psAssert (readout, "missing readout?"); 23 24 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); 25 psAssert (detections, "missing detections?"); 26 27 psArray *sources = detections->allSources; 28 psAssert (sources, "missing sources?"); 29 30 pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.PSF"); 31 psAssert (psf, "missing psf?"); 32 33 if (!psphotMagnitudesReadout (config, recipe, view, readout, sources, psf)) { 17 34 psError (PSPHOT_ERR_CONFIG, false, "failed to measure magnitudes for PSPHOT.INPUT entry %d", i); 18 35 return false; … … 22 39 } 23 40 24 bool psphotMagnitudesReadout(pmConfig *config, const pmFPAview *view, const char *filename, int index, psMetadata *recipe) {41 bool psphotMagnitudesReadout(pmConfig *config, psMetadata *recipe, const pmFPAview *view, pmReadout *readout, psArray *sources, pmPSF *psf) { 25 42 26 43 bool status = false; 27 44 int Nap = 0; 28 45 46 if (!sources->n) { 47 psLogMsg ("psphot", PS_LOG_INFO, "no sources, skipping source magnitudes"); 48 return true; 49 } 50 29 51 psTimerStart ("psphot.mags"); 30 31 // find the currently selected readout32 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest33 psAssert (file, "missing file?");34 35 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa);36 psAssert (readout, "missing readout?");37 38 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS");39 psAssert (detections, "missing detections?");40 41 psArray *sources = detections->allSources;42 psAssert (sources, "missing sources?");43 44 if (!sources->n) {45 psLogMsg ("psphot", PS_LOG_INFO, "no sources, skipping source size");46 return true;47 }48 49 pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.PSF");50 psAssert (psf, "missing psf?");51 52 52 53 // determine the number of allowed threads
Note:
See TracChangeset
for help on using the changeset viewer.
