Changeset 5980 for trunk/psphot/src/psphotMagnitudes.c
- Timestamp:
- Jan 13, 2006, 8:24:10 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotMagnitudes.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotMagnitudes.c
r5837 r5980 17 17 model = source->modelPSF; 18 18 if (model == NULL) return NULL; 19 radius = apRadius;19 radius = (apRadius > 0) ? apRadius : model->radius; 20 20 isPSF = true; 21 21 break; … … 46 46 // for PSFs, correct both apMag and fitMag to same system, consistent with infinite flux star in aperture RADIUS 47 47 if (isPSF && (psf != NULL)) { 48 if (psf->growth != NULL) { 49 source->apMag += pmGrowthCurveCorrect (psf->growth, model->radius); 50 } 51 48 52 rflux = pow (10.0, 0.4*source->fitMag); 49 source->apMag -= rflux * psf->skyBias * (M_PI * PS_SQR(apRadius));50 source->fitMag += psPolynomial 3DEval (psf->ApTrend, x, y, 0.0);53 source->apMag -= PS_SQR(model->radius)*rflux * psf->skyBias + psf->skySat / rflux; 54 source->fitMag += psPolynomial4DEval (psf->ApTrend, x, y, 0.0, 0.0); 51 55 } 56 57 // unmask aperture 58 psImageKeepCircle (source->mask, x, y, radius, "AND", ~PSPHOT_MASK_MARKED); 52 59 53 60 // subtract object, leave local sky 54 61 pmSourceSubModel (source->pixels, source->mask, model, false, false); 55 56 // unmask aperture57 psImageKeepCircle (source->mask, x, y, radius, "AND", ~PSPHOT_MASK_MARKED);58 62 59 63 if (!status) return NULL; … … 62 66 63 67 /* 64 aprMag' - fitMag = rflux*skyBias + ApTrend(x,y) 65 (aprMag - rflux*skyBias) - fitMAg = ApTrend(x,y) 66 (aprMag - rflux*skyBias) = fitMAg + ApTrend(x,y) 68 aprMag' - fitMag = flux*skySat + r^2*rflux*skyBias + ApTrend(x,y) 69 (aprMag - flux*skySat - r^2*rflux*skyBias) - fitMAg = ApTrend(x,y) 70 (aprMag - flux*skySat - r^2*rflux*skyBias) = fitMAg + ApTrend(x,y) 71 67 72 */
Note:
See TracChangeset
for help on using the changeset viewer.
