Skip to content

Commit 7d7e359

Browse files
authored
Apply posterior angle (#305)
* Apply posterior angle * Hatch fmt
1 parent 9f01db8 commit 7d7e359

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/ephys_link/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.2.2.dev1"
1+
__version__ = "1.2.2"

src/ephys_link/platforms/new_scale_pathfinder_handler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,12 @@ def _get_pos(self, manipulator_id: str) -> com.PositionalOutputData:
184184
def _get_angles(self, manipulator_id: str) -> com.AngularOutputData:
185185
manipulator_data = self.query_manipulator_data(manipulator_id)
186186

187+
# Apply PosteriorAngle to Polar to get the correct angle.
188+
adjusted_polar = manipulator_data["Polar"] - self.query_data()["PosteriorAngle"]
189+
187190
return com.AngularOutputData(
188191
[
189-
manipulator_data["Polar"],
192+
adjusted_polar if adjusted_polar > 0 else 360 + adjusted_polar,
190193
manipulator_data["Pitch"],
191194
manipulator_data["Roll"],
192195
],

0 commit comments

Comments
 (0)