spikeinterface
spikeinterface copied to clipboard
Allow `export_report` to run without waveforms
Small edit to export_report so that it will generate a report without waveforms.
When we're being speedy, we often don't compute or don't copy over waveforms. This PR just changes export_report so that it does/doesn't include the UnitWaveformDensityMapWidget if the sorting_analyzer does/doesn't have waveforms computed.
A unit report without waveforms:
computed using
import spikeinterface.full as si
rec, sort = si.generate_ground_truth_recording()
sa = si.create_sorting_analyzer(recording=rec, sorting=sort)
sa.compute(["random_spikes", "templates", "spike_amplitudes", "correlograms", "template_similarity"])
si.export_report(sorting_analyzer=sa, output_folder="my_report")
I think this is an improvement. Another request we should think about is to have more flexibility in selecting what to plot in general. There are complaints about the slowness of making the summary when you only want some features to be saved. So something like this could be extended to help speed things up for people.
Good idea. thanks Chris.
I think this is an improvement. Another request we should think about is to have more flexibility in selecting what to plot in general. There are complaints about the slowness of making the summary when you only want some features to be saved. So something like this could be extended to help speed things up for people.
Mmm, good idea. So at the moment we include 5 widgets. Your suggestion would be to allow the user to select which ones they'd like, and we format the report appropriately? Sounds doable (and extendable for other widgets!) in another PR.
in another PR.
agreed. :)
Thanks @JoeZiminski - will take a look on Monday!
All updated - also fixed a column counting issue that occurred when correlograms and spike_amplitudes were on, but waveforms were off. Also added in a check for template_similarity, which is needed to compute correlograms it seems.
template_similarity, which is needed to compute correlograms it seems.
yeah the correlograms are only calculated for templates deemed similar enough. That's annoyed me in the past, but I understand why it is there.
Hello, could this be merged please(@samuelgarcia )? Just to sum up, here is every possible report output, made from
import spikeinterface.full as si
rec, sort = si.generate_ground_truth_recording(durations=[60])
sa = si.create_sorting_analyzer(recording=rec, sorting=sort)
then...
sa.compute(["random_spikes", "unit_locations","templates","template_similarity"])
sa.compute(["random_spikes", "unit_locations", "templates","template_similarity", "correlograms"])
sa.compute(["random_spikes", "unit_locations", "templates","template_similarity", "waveforms"])
sa.compute(["random_spikes", "unit_locations", "templates","template_similarity", "spike_amplitudes"])
sa.compute(["random_spikes", "unit_locations", "templates", "spike_amplitudes", "correlograms"])
(note: no template similarity => no correlograms!)
sa.compute(["random_spikes", "unit_locations","templates","template_similarity", "waveforms", "correlograms"])
sa.compute(["random_spikes", "unit_locations","templates","template_similarity", "waveforms", "spike_amplitudes"])
sa.compute(["random_spikes", "unit_locations","templates","template_similarity", "waveforms", "correlograms", "spike_amplitudes"])
@chrishalcrow @zm711 I pushed an update that removes the need to compute template_similarity, which is counter-intuituve. In fact, this is only needed for cross-correlograms, but not for auto-correlogram plots.
Tested on my side and works like a charm!
@chrishalcrow @zm711 I pushed an update that removes the need to compute
template_similarity, which is counter-intuituve. In fact, this is only needed for cross-correlograms, but not for auto-correlogram plots.Tested on my side and works like a charm!
Beautiful - works on my side too.