-
Notifications
You must be signed in to change notification settings - Fork 198
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 save waveforms from spikeinterface to NWB? #3615
Comments
Hi @khl02007! You can use the
You can also write to an open nwbfile using the |
Clarification for people that were confused like me: Note that this adds the means and the stds of the waveforms for each units as @alejoe91 mentions above. It does not add all the waveforms which is probably a good idea since that will make the NWB explode in size and anyway you can quickly extract each of the individual waveforms on the fly as you have the timings on the units table. |
Hi Heberto (@h-mayorquin ) One question, which might be more related to NWB than spikeinterface. Once that the UNITS table is created (without the waveforms column). How can we retrieve the individual waveforms? The NWB.electricalseries are likely stored in the acquisition (i.e. raw recording) or ephys.FilteredEphys (i.e. spikeinterface preprocessed recording) containers. I searched for some example code/function but didn't find any. Thanks |
Hi @borrepp Individual waveforms are not saved. Only the mean and std of the waveforms are added as columns. |
Hi @alejoe91 |
@alejoe91 @h-mayorquin Thanks so much! I think it's worth having an option to save all the waveforms and not just the mean. For example, many quality metrics require all the waveforms (e.g. to project onto PC space). It would be too time-consuming to re-extract waveforms every time you want to compute a different metric. The sorting analyzer saves waveforms to disk anyway; maybe there could be an option to save it in NWB format? |
Probably worth porting this issue over to The "problem" is that by default the waveforms are only extracted on a subset of spikes, and I think that NWB would require waveforms for all spikes. |
Load the NWBRecording and the NWBSorting and create a sorting analyzer then you can use the extract waveforms functionality of the analyzer. |
Is there a function to save waveforms in spikeinterface (SortingAnalyzer extension or older WaveformExtractor) to NWB format?
The text was updated successfully, but these errors were encountered: