AllenInstitute / ecephys_etl_pipelines

Pipelines and modules for processing extracellular electrophysiology data
Other
1 stars 2 forks source link

correcting get_vsyncs output when first edge is falling #24

Closed corbennett closed 2 years ago

corbennett commented 2 years ago

https://github.com/AllenInstitute/ecephys_etl_pipelines/blob/176a302c1b35255f7e1b1a1ccae0ff2858ba15c5/src/ecephys_etl/modules/vbn_create_stimulus_table/create_stim_table.py#L25

Sometimes the vsync line starts out high at the beginning of a session. In these cases, the first edge in the sync file is a falling edge, but this is not a stimulus vsync (just the line getting reset to low). Code that calls this function assumes that each of these falling edges corresponds to a stimulus frame (for example here: https://github.com/AllenInstitute/ecephys_etl_pipelines/blob/176a302c1b35255f7e1b1a1ccae0ff2858ba15c5/src/ecephys_etl/modules/vbn_create_stimulus_table/create_stim_table.py#L371), which can cause unwanted one frame offsets.

It would be better to return only the falling edges that are preceded by rising edges.

wbwakeman commented 2 years ago

Addressed by #20