Skip to content

Commit

Permalink
Fixed computation of number of frames of Rotations in Python
Browse files Browse the repository at this point in the history
  • Loading branch information
pariterre committed Mar 12, 2024
1 parent 39c4e7c commit de2b385
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions binding/python3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,11 @@ def __init__(self, swig_header, rotation_info):
"last_frame": self.header.nbAnalogByFrame() * (self.header.lastFrame() + 1) - 1,
}
if rotation_info.hasGroup():
rotation_frame_rate = self.header.frameRate() * rotation_info.ratio()
self._storage["rotations"] = {
"size": rotation_info.used(),
"frame_rate": rotation_frame_rate,
"first_frame": rotation_frame_rate * self.header.firstFrame(),
"last_frame": rotation_frame_rate * (self.header.lastFrame() + 1) - 1,
"frame_rate": self.header.frameRate() * rotation_info.ratio(),
"first_frame": rotation_info.ratio() * self.header.firstFrame(),
"last_frame": rotation_info.ratio() * (self.header.lastFrame() + 1) - 1,
}
self._storage["events"] = {
"size": len(self.header.eventsTime()),
Expand Down

0 comments on commit de2b385

Please sign in to comment.