Closed corbennett closed 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.
Addressed by #20
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.