Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_frame_rate() FIX #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions utils2p/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,12 +371,12 @@ def get_frame_rate(self):
Returns the frame rate for a given experiment metadata.
When the frame rate is calculated flyback frames and
steps in z are not considered frames.

Returns
-------
frame_rate : float
Frame rate of the experiment.

Examples
--------
>>> import utils2p
Expand All @@ -387,9 +387,12 @@ def get_frame_rate(self):
frame_rate_without_flybacks = float(
self.get_metadata_value("LSM", "frameRate"))
flyback_frames = self.get_n_flyback_frames()
number_of_slices = self.get_n_z()

enable_z_stage = float(self.get_metadata_value("ZStage", "enable"))
number_of_slices = self.get_n_z() if enable_z_stage else 0

return frame_rate_without_flybacks / (flyback_frames +
number_of_slices)
number_of_slices)

def get_width(self):
"""
Expand Down