Bugfix: accept contained energy as percentage

This commit is contained in:
Lukas Klass 2020-05-11 13:51:08 +02:00
parent ef825ec43b
commit ce0ae58f29

View File

@ -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