- Timestamp:
- Feb 9, 2010, 6:15:15 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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) {
Note:
See TracChangeset
for help on using the changeset viewer.
