Changeset 25261 for branches/pap/psphot/src/psphotFake.c
- Timestamp:
- Sep 2, 2009, 5:00:06 PM (17 years ago)
- File:
-
- 1 edited
-
branches/pap/psphot/src/psphotFake.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/psphot/src/psphotFake.c
r25260 r25261 17 17 const pmReadout *ro, // Readout of interest 18 18 float thresh, // Threshold for source identification 19 float xFWHM, float yFWHM, // Size of PSF19 float fwhmMajor, float fwhmMinor, // Size of PSF 20 20 float smoothNsigma, // Smoothing limit 21 21 psImageMaskType maskVal // Value to mask … … 25 25 PM_ASSERT_READOUT_VARIANCE(ro, false); 26 26 27 float smoothSigma = 0.5*( xFWHM + yFWHM) / (2.0*sqrtf(2.0*log(2.0)));27 float smoothSigma = 0.5*(fwhmMajor + fwhmMinor) / (2.0*sqrtf(2.0*log(2.0))); 28 28 psKernel *kernel = psImageSmoothKernel(smoothSigma, smoothNsigma); // Kernel used for smoothing 29 29 psKernel *newCovar = psImageCovarianceCalculate(kernel, ro->covariance); // Covariance matrix … … 131 131 // Collect recipe information 132 132 bool mdok; // Status of MD lookup 133 float xFWHM = psMetadataLookupF32(NULL, recipe, "FWHM_X"); // PSF size in x134 float yFWHM = psMetadataLookupF32(NULL, recipe, "FWHM_Y"); // PSF size in y135 if (!isfinite( xFWHM) || !isfinite(yFWHM)) {136 psError(PSPHOT_ERR_CONFIG, false, "Unable to find FWHM_ X and FWHM_Yin recipe");133 float fwhmMajor = psMetadataLookupF32(NULL, recipe, "FWHM_MAJ"); // PSF size in x 134 float fwhmMinor = psMetadataLookupF32(NULL, recipe, "FWHM_MIN"); // PSF size in y 135 if (!isfinite(fwhmMajor) || !isfinite(fwhmMinor) || fwhmMajor == 0.0 || fwhmMinor == 0.0) { 136 psError(PSPHOT_ERR_CONFIG, false, "Unable to find FWHM_MAJ and FWHM_MIN in recipe"); 137 137 return false; 138 138 } … … 170 170 float magLim; // Guess at limiting magnitude 171 171 float minFlux; // Minimum flux for fake image 172 if (!fakeLimit(&magLim, &minFlux, readout, thresh, xFWHM, yFWHM, smoothNsigma, maskVal)) {172 if (!fakeLimit(&magLim, &minFlux, readout, thresh, fwhmMajor, fwhmMinor, smoothNsigma, maskVal)) { 173 173 psError(PS_ERR_UNKNOWN, false, "Unable to determine limits for image"); 174 174 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
