Changeset 18040
- Timestamp:
- Jun 9, 2008, 3:32:15 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmPSFtry.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmPSFtry.c
r16911 r18040 5 5 * @author EAM, IfA 6 6 * 7 * @version $Revision: 1.5 5$ $Name: not supported by cvs2svn $8 * @date $Date: 2008-0 3-11 00:49:14$7 * @version $Revision: 1.56 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2008-06-10 01:32:15 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 184 184 185 185 // XXX : use a different aperture radius from the fit radius? 186 if (!pmSourceMagnitudes (source, psfTry->psf, PM_SOURCE_PHOT_INTERP, maskVal, mark)) { 186 status = pmSourceMagnitudes (source, psfTry->psf, PM_SOURCE_PHOT_INTERP, maskVal, mark); 187 if (!status || isnan(source->apMag)) { 187 188 psfTry->mask->data.U8[i] = PSFTRY_MASK_BAD_PHOT; 188 189 psTrace ("psModules.objects", 4, "dropping %d (%d,%d) : poor photometry\n", i, source->peak->x, source->peak->y); … … 252 253 if (!pmPSFtryMetric (psfTry, options)) { 253 254 psError(PS_ERR_UNKNOWN, false, "Attempt to fit PSF with model %s failed.", modelName); 255 psFree (psfTry); 254 256 return NULL; 255 257 } … … 285 287 continue; 286 288 r2rflux->data.F32[i] = PS_SQR(RADIUS) * pow(10.0, 0.4*psfTry->fitMag->data.F32[i]); 289 } 290 291 // XXX test dump of aperture residual data 292 if (psTraceGetLevel("psModules.objects") >= 5) { 293 FILE *f = fopen ("apresid.dat", "w"); 294 for (int i = 0; i < psfTry->sources->n; i++) { 295 int keep = (psfTry->mask->data.U8[i] & PSFTRY_MASK_ALL); 296 297 pmSource *source = psfTry->sources->data[i]; 298 float x = source->peak->x; 299 float y = source->peak->y; 300 301 fprintf (f, "%d %d, %f %f %f %f %f %f \n", 302 i, keep, x, y, 303 psfTry->fitMag->data.F32[i], 304 r2rflux->data.F32[i], 305 psfTry->metric->data.F32[i], 306 psfTry->metricErr->data.F32[i]); 307 } 308 fclose (f); 287 309 } 288 310
Note:
See TracChangeset
for help on using the changeset viewer.
