-
Notifications
You must be signed in to change notification settings - Fork 186
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
How to get sync timestamps from spikeglx and open ephys #3425
Comments
I feel like @alejoe91 is going to need to be the person to comment on this. I don't actually use ephys or any of the event based code in spikeinterface. So just ping this issue if you don't get a response soon! |
Hi @gabrielstine ! You should be able to read the open ephys events with this function:
This will return an Event object, which will allow you to interact with the event data. There can be events from multiple channel ids, which you can retrieve with the
Let me know if you have other questions! |
Thanks @alejoe91. And is there a way to automatically get the timestamps at which the sync channel went high in the spikeGLX data, or do I need to extract this manually? If not, could be nice to have a built-in function that takes the channel as input and returns timestamps. |
You can try the |
@alejoe91 It seems that se does not have read_spikeglx_event module. |
Did you try this?
It's a function and not a module. Can you paste the error you're getting? |
Maybe then you used the SYNC channel (i.e. the 385th signal)? |
Yes, the event was recorded in the SYNC channel. Is there a way to extract events from this channel? |
@alejoe91 I'm still struggling with this, and not seeing anything in the docs. Feels like it should be very easy/simple given how ubiquitous this step is in neuropixels pipelines. To reiterate/clarify, channel 385 receives TTL pulses that are used to synchronize my spikeGLX data to other data streams. I need to extract this signal and find the timepoints at which it went "high." Previously I was using catGT for preprocessing, which does this automatically. Does something like the below exist?
If not, could you walk me through how I would, at the very least, extract the signal on channel 385? I believe this is what @chongtianyifa is asking for as well. |
I see, sorry I misunderstood. @samuelgarcia was planning to work on such automated sync function for spikeGLX, so let's ping him! You can extract the sync channel recording as follows:
Then you can get the sync channel traces and look for rising edges:
|
Thanks Alessio! Appreciate all of the work you guys do. |
Hi Guys,
I have a simple question that I'm having trouble finding the answer to in the documentation. I am recording simultaneously from a neuropixels probe (recorded in spikeGLX) and a DBC probe (recorded in open ephys). I'd like to extract the timestamps of the sync events from each stream and save them as .npy files. In open ephys, the sync signal is a ttl pulse fed into digital input 1. I imagine there are straightforward functions for extracting and saving these, but I can't find them!
Thanks!
Gabe
The text was updated successfully, but these errors were encountered: