Skip to content

Commit

Permalink
fix zero-ing of motion group
Browse files Browse the repository at this point in the history
  • Loading branch information
rocco8773 committed Oct 18, 2024
1 parent e594673 commit 404fcc2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bapsf_motion/actors/motion_group_.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,8 +976,12 @@ def set_zero(self, axis: Optional[int] = None):
# transform does not necessarily map the motion space zero to the
# zero of the probe drive space
#
if isinstance(axis, int):
raise TypeError(f"Expected axis to be of type int, got type {type(axis)}.")
if axis is None:
pass
elif not isinstance(axis, int):
raise TypeError(
f"Expected axis to be of type int or None, got type {type(axis)}."
)
elif axis < 0 or axis > self.drive.naxes:
raise ValueError(
f"Axis index {axis} is out of range [0, {self.drive.naxes-1}]."
Expand Down

0 comments on commit 404fcc2

Please sign in to comment.