Changeset 18788
- Timestamp:
- Jul 30, 2008, 12:15:15 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmPSFEnvelope.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmPSFEnvelope.c
r18611 r18788 110 110 psImageInit(envelope, SKY_VALUE); 111 111 pmReadout *fakeRO = pmReadoutAlloc(NULL); // Fake readout 112 float maxRadius = 0.0; // Maximum radius of sources 112 113 for (int i = 0; i < inputs->n; i++) { 113 114 pmPSF *psf = inputs->data[i]; // PSF of interest … … 142 143 psFree(subImage); 143 144 psFree(subEnv); 145 146 // Get the radius 147 pmModel *model = pmModelFromPSFforXY(psf, x, y, PEAK_FLUX); // Model for source 148 float srcRadius = model->modelRadius(model->params, WEIGHT_VAL); // Radius for source 149 if (srcRadius > maxRadius) { 150 maxRadius = srcRadius; 151 } 152 psFree(model); 144 153 } 145 154 … … 234 243 source->maskObj = NULL; 235 244 236 if (!pmSourceDefinePixels(source, readout, x, y, (float)radius)) {245 if (!pmSourceDefinePixels(source, readout, x, y, maxRadius)) { 237 246 psError(PS_ERR_UNKNOWN, false, "Unable to define pixels for source."); 238 247 psFree(readout); … … 241 250 } 242 251 243 if (!pmSourceMoments(source, radius)) {252 if (!pmSourceMoments(source, maxRadius)) { 244 253 psError(PS_ERR_UNKNOWN, false, "Unable to measure moments for source."); 245 254 psFree(readout); … … 255 264 options->poissonErrorsParams = true; 256 265 options->stats = psStatsAlloc(PSF_STATS); 257 options->radius = radius;266 options->radius = maxRadius; 258 267 options->psfTrendMode = PM_TREND_MAP; 259 268 options->psfTrendNx = xOrder;
Note:
See TracChangeset
for help on using the changeset viewer.
