From f1417339082a7ba150049f2ec683a434195eb8dc Mon Sep 17 00:00:00 2001 From: LukasK13 Date: Thu, 18 Jun 2020 09:04:17 +0200 Subject: [PATCH] Bugfix: calculate center index after rescaling --- 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 e34a965..fc0eb49 100644 --- a/esbo_etc/classes/psf/Zemax.py +++ b/esbo_etc/classes/psf/Zemax.py @@ -212,7 +212,7 @@ class Zemax(IPSF): # Oversample the reduced mask mask_red_os = self._rebin(mask_red, self.__osf).view(PixelMask) # Calculate the new PSF-center indices of the reduced mask - psf_center_ind = [x * self.__osf for x in psf_center_ind] + psf_center_ind = [(x + 0.5) * self.__osf - 0.5 for x in psf_center_ind] # Get PSF values or calculate them if not available if self.__psf_os is not None and self.__center_point_os is not None and self.__psf_osf is not None: