Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
rafael-fuente committed Jul 5, 2022
1 parent b5bbe5f commit 251b603
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions diffractsim/polychromatic_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,19 @@ 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)
M_abs = bd.abs(M)

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)

Expand Down

0 comments on commit 251b603

Please sign in to comment.