Changeset 25755 for trunk/psphot/src/psphotReadout.c
- Timestamp:
- Oct 2, 2009, 3:12:47 PM (17 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
psphotReadout.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src
- Property svn:ignore
-
old new 18 18 psphotVersionDefinitions.h 19 19 psphotMomentsStudy 20 psphotPetrosianStudy
-
- Property svn:ignore
-
trunk/psphot/src/psphotReadout.c
r25738 r25755 81 81 82 82 // construct sources and measure basic stats 83 psArray *sources = psphotSourceStats (config, readout, detections );83 psArray *sources = psphotSourceStats (config, readout, detections, true); 84 84 if (!sources) return false; 85 85 if (!strcasecmp (breakPt, "PEAKS")) { … … 126 126 return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources); 127 127 } 128 129 128 psphotVisualShowPSFModel (readout, psf); 130 129 … … 132 131 psphotLoadExtSources (config, view, sources); 133 132 134 // construct an initial model for each object 133 // construct an initial model for each object, set the radius to fitRadius, set circular fit mask 135 134 psphotGuessModels (config, readout, sources, psf); 136 135 137 // XXX test output of models 138 // psphotTestSourceOutput (readout, sources, recipe, psf); 139 140 // linear PSF fit to source peaks 136 // linear PSF fit to source peaks, subtract the models from the image (in PSF mask) 141 137 psphotFitSourcesLinear (readout, sources, recipe, psf, FALSE); 142 138 … … 144 140 // psphotGuessModels or fitted until psphotFitSourcesLinear. 145 141 psphotVisualShowPSFStars (recipe, psf, sources); 146 psphotVisualShowSatStars (recipe, psf, sources);147 142 148 143 // identify CRs and extended sources 149 psphotSourceSize (config, readout, sources, recipe, 0);144 psphotSourceSize (config, readout, sources, recipe, psf, 0); 150 145 if (!strcasecmp (breakPt, "ENSEMBLE")) { 151 146 goto finish; 152 147 } 148 psphotVisualShowSatStars (recipe, psf, sources); 153 149 154 150 // non-linear PSF and EXT fit to brighter sources 151 // replace model flux, adjust mask as needed, fit, subtract the models (full stamp) 155 152 psphotBlendFit (config, readout, sources, psf); 156 153 … … 158 155 psphotReplaceAllSources (sources, recipe); 159 156 160 // linear fit to include all sources 157 // linear fit to include all sources (subtract again) 161 158 psphotFitSourcesLinear (readout, sources, recipe, psf, TRUE); 162 159 … … 165 162 goto pass1finish; 166 163 } 167 168 // XXX for the moment, drop the re-calc of the background (prove this works) 169 // replace background in residual image 170 // psphotSkyReplace (config, view); 171 // re-measure background model (median, smoothed image) 172 // psphotImageMedian (config, view); 164 // NOTE: possibly re-measure background model here with objects subtracted 173 165 174 166 // add noise for subtracted objects … … 182 174 183 175 // define new sources based on only the new peaks 184 psArray *newSources = psphotSourceStats (config, readout, detections );176 psArray *newSources = psphotSourceStats (config, readout, detections, false); 185 177 186 178 // set source type … … 190 182 } 191 183 192 // create full input models 184 // create full input models, set the radius to fitRadius, set circular fit mask 193 185 psphotGuessModels (config, readout, newSources, psf); 194 186 … … 206 198 207 199 // measure source size for the remaining sources 208 psphotSourceSize (config, readout, sources, recipe, 0);200 psphotSourceSize (config, readout, sources, recipe, psf, 0); 209 201 210 202 psphotExtendedSourceAnalysis (readout, sources, recipe);
Note:
See TracChangeset
for help on using the changeset viewer.
