Closed wbwakeman closed 3 years ago
Additional details per @corbennett
It seems that the monitor lag (time between vsync signal for a flip and when the display actually updates) can change over the course of a session. So my code, which basically just finds one monitor lag value and applies this to the vsyncs to get the times when the frames actually appeared, is insufficient. I know the visual coding pipeline used the photodiode signals and interpolated the actual frame times. I haven't tried running their code on our experiments yet, but I'm not optimistic it would work out of the box since we're concatenating multiple stimuli (there will be long gaps between diode transitions between stimuli, also camstim inserts a rapid toggle of the diode at the beginning of every stimulus).
The code for using photodiode signals to interpolate frame times for the Visual Coding Neuropixels (VCN) project can be found at: https://github.com/AllenInstitute/ecephys_etl_pipelines/blob/7c0f238bf1f834bf4883a96e327f25bb2ce8d2a9/src/ecephys_etl/data_extractors/ecephys_sync_dataset.py#L58
It may make sense to move the VCN extract_frame_times_from_photodiode()
implementation into ecephys_etl_pipelines
repository this will have the following benefits:
1) Allow person taking on ticket to familiarize themselves with existing implementation.
2) Allow for refactor/re-use opportunities when formulating the solution for the Visual Behavior Neuropixel (VBN) project.
Tasks:
extract_frame_times_from_photodiode()
functionality from AllenSDK into ecephys_etl_pipelines
extract_frame_times_from_photodiode()
so we will be confident that our implementation is doing the right thing.I have read the design, and @njmei has answered all of my questions and addressed all of my comments. LGTM.
The design document looks fine to me
Design document for the issue in question: http://confluence.corp.alleninstitute.org/display/IT/Addressing+variable+monitor+lag+in+sync+data+for+Visual+Behavior+Neuropixels
Corbett has identified an issue with variable monitor timing in the Visual Behavior Neuropixels sync file. Need to understand the issue and design a fix for it.
This will affect any function where we need to get timing information about monitor events.
Validation criteria: