Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
kif authored Dec 8, 2023
1 parent 82b6fd6 commit 58db30b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pyFAI/detectors/_dectris.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ def calc_cartesian_positions(self, d1=None, d2=None, center=True, use_cython=Tru
if self.shape:
if (d1 is None) or (d2 is None):
r1, r2 = self._calc_pixel_index_from_orientation(center)
d1 = expand2d(r1, self.shape[1]+(0 if center else 1), False)
d2 = expand2d(r2, self.shape[0]+(0 if center else 1), True)
delta = 0 if center else 1
d1 = expand2d(r1, self.shape[1] + delta, False)
d2 = expand2d(r2, self.shape[0] + delta, True)
else:
d1, d2 = self._reorder_indexes_from_orientation(d1, d2, center)

Expand Down

0 comments on commit 58db30b

Please sign in to comment.