-
Notifications
You must be signed in to change notification settings - Fork 3
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
Handle non-ptp datasets #53
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
==========================================
+ Coverage 91.34% 92.14% +0.80%
==========================================
Files 20 24 +4
Lines 2056 2241 +185
==========================================
+ Hits 1878 2065 +187
+ Misses 178 176 -2
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't comment directly on the trouble lines because not changed:
When going through the epochs here (lines 650-674)
for epoch in session_df.epoch.unique():
try:
position_tracking_filepath = session_df.loc[
np.logical_and(
session_df.epoch == epoch,
session_df.file_extension == ".videoPositionTracking",
)
].full_path.to_list()[0]
# find the matching hw timestamps filepath
video_index = position_tracking_filepath.split(".")[-2]
video_hw_df = session_df.loc[
np.logical_and(
session_df.epoch == epoch,
session_df.file_extension == ".cameraHWSync",
)
]
position_timestamps_filepath = video_hw_df[
[
full_path.split(".")[-3] == video_index
for full_path in video_hw_df.full_path
]
].full_path.to_list()[0]
except IndexError:
position_tracking_filepath = None
The exception also needs an assertion error for the non-ptp case with no cameraHWSync files. May be better to use if ptp_enabled
instead of the try except.
In the except case, still need to define something for position_timestamps_filepath
, otherwise get undefined errors in the later lines. I'm not sure which is the correct file (if any) that should be going into get_position_timestamps()
in the non-ptp case
Fixes #38
@samuelbray32 can you review/test?