Changeset 12707
- Timestamp:
- Mar 30, 2007, 6:29:25 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotReadout.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotReadout.c
r12689 r12707 2 2 3 3 bool psphotReadout (pmConfig *config, pmFPAview *view) { 4 5 bool dump = (psTraceGetLevel("psphot") >= 6); 4 6 5 7 // select the current recipe … … 36 38 psphotModelTest (readout, recipe); 37 39 38 if (psTraceGetLevel("psphot") > 5) {40 if (psTraceGetLevel("psphot") >= 5) { 39 41 psphotSaveImage (NULL, readout->image, "image.fits"); 40 42 psphotSaveImage (NULL, readout->mask, "mask.fits"); … … 61 63 return psphotReadoutCleanup (config, readout, recipe, NULL, NULL); 62 64 } 63 pmPeaksWriteText (peaks, "oldpeaks.dat");64 65 65 66 // construct sources and measure basic stats … … 105 106 psphotGuessModels (readout, sources, recipe, psf); 106 107 107 psphotSaveImage (NULL, readout->image, "image.v0.fits");108 if (dump) psphotSaveImage (NULL, readout->image, "image.v0.fits"); 108 109 109 110 // linear PSF fit to peaks 110 111 psphotEnsemblePSF (readout, sources, recipe, psf, FALSE); 111 psphotSaveImage (NULL, readout->image, "image.v1.fits");112 if (dump) psphotSaveImage (NULL, readout->image, "image.v1.fits"); 112 113 if (!strcasecmp (breakPt, "ENSEMBLE")) { 113 114 goto finish; … … 116 117 // non-linear PSF and EXT fit to brighter sources 117 118 psphotBlendFit (readout, sources, recipe, psf); 118 psphotSaveImage (NULL, readout->image, "image.v2.fits");119 if (dump) psphotSaveImage (NULL, readout->image, "image.v2.fits"); 119 120 120 121 // replace all sources 121 122 psphotReplaceAll (sources); 122 psphotSaveImage (NULL, readout->image, "image.v3.fits");123 if (dump) psphotSaveImage (NULL, readout->image, "image.v3.fits"); 123 124 124 125 // linear PSF fit to remaining peaks 125 126 psphotEnsemblePSF (readout, sources, recipe, psf, TRUE); 126 psphotSaveImage (NULL, readout->image, "image.v4.fits");127 if (dump) psphotSaveImage (NULL, readout->image, "image.v4.fits"); 127 128 if (!strcasecmp (breakPt, "PASS1")) { 128 129 goto finish; … … 140 141 // find the peaks in the image 141 142 psArray *newPeaks = psphotFindPeaks (readout, recipe, 2); 142 pmPeaksWriteText (newPeaks, "newpeaks.dat");143 143 144 144 // remove noise for subtracted objects … … 157 157 // replace all sources 158 158 psphotReplaceAll (sources); 159 psphotSaveImage (NULL, readout->image, "image.v5.fits");159 if (dump) psphotSaveImage (NULL, readout->image, "image.v5.fits"); 160 160 161 161 // merge the newly selected peaks into the existing list … … 165 165 // linear PSF fit to remaining peaks 166 166 psphotEnsemblePSF (readout, sources, recipe, psf, TRUE); 167 psphotSaveImage (NULL, readout->image, "image.v6.fits");167 if (dump) psphotSaveImage (NULL, readout->image, "image.v6.fits"); 168 168 169 169 finish: 170 170 171 171 // plot positive sources 172 psphotSourcePlots (readout, sources, recipe);172 // psphotSourcePlots (readout, sources, recipe); 173 173 174 174 // measure aperture photometry corrections … … 180 180 181 181 // calculate source magnitudes 182 // XXX modify this API to take config, view?183 182 pmReadout *background = psphotSelectBackground (config, view); 184 183 psphotMagnitudes(sources, recipe, psf, background);
Note:
See TracChangeset
for help on using the changeset viewer.
