Changeset 20330
- Timestamp:
- Oct 22, 2008, 11:46:51 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotReadoutFindPSF.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotReadoutFindPSF.c
r20085 r20330 31 31 // XXX this requires sources to be supplied as PSPHOT.INPUT.CMF 32 32 pmDetections *detections = psphotLoadPSFSources (config, view); 33 if (detections == NULL) { 34 psLogMsg ("psphot", 3, "problem loading psf stars"); 35 return psphotReadoutCleanup (config, readout, recipe, detections, NULL, NULL); 36 } 37 if (detections->peaks == NULL) { 38 psLogMsg ("psphot", 3, "no psf stars supplied"); 39 return psphotReadoutCleanup (config, readout, recipe, detections, NULL, NULL); 33 if (!detections || !detections->peaks) { 34 psError(PSPHOT_ERR_ARGUMENTS, true, "Can't find PSF stars"); 35 return psphotReadoutCleanup(config, readout, recipe, detections, NULL, NULL); 40 36 } 41 37 42 38 // construct sources and measure basic stats (moments, local sky) 43 psArray *sources = psphotSourceStats (readout, recipe, detections);39 psArray *sources = psphotSourceStats(readout, recipe, detections); 44 40 if (!sources) return false; 45 41 … … 51 47 } 52 48 53 pmPSF *psf = psphotChoosePSF (readout, sources, recipe); 54 if (psf == NULL) { 55 psLogMsg ("psphot", 3, "failure to construct a psf model"); 56 return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources); 49 pmPSF *psf = psphotChoosePSF(readout, sources, recipe); 50 if (!psf) { 51 psWarning("Failed to construct a psf model"); 52 psFree(sources); 53 return psphotReadoutCleanup(config, readout, recipe, detections, NULL, NULL); 57 54 } 58 psphotVisualShowPSFModel (readout, psf);55 psphotVisualShowPSFModel(readout, psf); 59 56 60 57 // drop the references to the image pixels held by each source 61 psphotSourceFreePixels (sources); 58 psphotSourceFreePixels(sources); 59 psFree(sources); 62 60 63 61 // create the exported-metadata and free local data 64 return psphotReadoutCleanup(config, readout, recipe, detections, psf, sources);62 return psphotReadoutCleanup(config, readout, recipe, detections, psf, NULL); 65 63 }
Note:
See TracChangeset
for help on using the changeset viewer.
