From 251b603e1987989d2edf524bbe08dbb03cc45ac8 Mon Sep 17 00:00:00 2001 From: Rafael de la Fuente Date: Tue, 5 Jul 2022 17:27:08 +0200 Subject: [PATCH] Update --- diffractsim/polychromatic_simulator.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/diffractsim/polychromatic_simulator.py b/diffractsim/polychromatic_simulator.py index e1c8e36..4017e02 100644 --- a/diffractsim/polychromatic_simulator.py +++ b/diffractsim/polychromatic_simulator.py @@ -173,6 +173,12 @@ def get_colors_at_image_plane(self, pupil, M, zi, z0, scale_factor = 1): """ + + + for j in range(len(self.optical_elements)): + self.E = self.E * self.optical_elements[j].get_transmittance(self.xx, self.yy, 0) + + # if the magnification is negative, the image is inverted if M < 0: self.E = bd.flip(self.E) @@ -180,10 +186,6 @@ def get_colors_at_image_plane(self, pupil, M, zi, z0, scale_factor = 1): self.E = self.E/M_abs - - for j in range(len(self.optical_elements)): - self.E = self.E * self.optical_elements[j].get_transmittance(self.xx, self.yy, 0) - fft_c = bd.fft.fft2(self.E) c = bd.fft.fftshift(fft_c)