Skip to content

Commit

Permalink
Update apertures.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kklmn committed Aug 16, 2023
1 parent b3a07eb commit 5c1a71d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions xrt/backends/raycing/apertures.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ def set_orientation(self, x=None, z=None):
def set_optical_limits(self):
"""For plotting footprint images with the envelope aperture."""
for akind, d in zip(self.kind, self.opening):
td = float(d) # otherwise is of type 'numpy.float64' and is
# raycing.is_sequence(d) returns True which is not expected.
td = float(d) # otherwise is of type 'numpy.float64' and
# raycing.is_sequence(d) returns True which is unexpected.
if akind.startswith('l'):
self.limOptX[0] = td
elif akind.startswith('r'):
Expand Down Expand Up @@ -268,10 +268,10 @@ def propagate(self, beam=None, needNewGlobal=False):
goodN = lo.state > 0
try:
if self.spotLimits:
self.spotLimits[0] = min(self.spotLimits[0], lo.x[goodN].min())
self.spotLimits[1] = max(self.spotLimits[1], lo.x[goodN].max())
self.spotLimits[2] = min(self.spotLimits[2], lo.z[goodN].min())
self.spotLimits[3] = max(self.spotLimits[3], lo.z[goodN].max())
self.spotLimits = [min(self.spotLimits[0], lo.x[goodN].min()),
max(self.spotLimits[1], lo.x[goodN].max()),
min(self.spotLimits[2], lo.z[goodN].min()),
max(self.spotLimits[3], lo.z[goodN].max())]
else:
self.spotLimits = [lo.x[goodN].min(), lo.x[goodN].max(),
lo.z[goodN].min(), lo.z[goodN].max()]
Expand Down

0 comments on commit 5c1a71d

Please sign in to comment.