You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need at least one complete session for widefield and two photon where we have both the ViRMEN data and the eyetracking data with the synchronised timestamps to make sure the behavior times are set correctly
Currently we have an example for eyetracking and timestamps for a session where we have no imaging data (Cherry_20230801_30hz)
Theoretically "im_frame_timestamps" should match each eye tracking frame to the behavioral clock in seconds, and "behav_trial_by_im_frame" corresponds each frame to the trial the mouse is performing.
"position_by_im_frame" and "velocity_by_im_frame" find all the ViRMEN iterations corresponding to each eyetracking frame and store the average [x y theta] position/velocity by frame.
Unfortunately, there is no eyetracking data recorded for the sessions Chicken_TowersTaskSwitchEasy_Session_20230419_105733 (widefield), and eyetracking has not been set up with two-photon yet.
But I will ask Keith to share the wf data for this session Cherry_20230802 with its pose and sync data from eye tracking attached below. Thank you so much!
The folder is empty, sent the email to notify them about it.
ViRMEN
How to adjust trial times?
Re. Q3 – Since the behavioral and widefield data are collected on two separate computers at different sampling rate, syncing the two data streams involves a few steps of down sampling and aligning the speed of the two computer clocks. I went back and saved the final outputs of behavior-widefield time syncing under the session folder of a widefield recording as ‘wf_behav_sync.mat’. Within this .mat, you’ll find various conversions between widefield frames and virmen iterations that would allow you to sync behavioral data with widefield recordings. There are a few things worth some attention here: 1) im_frame_by_behav_iter stores 1-indexed widefield frames by virmen iteration. It typically starts with some -1s, this is because the acquisition of widefield frames is triggered by virmen, though on a separate computer, therefore there will always be a few virmen iterations without widefield frames. 2) In order to empirically compute the ratio between the speed of the two computer clocks, we need to end the widefield recording before the behavioral session (I can elaborate if the details are relevant). The field ‘behav_has_all_wf_frames’ indicates if the widefield session is entirely contained within the behavioral session and the field ‘last_behav_wf_frame’ indicate the last widefield frame within the behavioral session. In the case where the session is terminated in the correct order (widefield -> behavior), behave_has_all_wf_frames = 1 and last_behav_wf_frame will be the last widefield frame. If the session is terminated in the incorrect order (behavior -> widefield), behave_has_all_wf_frames = 0 and last_behav_wf_frame will be the last widefield frame before the behavioral session was terminated and all the subsequent widefield frames will have no corresponding behavioral data. 3) In the case where the session is terminated in the correct order, there will be virmen iterations not associated with any widefield frames at the end of the session. There is a bug in logging im_frame_by_behav_iter where all the virmen iterations after the widefield recording has been terminated are assigned to the last frame. We haven’t fixed this because it will involve repopulating all the already synced sessions. It is safe to assume only 12 of them actually took place during the exposure of the last widefield frame given the widefield and virmen sampling rates. In terms of aligning behavior with widefield recording and then partitioning everything down to trials, you could down sample behavioral data by virmen iteration to widefield frame rate and then partition to trials using behave_trial_by_im_frame.
"start_time": denotes the start time of each trial in seconds relative to the global session start time
currently using the "StartOfTrial" column from .mat file
"stop_time": denoted the end time of each trial in seconds relative to the global session start time
currently using the "EndOfTrial" column from the .mat file
We received the synchronised timestamps to use for setting the behavior timestamps (sync_data.mat), this file contains an "im_frame_timestamps" that contains the timestamps for the eye tracking data that are relative to the imaging time.
Is it sufficient to shift the times of the trials by the aligned start time of the behavior?
We need an actual example of synchronised behavior timestamps where we have the matching imaging session, together with the ViRMEN output, this is the only way to make sure we are setting the timestamps correctly across behavior.
What is the reference frame for Position?
For the position, our convention across tasks and mazes is that position (0,0) is the start of the "sample" region (also referred to as the "cue" region) (note that this is not the position where the mouse starts each trial, which varies by maze and task).
One of the shared ViRMEN files an "optoVoltageOut" field "JsCheddarGeese_TowersTaskSwitchEasy_Session_20230522_151257" which ought to have a corresponding widefield imaging data (not shared with us), what is this data, should this be added to the NWB file?
Stimulation
We need to reconstruct the time series of stimulation, where the first dimension is frame time ("absoluteTime" from XML) and the second dimension is the number of cells that are being stimulated.
To reconstruct the order of stimulation from the mark points xml files, we need to make sure that we are processing the files correctly:
- can we assume the order of stimulation in each xml follows the order of "PVGalvoPointElement" tags (in each element, there are 10 cells that are stimulated)?
- "InitialDelay" is not increasing (for the first 10 cells (group 1) it is "15000," then it is "3" (group 2), then it is "3" (group 3)
- if 10 cells are stimulated at a time, then we can calculate the duration of each "round" and add it to the next group
Keep track final questions and missing metadata for the Pinto lab:
Subject metadata
Imaging session examples
Behavior
Currently we have an example for eyetracking and timestamps for a session where we have no imaging data (
Cherry_20230801_30hz
)ViRMEN
We received the synchronised timestamps to use for setting the behavior timestamps (sync_data.mat), this file contains an "im_frame_timestamps" that contains the timestamps for the eye tracking data that are relative to the imaging time.
We need an actual example of synchronised behavior timestamps where we have the matching imaging session, together with the ViRMEN output, this is the only way to make sure we are setting the timestamps correctly across behavior.
Stimulation
We need to reconstruct the time series of stimulation, where the first dimension is frame time ("absoluteTime" from XML) and the second dimension is the number of cells that are being stimulated.
To reconstruct the order of stimulation from the mark points xml files, we need to make sure that we are processing the files correctly:
Metadata for ndx-holographic-stimulation
PatternedOptogeneticStimulusSite
SpatialLightModulator
LightSource (Laser properties)
The text was updated successfully, but these errors were encountered: