From ce0ae58f29d801fb69ba3bb9a64c5c5d3225f985 Mon Sep 17 00:00:00 2001 From: LukasK13 Date: Mon, 11 May 2020 13:51:08 +0200 Subject: [PATCH] Bugfix: accept contained energy as percentage --- esbo_etc/classes/psf/Zemax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esbo_etc/classes/psf/Zemax.py b/esbo_etc/classes/psf/Zemax.py index 58c0bec..5283c54 100644 --- a/esbo_etc/classes/psf/Zemax.py +++ b/esbo_etc/classes/psf/Zemax.py @@ -92,7 +92,7 @@ class Zemax(IPSF): except ValueError: error("Could not convert encircled energy to float.") elif type(contained_energy) in [int, float]: - contained_energy = contained_energy * u.dimensionless_unscaled + contained_energy = contained_energy / 100 * u.dimensionless_unscaled # Calculate the osf for the PSF based on the current resolution of the PSF psf_osf = np.ceil(max(self.__grid_delta) / (2 * self.__pixel_size / self.__osf)).value * 2