Changeset 6753 for trunk/psphot/src/psphotApResid.c
- Timestamp:
- Mar 31, 2006, 4:58:31 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotApResid.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotApResid.c
r6715 r6753 17 17 // measure the aperture loss as a function of radius for PSF 18 18 float REF_RADIUS = psMetadataLookupF32 (&status, config, "PSF_REF_RADIUS"); 19 psf->growth = pmGrowthCurveAlloc (3.0, REF_RADIUS, 0.1);19 psf->growth = pmGrowthCurveAlloc (3.0, 50.0, REF_RADIUS); 20 20 psphotGrowthCurve (readout, psf); 21 21 … … 43 43 if (source->moments->SN < 2*FIT_SN_LIM) continue; 44 44 45 // get uncorrected magnitudes in scaled apertures46 model = pmSourceMagnitudes (source, NULL, 0);45 // get growth-corrected, apTrend-uncorrected magnitudes in scaled apertures 46 model = pmSourceMagnitudes (source, psf, true, false); 47 47 if (model == NULL) continue; 48 48 49 apResid->data.F64[Npsf] = source->apMag - source->psfMag; 50 51 xPos->data.F64[Npsf] = model->params->data.F32[2]; 52 yPos->data.F64[Npsf] = model->params->data.F32[3]; 53 54 flux->data.F64[Npsf] = pow(10.0, -0.4*source->psfMag); 55 r2rflux->data.F64[Npsf] = PS_SQR(model->radiusTMP) / flux->data.F64[Npsf]; 56 49 57 mask->data.U8[Npsf] = 0; 50 xPos->data.F64[Npsf] = model->params->data.F32[2];51 yPos->data.F64[Npsf] = model->params->data.F32[3];52 53 flux->data.F64[Npsf] = pow(10.0, -0.4*source->psfMag);54 r2rflux->data.F64[Npsf] = PS_SQR(model->radius) / flux->data.F64[Npsf];55 56 apResid->data.F64[Npsf] = source->apMag + pmGrowthCurveCorrect (psf->growth, model->radius) - source->psfMag;57 58 58 59 // XXX sanity clip? … … 83 84 stats->max = 3.0; 84 85 86 // no correction 87 if (!strcasecmp (ApTrendOption, "NONE")) { 88 // remove ApTrend fit from pmPSFtry 89 psf->ApTrend->coeff[0][0][0][0] = 0; 90 } 91 85 92 // constant only 86 93 if (!strcasecmp (ApTrendOption, "CONSTANT")) { … … 202 209 psVector *resid = (psVector *) psBinaryOp (NULL, (void *) apResid, "-", (void *) fit); 203 210 204 # if ( 0)211 # if (1) 205 212 FILE *fout = fopen ("resid.dat", "w"); 206 213 for (int i = 0; i < resid->n; i++) { … … 241 248 242 249 psLogMsg ("psphot.apresid", 3, "measure full-frame aperture residual: %f sec\n", psTimerMark ("psphot")); 243 psLogMsg ("psphot.apresid", 4, "aperture residual: %f +/- %f : %f bias \n", psf->ApResid, psf->dApResid, psf->skyBias);250 psLogMsg ("psphot.apresid", 4, "aperture residual: %f +/- %f : %f bias, %f skysat\n", psf->ApResid, psf->dApResid, psf->skyBias, psf->skySat); 244 251 psLogMsg ("psphot.apresid", 4, "apresid trends: %f %f %f %f %f\n", 245 252 1e3*psf->ApTrend->coeff[1][0][0][0],
Note:
See TracChangeset
for help on using the changeset viewer.
