Changeset 25383 for trunk/psphot/src/psphotSignificanceImage.c
- Timestamp:
- Sep 15, 2009, 12:45:01 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
psphot/src/psphotSignificanceImage.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/pap (added) merged: 25238,25241-25243,25246,25258-25267,25278,25302,25309-25312,25326-25329,25331-25339
- Property svn:mergeinfo changed
-
trunk/psphot/src/psphotSignificanceImage.c
r21407 r25383 22 22 } 23 23 24 bool status_x, status_y; 25 float FWHM_X = psMetadataLookupF32 (&status_x, recipe, "FWHM_X"); 26 float FWHM_Y = psMetadataLookupF32 (&status_y, recipe, "FWHM_Y"); 27 if (status_x && status_y) { 28 // if we know the FHWM, use that to set the smoothing kernel (XXX allow an optional override?) 29 SIGMA_SMTH = 0.5*(FWHM_X + FWHM_Y) / (2.0*sqrt(2.0*log(2.0))); 30 NSIGMA_SMTH = psMetadataLookupF32 (&status, recipe, "PEAKS_SMOOTH_NSIGMA"); 31 guess = false; 24 bool statusMajor, statusMinor; 25 float fwhmMajor = psMetadataLookupF32(&statusMajor, recipe, "FWHM_MAJ"); 26 float fwhmMinor = psMetadataLookupF32(&statusMinor, recipe, "FWHM_MIN"); 27 if (statusMajor && statusMinor) { 28 // if we know the FHWM, use that to set the smoothing kernel (XXX allow an optional override?) 29 if (!isfinite(fwhmMajor) || !isfinite(fwhmMinor) || fwhmMajor == 0.0 || fwhmMinor == 0.0) { 30 psWarning("fwhmMajor (%f) or fwhmMinor (%f) is bad!", fwhmMajor, fwhmMinor); 31 } 32 SIGMA_SMTH = 0.5*(fwhmMajor + fwhmMinor) / (2.0*sqrt(2.0*log(2.0))); 33 NSIGMA_SMTH = psMetadataLookupF32 (&status, recipe, "PEAKS_SMOOTH_NSIGMA"); 34 guess = false; 32 35 } else { 33 // if we do not know the FWHM, use the guess smoothing kernel supplied.34 // it is a configuration error if these are not supplied35 SIGMA_SMTH = psMetadataLookupF32 (&status, recipe, "PEAKS_SMOOTH_SIGMA");36 PS_ASSERT (status, NULL);37 NSIGMA_SMTH = psMetadataLookupF32 (&status, recipe, "PEAKS_SMOOTH_NSIGMA");38 PS_ASSERT (status, NULL);39 guess = true;36 // if we do not know the FWHM, use the guess smoothing kernel supplied. 37 // it is a configuration error if these are not supplied 38 SIGMA_SMTH = psMetadataLookupF32 (&status, recipe, "PEAKS_SMOOTH_SIGMA"); 39 PS_ASSERT (status, NULL); 40 NSIGMA_SMTH = psMetadataLookupF32 (&status, recipe, "PEAKS_SMOOTH_NSIGMA"); 41 PS_ASSERT (status, NULL); 42 guess = true; 40 43 } 41 44 // record the actual smoothing sigma
Note:
See TracChangeset
for help on using the changeset viewer.
