-
Notifications
You must be signed in to change notification settings - Fork 196
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
Refractory Period Distance? #3567
Comments
Hey @karmenrai2 So if you look here: spikeinterface/src/spikeinterface/qualitymetrics/misc_metrics.py Lines 495 to 497 in d991382
you see the assumption you like failed in using the sliding_rp. You could try using one of our other rp violation metrics which all have their different assumptions (we explain some of the assumptions/math in the docs see: If you need more detail then that you could look in the actual code to see what is happening or ask more questions here :) In general nan would indicate failed assumptions for any of our metrics (for example isolation distance fails if the covariance matrix is singular for a unit). |
Out of curiosity is there a reason you want to do all of this at the low level rather than using the |
Thank you. The ISI violations seemed to work. |
@zm711 Also, how do I obtain this "pandas dataframe" you speak of. |
Hey @karmenrai2, sure. So what you can do with spikeinterface is something like this: recording = si.read_binary(xx)
sorting = si.read_phy(xx)
# binary folder will give you a csv. We also offer a zarr backend which adds compression
analyzer = si.create_sorting_analyzer(sorting, recording, format='binary_folder', folder='where you want to save')
analyzer.compute(['random_spikes', 'waveforms', 'templates', 'noise_levels', 'template_similarity', 'spike_amplitudes', 'principal_components', 'qualitrymetrics']) This will save csv of all the qualitry metrics for you. Otherwise to use the pandas dataframe you would do quality_df = analyzer.get_extension('qualitymetrics').get_data() and the quality_df will be a dataframe of all the values. We have tons of stuff about how to use the analyzer and you can fine tune your analyses for exactly what you need. So I'll share the docs here so take a look if you want to understand what is actually happening. Let us know if you don't understand something. |
When trying this im getitng the error. I proceeded to change it to 'quality_metrics' but then I got this error.
|
That was my typo. Sorry. It is That's a strange error. How are you getting these neurons (ie what sorter and what recording equipment)? |
when calculating refractory period violations, I am getting nan for several of the values. Does this mean there are no violations as I can't see any value with 0 or did the calculation fail and it's inconclusive?
The text was updated successfully, but these errors were encountered: