Skip to content

Commit

Permalink
Merge pull request #640 from mperrin/fix_float_comparison
Browse files Browse the repository at this point in the history
fix float comparison bug for non-square subarrays
  • Loading branch information
mperrin authored Oct 1, 2024
2 parents aea16fe + 111708e commit 3a83d51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion poppy/poppy_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ def _propagate_mft(self, det):

if not np.isscalar(self.pixelscale.value):
# check for rectangular arrays
if self.pixelscale[0] == self.pixelscale[1]:
if np.isclose(self.pixelscale[0], self.pixelscale[1]):
self.pixelscale = self.pixelscale[0]
# we're in a rectangular array with same scale in both directions, so treat pixelscale as a scalar
else:
Expand Down

0 comments on commit 3a83d51

Please sign in to comment.