Changeset 26832
- Timestamp:
- Feb 9, 2010, 6:15:15 PM (16 years ago)
- Location:
- branches/eam_branches/20091201
- Files:
-
- 3 edited
-
ppStack/src/ppStack.h (modified) (1 diff)
-
ppStack/src/ppStackPrepare.c (modified) (3 diffs)
-
psModules/src/objects/pmPSF.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/ppStack/src/ppStack.h
r26076 r26832 13 13 typedef enum { 14 14 PPSTACK_MASK_CAL = 0x01, // Photometric calibration failed 15 PPSTACK_MASK_MATCH = 0x02, // PSF-matching failed 16 PPSTACK_MASK_CHI2 = 0x04, // Chi^2 too deviant 17 PPSTACK_MASK_REJECT = 0x08, // Rejection failed 18 PPSTACK_MASK_BAD = 0x10, // Bad image (too many pixels rejected) 15 PPSTACK_MASK_PSF = 0x02, // PSF measurement failed 16 PPSTACK_MASK_MATCH = 0x04, // PSF-matching failed 17 PPSTACK_MASK_CHI2 = 0x08, // Chi^2 too deviant 18 PPSTACK_MASK_REJECT = 0x10, // Rejection failed 19 PPSTACK_MASK_BAD = 0x20, // Bad image (too many pixels rejected) 19 20 PPSTACK_MASK_ALL = 0xff // All errors 20 21 } ppStackMask; -
branches/eam_branches/20091201/ppStack/src/ppStackPrepare.c
r26785 r26832 178 178 bool redoPhot = psMetadataLookupBool(NULL, recipe, "PHOT"); 179 179 180 pmDetections *detections = NULL;180 pmDetections *detections = NULL; 181 181 if (options->convolve || options->matchZPs || options->photometry || redoPhot) { 182 182 pmReadout *ro = pmFPAviewThisReadout(view, inputFile->fpa); // Readout with sources … … 186 186 return NULL; 187 187 } 188 psAssert (detections->allSources, "missing sources?");189 188 psAssert (detections->allSources, "missing sources?"); 189 190 190 options->sourceLists->data[index] = psMemIncrRefCounter(detections->allSources); 191 191 } … … 238 238 } 239 239 havePSFs = true; 240 float fwhm = pmPSFtoFWHM(psf, 0.5 * numCols, 0.5 * numRows); // FWHM for image 241 psStringAppend(&log, "Input %d: %f\n", i, fwhm); 242 options->inputSeeing->data.F32[i] = fwhm; 240 241 double sumFWHM = 0.0; // FWHM for image 242 int numFWHM = 0; // Number of FWHM measurements 243 for (int y = 0; y < psf->trendNy; y++) { 244 float yPos = ((float)y + 0.5) / (float)psf->trendNy * numRows; 245 for (int x = 0; x < psf->trendNx; x++) { 246 float xPos = ((float)x + 0.5) / (float)psf->trendNx * numCols; 247 float fwhm = pmPSFtoFWHM(psf, xPos, yPos); // FWHM for image 248 if (isfinite(fwhm)) { 249 sumFWHM += fwhm; 250 numFWHM++; 251 } 252 } 253 } 254 if (numFWHM == 0) { 255 options->inputSeeing->data.F32[i] = NAN; 256 options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i] = PPSTACK_MASK_PSF; 257 psLogMsg("ppStack", PS_LOG_INFO, "Unable to measure PSF FWHM for image %d --- rejected.", i); 258 } else { 259 options->inputSeeing->data.F32[i] = sumFWHM / (float)numFWHM; 260 } 261 psStringAppend(&log, "Input %d: %f\n", i, options->inputSeeing->data.F32[i]); 243 262 } 244 263 if (havePSFs) { -
branches/eam_branches/20091201/psModules/src/objects/pmPSF.c
r26669 r26832 415 415 416 416 pmModel *model = pmModelFromPSFforXY(psf, x, y, 1.0); // Model of source 417 if (!model) { 418 psError(PS_ERR_UNKNOWN, false, "Unable to determine PSF model at %f,%f\n", x, y); 419 return NAN; 420 } 417 421 psF32 *params = model->params->data.F32; // Model parameters 418 422 psEllipseAxes axes = pmPSF_ModelToAxes(params, MAX_AXIS_RATIO); // Ellipse axes
Note:
See TracChangeset
for help on using the changeset viewer.
