- Timestamp:
- Jul 9, 2010, 10:56:32 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/psphot/src/psphotSourceSize.c
r28013 r28643 1 1 # include "psphotInternal.h" 2 2 # include <gsl/gsl_sf_gamma.h> 3 4 # define KRON 1 3 5 4 6 typedef struct { … … 197 199 pmSourceSub (source, PM_MODEL_OP_FULL, options->maskVal); 198 200 201 // XXX test: switch to kron flux 202 # if (KRON) 203 float apMag = -2.5*log10(source->moments->KronFlux); 204 # else 199 205 float apMag = -2.5*log10(source->moments->Sum); 206 # endif 200 207 float dMag = source->psfMag - apMag; 201 208 … … 343 350 pmSourceSub (source, PM_MODEL_OP_FULL, options->maskVal); 344 351 352 # if (KRON) 353 float apMag = -2.5*log10(source->moments->KronFlux); 354 # else 345 355 float apMag = -2.5*log10(source->moments->Sum); 356 # endif 346 357 float dMag = source->psfMag - apMag; 347 358 348 359 // set nSigma to include both systematic and poisson error terms 349 360 // XXX the 'poisson error' contribution for size is probably wrong... 350 float nSigmaMAG = (dMag - options->ApResid) / hypot(source->errMag, options->ApSysErr); 361 // XXX add in a hard floor on the Ap Sys Err (to be a bit generous) 362 float nSigmaMAG = (dMag - options->ApResid) / hypot(source->errMag, hypot(options->ApSysErr, 0.025)); 351 363 float nSigmaMXX = (Mxx - psfClump->X) / hypot(psfClump->dX, psfClump->X*psfClump->X*source->errMag); 352 364 float nSigmaMYY = (Myy - psfClump->Y) / hypot(psfClump->dY, psfClump->Y*psfClump->Y*source->errMag); 365 366 fprintf (stderr, "Mxx: %f, Myy: %f, dx: %f, dy: %f, psfMag: %f, apMag: %f, dMag: %f, errMag: %f, nSigmaMag: %f\n", 367 Mxx, Myy, source->peak->xf - source->moments->Mx, source->peak->yf - source->moments->My, 368 source->psfMag, apMag, dMag, source->errMag, nSigmaMAG); 353 369 354 370 // partially-masked sources are more likely to be mis-measured PSFs
Note:
See TracChangeset
for help on using the changeset viewer.
