Changeset 6949 for trunk/psphot/src/psphotSourceFits.c
- Timestamp:
- Apr 21, 2006, 11:50:22 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotSourceFits.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotSourceFits.c
r6900 r6949 10 10 // save the PSF model from the Ensemble fit 11 11 pmModel *PSF = pmModelCopy (source->modelPSF); 12 if (isnan(PSF->params->data.F32[1])) psAbort ("psphot", "nan in psf fit"); 12 13 13 14 // extend source radius as needed … … 191 192 PSF = source->modelPSF; 192 193 psphotCheckRadiusPSFBlend (readout, source, PSF, 8.0); 194 if (isnan(PSF->params->data.F32[1])) psAbort ("psphot", "nan in dbl fit"); 193 195 194 196 modelSet = psArrayAlloc (2); 195 modelSet->n = 0;197 // DROP modelSet->n = 0; 196 198 197 199 DBL = pmModelCopy (PSF); … … 224 226 // use the source moments, etc to guess basic model parameters 225 227 pmModel *EXT = pmSourceModelGuess (source, modelTypeEXT); 228 // if (isnan(EXT->params->data.F32[1])) psAbort ("psphot", "nan in ext fit"); 226 229 227 230 psphotCheckRadiusEXT (readout, source, EXT); … … 229 232 x = EXT->params->data.F32[2]; 230 233 y = EXT->params->data.F32[3]; 234 235 if ((source->moments->Sx < 1e-3) || (source->moments->Sx < 1e-3)) { 236 psTrace ("psphotSourceFits", 5, "problem source: moments: %f %f\n", source->moments->Sx, source->moments->Sy); 237 } 231 238 232 239 // fit EXT (not PSF) model (set/unset the pixel mask) … … 251 258 // save the PSF model from the Ensemble fit 252 259 pmModel *PSF = pmModelCopy (source->modelPSF); 260 if (isnan(PSF->params->data.F32[1])) psAbort ("psphot", "nan in blend fit primary"); 253 261 254 262 x = PSF->params->data.F32[2]; … … 256 264 257 265 psArray *modelSet = psArrayAlloc (source->blends->n + 1); 258 modelSet->n = 0;266 // DROP modelSet->n = 0; 259 267 psArrayAdd (modelSet, 16, PSF); 260 268 261 269 psArray *sourceSet = psArrayAlloc (source->blends->n + 1); 262 sourceSet->n = 0;270 // DROP sourceSet->n = 0; 263 271 psArrayAdd (sourceSet, 16, source); 264 272 … … 282 290 // XXX assume local sky is 0.0? 283 291 model->params->data.F32[1] = blend->moments->Peak - blend->moments->Sky; 292 if (isnan(model->params->data.F32[1])) psAbort ("psphot", "nan in blend fit"); 284 293 model->params->data.F32[2] = blend->peak->x; 285 294 model->params->data.F32[3] = blend->peak->y;
Note:
See TracChangeset
for help on using the changeset viewer.
