Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to flip sync events and remove extra sync events. #2

Merged
merged 4 commits into from
Jul 19, 2024

Conversation

ZhixiaoSu
Copy link
Collaborator

@ZhixiaoSu ZhixiaoSu commented Jul 12, 2024

NP2.0 recordings on ephys rig 1 has opposite ON and OFF events on sync lines on Probe stream and NIDAQ stream, which is probably caused by a flipped sync line.

This is reflected by the distribution of difference between when first 'ON' sync event happens on these two lines: (Compare AP_start and NI_start), They are always around 500ms
image (15)
And this difference goes away when we look at both 'ON' events and 'OFF' events

image (16)

Other than correcting the hardware connection, to process older data, we need added one option to flip NI stream's sync events when the sync signal is flipped.

In addition, if number of sync events are not equal on two streams, one extra event will be removed from the stream with more events.
If relative time of first event on two streams are similar enough (<0.1s), the last event will be removed.
If they are far apart enough (>0.1, usually close to 1s), the first event will be removed.

@ZhixiaoSu ZhixiaoSu marked this pull request as ready for review July 16, 2024 16:22
@ZhixiaoSu ZhixiaoSu changed the title Added option to flip sync events. Added option to flip sync events and remove extra sync events. Jul 16, 2024
@jsiegle jsiegle merged commit 432af8b into main Jul 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants