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

Mismatch between get_video_timestamps and get_position_timestamps #75

Open
samuelbray32 opened this issue Dec 12, 2023 · 6 comments
Open

Comments

@samuelbray32
Copy link
Collaborator

Found a nwb file conversion where the position timestamps came out reasonable, but the video file object's timestamps were incorrect due to strange ptp-calibration during the experiment.
e.g. the HWTimestamp in this dataframe corresponds with a time in the 1980's

file = "/stelmo/sc4712/rats/SC1001/raw/20230905/20230905_SC1001_02_r1.1.videoTimeStamps.cameraHWSync"
data_file = pd.DataFrame(
        readTrodesExtractedDataFile(file)["data"]
    )
data_file
  • We have addressed translating these incorrect timestamps in get_position_timestamps
  • get_video_timestamps doesn't have these same features and takes values directly as reported from .cameraHWSync

Should we try to achieve similar timestamp mapping in the video_timestamp function to resolve this or leave attributed to errors at time of data collection?

@edeno
Copy link
Collaborator

edeno commented Dec 12, 2023

As I recall, the reason for this is that it is just a little trickier to get the correct timestamps for the whole video. It would be nice to have correct, but I'm not sure what the solution is.

@samuelbray32
Copy link
Collaborator Author

Ah I see. There's no guarantee that the video is fully contained within the recorded .rec file's time range.

One option is when the timestamps are obviously incorrect, to use the PosTimestamp value in .cameraHWSync to map to the trodestimestamps in the rec file (similar to the non-ptp case in position tracking). For values that don't map we could put a nan value

@edeno
Copy link
Collaborator

edeno commented Dec 12, 2023

Yeah, that would be an okay solution.

@sharon-chiang
Copy link

Hi @samuelbray32, I was wondering if you might be able to still help with this issue?

@samuelbray32
Copy link
Collaborator Author

@sharon-chiang sorry for delay. Can you try pulling the odd_video_timestamps branch and converting it again?

@edeno
Copy link
Collaborator

edeno commented Mar 18, 2024

@sharon-chiang did any of the fixes work? Should this issue be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants