Skip to content

Commit

Permalink
Apply posterior angle (#305)
Browse files Browse the repository at this point in the history
* Apply posterior angle

* Hatch fmt
  • Loading branch information
kjy5 authored Feb 1, 2024
1 parent 9f01db8 commit 7d7e359
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ephys_link/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.2.dev1"
__version__ = "1.2.2"
5 changes: 4 additions & 1 deletion src/ephys_link/platforms/new_scale_pathfinder_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,12 @@ def _get_pos(self, manipulator_id: str) -> com.PositionalOutputData:
def _get_angles(self, manipulator_id: str) -> com.AngularOutputData:
manipulator_data = self.query_manipulator_data(manipulator_id)

# Apply PosteriorAngle to Polar to get the correct angle.
adjusted_polar = manipulator_data["Polar"] - self.query_data()["PosteriorAngle"]

return com.AngularOutputData(
[
manipulator_data["Polar"],
adjusted_polar if adjusted_polar > 0 else 360 + adjusted_polar,
manipulator_data["Pitch"],
manipulator_data["Roll"],
],
Expand Down

0 comments on commit 7d7e359

Please sign in to comment.