Skip to content

Commit b52cce7

Browse files
refactor: Remove redundant exit pupil location calculation in Paraxial class
1 parent 5f87da7 commit b52cce7

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

optiland/paraxial.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,17 +172,10 @@ def XPL(self):
172172
float: exit pupil location relative to the image surface
173173
"""
174174
stop_index = self.surfaces.stop_index
175-
num_surfaces = len(self.surfaces.surfaces)
176-
if stop_index == num_surfaces-2:
177-
positions = self.optic.surface_group.positions
178-
loc_relative = positions[-2] - positions[-1]
179-
return loc_relative[0]
180-
181175
z_start = self.surfaces.positions[stop_index]
182176
wavelength = self.optic.primary_wavelength
183177
y, u = self._trace_generic(0.0, 0.1, z_start, wavelength,
184178
skip=stop_index+1)
185-
186179
loc_relative = -y[-1] / u[-1]
187180
return loc_relative[0]
188181

0 commit comments

Comments
 (0)