Open aghatpande opened 6 months ago
Let me explain the process prior to these plots. I am running SpikeInterface v 0.99.1 in python 3.10.13 in a Jupyter notebook.
units_need_splitting=[56,121,99,140,100,71] # manually selected with spikeinterface-gui after automated quality metrics based filtering we_split_needed = we_curated.select_units(unit_ids=units_need_splitting) amplitudes = si.compute_spike_amplitudes(we_split_needed, outputs="by_unit", load_if_exists=True)
fig, ax = plt.subplots(3, 2, figsize=(10, 10)) ax = ax.ravel() for i, unit_id in enumerate(units_need_splitting): amplitudes_i = amplitudes[0][unit_id] ax[i].hist(amplitudes_i, bins=50) ax[i].set_title(f"Unit {unit_id}") plt.tight_layout() plt.show()
The extensions available for the waveform extractor are: ['template_metrics', 'similarity', 'principal_components', 'spike_amplitudes', 'correlograms', 'spike_locations', 'unit_locations', 'noise_levels', 'quality_metrics'] `
Hi!
We have some experimental functions for auto-splitting, but they are not fully intergrated into the main code-base. Maybe @samuelgarcia can comment more.
You could try to write your own function to get a set of spike indices belonging to different clusters in a unit.
Something along these lines:
indices_list = split_unit(waveform_extractor, unit_id_to_split)
If indices_list
is a list of indices belonging to different sub-clusters, you can then use the curation.SplitUnitSorting
as follows:
from spikeinterface.curation import SplitUnitSorting
sorting_split = SplitUnitSorting(sorting, unit_id=unit_id_to_split, indices_list=indices_list)
This would return a new sorting object. Once you are done with all the splits, you can re-extract waveforms.
Yes exactly. In curation we have some function for auto_merge but no function for auto split. The plan is to add this at some point!!
We have very low level for splitting but at sorting component so it do not work withwaveforms extractor at the momeent.
This could be added in the next release. Let keep this issue open, but it will be open for a while.
I did try fitting mix of gaussians but am having trouble with that. Would it be reasonable to split these units by eye since at least some of them are quite obvious? Thanks for your help in advance.