-
Notifications
You must be signed in to change notification settings - Fork 259
Separate sync as its own stream in OpenEphysBinaryRawIO
#1668
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
Separate sync as its own stream in OpenEphysBinaryRawIO
#1668
Conversation
Hello, great! Just for reference: the main application of this is to be able to let NeuroConv deal with sync channels in a nice way. And so that loading sync channels in spikeinterface doesn't mess up the probe object. One possible problem: with this PR in using rec = si.read_openephys('path/to/recording')
>>> ValueError: This reader have several streams:
Names: [np.str_('Record Node 109#Neuropix-PXI-103.ProbeA'), np.str_('CH_SYNC')]
IDs: [np.str_('0'), np.str_('CH_SYNC')].
Specify it from the options above with the 'stream_name' or 'stream_id' arguments whereas before, there was only one stream, so it just used that. So this will break code for people using openephys with just neural and sync streams (e.g. my lab!). Is there a simple way (on the spikeinterface side?) to retain the current default behavior? EDIT: oh, actually making si ignore the sync channel when |
This would also have implications for #1657. In that PR I'm extracting sync edges from SpikeGLX recordings as events, rather than exposing the entire sync stream that is being done here. I don't have a preference for one or the other but I do think the handling/API should be consistent across SGLX and OpenEphys. I can make changes to the other SGLX PR if the extra sync stream has already been agreed upon. |
I think users of this IO would need to provide more feedback to us. I don't use this so I also don't really know the best solution. I think Sam and Heberto have talked the most about this. So maybe Heberto you could summarize more here why you think the sync should be this way. |
It is already exposed there as well. Just as an extra channel when
I think it is fine if we do both. People can extract the synch channel as the TTL analog stream and also as rising and falling event times if they prefer it that way.
That's a good point. We can definitley add code in SpikeInterface to keep this from failing by checking that if there are only two streams and one of them has sync on their name then load the non-sync stream to keep backwards compatibility. The code will be ugly but we can slowly deprecate that. |
I'm going to leave Sam or Alessio to make final decisions on this since they know this IO better than I do. I put in the request so they can get to this and contribute to the decisions. |
Co-authored-by: Alessio Buccino <[email protected]>
More gross |
Fixed. How should we deprecated the Removing that will simplify the code. |
I would keep it for this release and change it in the next one :) |
OK. So I will add a deprecation warning for the next release. |
Added the deprecation. |
I also did the equivalent PR for spikeglx #1683 |
With love for @chrishalcrow
As discussed with @alejoe91 and @samuelgarcia
This PR:
load_sync_trace=True
but throws a deprecation warning (what is neo deprecation policy @zm711?)