Changeset 28974
- Timestamp:
- Aug 19, 2010, 4:12:08 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/psphot/src/psphotSourceFits.c
r28782 r28974 230 230 pmModel *EXT = NULL; 231 231 psArray *DBL = NULL; 232 pmMoments psfMoments; 232 233 233 234 // skip the source if we don't think it is extended … … 246 247 // this uses the footprint to judge both radius and aperture? 247 248 // XXX save the psf-based moments for output 248 if (!pmSourceMoments (source, radius, 0.0, 0.0, maskVal)) return false; 249 psfMoments = *source->moments; 250 if (!pmSourceMoments (source, radius, 0.0, 0.5, maskVal)) { 251 *source->moments = psfMoments; 252 return false; 253 } 249 254 250 255 psTrace ("psphot", 5, "trying blob...\n"); … … 314 319 315 320 // both models failed; reject them both 316 // XXX -- change type flags to psf in this case and keep original moments? 321 // XXX -- change type flags to psf in this case, and make sure we subtract it? 322 // reset the psf moments 323 *source->moments = psfMoments; 324 317 325 psFree (EXT); 318 326 psFree (DBL); … … 343 351 # endif 344 352 353 // reset the psf moments 354 *source->moments = psfMoments; 345 355 return true; 346 356 … … 379 389 # endif 380 390 391 // reset the (original) psf moments 392 *source->moments = psfMoments; 393 *newSrc->moments = psfMoments; 394 381 395 psArrayAdd (newSources, 100, newSrc); 382 396 psFree (newSrc); … … 385 399 386 400 escape: 401 // reset the psf moments 402 *source->moments = psfMoments; 387 403 psImageMaskPixels (source->maskObj, "AND", PS_NOT_IMAGE_MASK(markVal)); 388 404 psFree (tmpSrc); … … 419 435 axes = psEllipseMomentsToAxes (moments, 20.0); 420 436 437 if (isnan(axes.major)) return NULL; 438 if (isnan(axes.minor)) return NULL; 439 if (isnan(axes.theta)) return NULL; 440 421 441 // XXX this is really arbitrary: 4 pixel separation? 422 442 dx = 2 * cos (axes.theta);
Note:
See TracChangeset
for help on using the changeset viewer.
