Closed chrishalcrow closed 4 months ago
When you get_data by unit for amplitudes, the sampling is incorrect for multi-segment recordings.
get_data
Consider the following code:
import spikeinterface.full as si recording, sorting = si.generate_ground_truth_recording(durations=[10,10], seed=1205) analyzer = si.create_sorting_analyzer(recording=recording, sorting=sorting) analyzer.compute(['random_spikes', 'templates', 'spike_amplitudes']) si.plot_amplitudes(analyzer, segment_index=0) si.plot_amplitudes(analyzer, segment_index=1)
The output for the first plot is
This looks good: each unit has amplitudes based around a common mean.
The second plot looks like this
This doesn't look good. The amplitudes for each unit are scattered randomly.
Issue is in _get_data function for ComputeSpikeAmplitudes. I'm working on a fix.
_get_data
ComputeSpikeAmplitudes
oups. Muts be me during the refactoring.
When you
get_data
by unit for amplitudes, the sampling is incorrect for multi-segment recordings.Consider the following code:
The output for the first plot is
This looks good: each unit has amplitudes based around a common mean.
The second plot looks like this
This doesn't look good. The amplitudes for each unit are scattered randomly.
Issue is in
_get_data
function forComputeSpikeAmplitudes
. I'm working on a fix.