Changeset 19911
- Timestamp:
- Oct 6, 2008, 3:12:51 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotReadout.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotReadout.c
r19888 r19911 36 36 } 37 37 38 // set up the Visual display,display the image, weight, mask (ch 1,2,3)39 psphotVisualShowImage ( config,readout);38 // display the image, weight, mask (ch 1,2,3) 39 psphotVisualShowImage (readout); 40 40 41 41 // generate a background model (median, smoothed image) … … 69 69 } 70 70 71 // display the peaks and footprints72 psphotVisualShowPeaks (config, view, detections);73 psphotVisualShowFootprints (config, view, detections);74 75 71 // construct sources and measure basic stats 76 72 psArray *sources = psphotSourceStats (readout, recipe, detections); … … 80 76 } 81 77 82 psphotVisualShowMoments (config, view, sources);83 84 78 // find blended neighbors of very saturated stars 85 79 // XXX merge this with Basic Deblend? … … 93 87 94 88 // classify sources based on moments, brightness 95 if (!psphotRoughClass ( sources, recipe, havePSF)) {89 if (!psphotRoughClass (readout, sources, recipe, havePSF)) { 96 90 psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image"); 97 91 return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources); … … 101 95 } 102 96 103 psphotVisualShowRoughClass (config, view, sources); 104 psphotVisualShowFlags (config, view, sources); 97 psphotImageQuality (recipe, sources); 105 98 106 99 // if we were not supplied a PSF, choose one here … … 120 113 } 121 114 122 psphotVisualShowPSFModel ( config,readout, psf);115 psphotVisualShowPSFModel (readout, psf); 123 116 124 117 // Define source fitting parameters for everything that follows PSF fits … … 161 154 psphotFitSourcesLinear (readout, sources, recipe, psf, FALSE); 162 155 163 // XXX we have to place this here because the models are not realized until psphotGuessModels 164 // or fitted until psphotFitSourcesLinear. There is an example of generating a residual image 165 // in pmPSFtry.c 166 167 psphotVisualShowPSFStars (config, view, psf, sources); 168 psphotVisualShowSatStars (config, view, psf, sources); 169 psphotVisualShowResidualImage (config, readout); 170 psphotVisualShowFlags (config, view, sources); 156 // We have to place these visualizations here because the models are not realized until 157 // psphotGuessModels or fitted until psphotFitSourcesLinear. 158 psphotVisualShowPSFStars (recipe, psf, sources); 159 psphotVisualShowSatStars (recipe, psf, sources); 171 160 172 161 // identify CRs and extended sources … … 176 165 } 177 166 178 psphotVisualPlotSourceSize (config, sources);179 psphotVisualShowSourceSize (config, view, sources);180 181 167 // non-linear PSF and EXT fit to brighter sources 182 168 psphotBlendFit (readout, sources, recipe, psf); 183 169 184 psphotVisualShowResidualImage (config, readout);185 psphotVisualShowFlags (config, view, sources);186 187 170 // replace all sources 188 171 psphotReplaceAllSources (sources, recipe); … … 190 173 // linear fit to include all sources 191 174 psphotFitSourcesLinear (readout, sources, recipe, psf, TRUE); 192 193 psphotVisualShowResidualImage (config, readout);194 psphotVisualShowFlags (config, view, sources);195 175 196 176 // if we only do one pass, skip to extended source analysis … … 214 194 psphotSubNoise (readout, sources, recipe); 215 195 216 // display the new peaks and footprints217 psphotVisualShowPeaks (config, view, detections);218 psphotVisualShowFootprints (config, view, detections);219 220 196 // define new sources based on only the new peaks 221 197 psArray *newSources = psphotSourceStats (readout, recipe, detections); 222 198 223 199 // set source type 224 if (!psphotRoughClass ( newSources, recipe, havePSF)) {200 if (!psphotRoughClass (readout, newSources, recipe, havePSF)) { 225 201 psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image"); 226 202 return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources); 227 203 } 228 229 psphotVisualShowRoughClass (config, view, sources);230 psphotVisualShowFlags (config, view, sources);231 204 232 205 // create full input models … … 243 216 psphotFitSourcesLinear (readout, sources, recipe, psf, TRUE); 244 217 245 psphotVisualShowResidualImage (config, readout);246 psphotVisualShowFlags (config, view, sources);247 248 218 pass1finish: 249 219 250 220 // measure source size for the remaining sources 251 221 psphotSourceSize (config, readout, sources, recipe, 0); 252 psphotVisualPlotSourceSize (config, sources);253 psphotVisualShowSourceSize (config, view, sources);254 222 255 223 psphotExtendedSourceAnalysis (readout, sources, recipe); … … 268 236 } 269 237 270 psphotVisualPlotApResid (config, sources);271 272 238 // calculate source magnitudes 273 pmReadout *background = psphotSelectBackground (config, view, false); 274 psphotMagnitudes(sources, recipe, psf, background); 239 psphotMagnitudes(config, view, sources, recipe, psf); 275 240 276 241 // replace failed sources?
Note:
See TracChangeset
for help on using the changeset viewer.
