Closed pauladkisson closed 9 months ago
Based on today's discussion, the alignment code in align.py
, and the output .parquet tables (photometry_df.parquet
and photometry_df_v2.parquet
), I've gained the following insights about the alignment process:
The raw video timestamps (depth_ts.txt
) are treated as ground-truth, and the photometry data is simultaneously aligned and downsampled (6kHz --> 30Hz) to these.
The processed timestamps in the .parquet tables (dlight_raw_data/dlight_photometry_processed_full.parquet
) are interpolated to account for dropped frames --> this is why the processed data ends up being longer than the original videos. Behavioral syllables are also interpolated, but the kinematic data is filled with NaNs, which seems reasonable.
The alignment process drops a substantial amount of fiber photometry data (~5mins for the example I'm working with) --> these are filled with NaNs in the processed .parquet tables
The processed .parquet table for the example session I am using matches photometry_df.parquet
rather than photometry_df_v2.parquet
--> I would guess that this is hodgepodge across sessions.
As a result, I see 2 main problems in the alignment process:
How to align the 6kHz raw FP between the 30Hz aligned points?
How to align the tails not accounted for in the current alignment process?
And I can propose 2 initial (relatively naive) solutions:
@wingillis, I would love to hear your thoughts on solutions as well as double-checking my understanding here.
Proposed Solution:
Raw video timestamps are not currently aligned, but Datta Lab has some process to align them with IR LED pulses copied to the TDT.