Set num_histogram_bins in amplitude_cutoff (back) to 100#4415
Conversation
|
If we go messing with AmplitudeCutoff and I don't get all NaN's I'll have no way to know my code is working :P Isn't our default for |
Agreed! But on a related note we should maybe increase random spikes to get better estimates of templates #4389 |
|
For what is worth, I use: sa.create_sorting_analyzer(..., num_spikes_for_sparsity=500) # default=100
analyzer.compute('random_spikes', max_spikes_per_unit=1000) # default 500
analyzer.compute('quality_metrics', metric_params={
'amplitude_cutoff': {'amplitudes_bins_min_ratio': 7.5}}) #i.e., 750 spikes, default is 5Increasing the random_spikes to 1000 by default seems reasonable. |
#4353 changed the default
num_histogram_binsin AmplitudeCutoff from 100 to 200 to get a more granular histogram/estimate.spikeinterface/src/spikeinterface/metrics/quality/misc_metrics.py
Line 1034 in 797f0e8
But given the default
amplitudes_bins_min_ratio=5, any cell with less than 1000 spikes will return amplitude_cutoff = NaN. That is (I think?) too big a hurdle (a unit with 0.1Hz firing rate will require 2.8 hours to spike 1000 times).Assuming 500 spikes are enough to model the amplitude distribution, I change it back to 100 here. I also change the default value on the low-level
amplitude_cutoff()to match this default.EDIT: Even if we don't think 500 spikes are enough to model the distribution, the right parameter to change would be
amplitudes_bins_min_ratioand notnum_histogram_binsas we would rather have more samples per bin (lower variance)