Changeset 9993
- Timestamp:
- Nov 14, 2006, 4:36:51 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotApResid.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotApResid.c
r9890 r9993 28 28 // this is the smallest radius allowed: need to at least extend growth curve down to this... 29 29 float PSF_FIT_PAD = psMetadataLookupF32 (&status, recipe, "PSF_FIT_PADDING"); 30 bool IGNORE_GROWTH = psMetadataLookupBool (&status, recipe, "IGNORE_GROWTH"); 30 bool IGNORE_GROWTH = psMetadataLookupBool (&status, recipe, "IGNORE_GROWTH"); 31 bool INTERPOLATE_AP = psMetadataLookupBool (&status, recipe, "INTERPOLATE_AP"); 32 33 pmSourcePhotometryMode photMode = 0; 34 if (!IGNORE_GROWTH) photMode |= PM_SOURCE_PHOT_GROWTH; 35 if (INTERPOLATE_AP) photMode |= PM_SOURCE_PHOT_INTERP; 31 36 32 37 // set limits on the aperture magnitudes … … 48 53 Npsf = 0; 49 54 55 // XXX test dump 56 FILE *f = fopen ("apresid.dat", "w"); 57 50 58 // select all good PM_SOURCE_TYPE_STAR entries 51 59 for (int i = 0; i < sources->n; i++) { … … 61 69 // get growth-corrected, apTrend-uncorrected magnitudes in scaled apertures 62 70 // will fail if below S/N threshold or model is missing 63 if (!pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH)) {71 if (!pmSourceMagnitudes (source, psf, photMode)) { 64 72 Nskip ++; 65 73 continue; … … 88 96 dMag->data.F64[Npsf] = model->dparams->data.F32[PM_PAR_I0] / model->params->data.F32[PM_PAR_I0]; 89 97 98 fprintf (f, "%d %f %f %f %f %f %f %f %f\n", i, 99 xPos->data.F64[Npsf], yPos->data.F64[Npsf], 100 flux->data.F64[Npsf], r2rflux->data.F64[Npsf], 101 source->apMag, source->psfMag, apResid->data.F64[Npsf],dMag->data.F64[Npsf]); 102 90 103 psVectorExtend (mask, 100, 1); 91 104 psVectorExtend (xPos, 100, 1); … … 99 112 psLogMsg ("psphot.apresid", 4, "measure aperture residuals : %f sec for %d objects (%d skipped, %d failed, %ld invalid)\n", 100 113 psTimerMark ("psphot"), Npsf, Nskip, Nfail, sources->n - Npsf - Nskip - Nfail); 114 115 fclose (f); 101 116 102 117 // XXX choose a better value here?
Note:
See TracChangeset
for help on using the changeset viewer.
