Changeset 13304
- Timestamp:
- May 7, 2007, 5:02:08 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotReadout.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotReadout.c
r13225 r13304 24 24 25 25 // generate mask & weight images if they don't already exit 26 if (!pmReadoutGenerateMaskWeight (readout, true)) { 26 if ((!readout->mask && !pmReadoutGenerateMask(readout)) || 27 (!readout->weight && !pmReadoutGenerateWeight(readout, true))) { 27 28 psError (PSPHOT_ERR_CONFIG, false, "trouble creating mask and/or weight"); 28 29 return false; … … 71 72 72 73 if (!peaks) { 73 psLogMsg ("psphot", 3, "unable to find peaks in this image");74 return psphotReadoutCleanup (config, readout, recipe, NULL, NULL);74 psLogMsg ("psphot", 3, "unable to find peaks in this image"); 75 return psphotReadoutCleanup (config, readout, recipe, NULL, NULL); 75 76 } 76 77 … … 91 92 // mark blended peaks PS_SOURCE_BLEND 92 93 if (!psphotBasicDeblend (sources, recipe)) { 93 psLogMsg ("psphot", 3, "failed on deblend analysis");94 return psphotReadoutCleanup (config, readout, recipe, NULL, sources);94 psLogMsg ("psphot", 3, "failed on deblend analysis"); 95 return psphotReadoutCleanup (config, readout, recipe, NULL, sources); 95 96 } 96 97 97 98 // classify sources based on moments, brightness 98 99 if (!psphotRoughClass (sources, recipe)) { 99 psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image");100 return psphotReadoutCleanup (config, readout, recipe, NULL, sources);100 psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image"); 101 return psphotReadoutCleanup (config, readout, recipe, NULL, sources); 101 102 } 102 103 if (!strcasecmp (breakPt, "MOMENTS")) { … … 107 108 pmPSF *psf = psphotLoadPSF (config, view, recipe); 108 109 if (!psf) { 109 // use bright stellar objects to measure PSF110 psf = psphotChoosePSF (readout, sources, recipe);111 if (psf == NULL) {112 psLogMsg ("psphot", 3, "failure to construct a psf model");113 return psphotReadoutCleanup (config, readout, recipe, psf, sources);114 }110 // use bright stellar objects to measure PSF 111 psf = psphotChoosePSF (readout, sources, recipe); 112 if (psf == NULL) { 113 psLogMsg ("psphot", 3, "failure to construct a psf model"); 114 return psphotReadoutCleanup (config, readout, recipe, psf, sources); 115 } 115 116 } 116 117 if (!strcasecmp (breakPt, "PSFMODEL")) { … … 121 122 psphotLoadExtSources (config, view, sources); 122 123 123 // construct an initial model for each object 124 // construct an initial model for each object 124 125 psphotGuessModels (readout, sources, recipe, psf); 125 126 126 // XXX test output of models 127 // XXX test output of models 127 128 // psphotTestSourceOutput (readout, sources, recipe, psf); 128 129 … … 205 206 finish: 206 207 207 // plot positive sources 208 // plot positive sources 208 209 // psphotSourcePlots (readout, sources, recipe); 209 210
Note:
See TracChangeset
for help on using the changeset viewer.
