waveform_features - Functions for computing waveform features like signal-to-noise ratio, etc.

Features of waveforms (e.g waveform_snr).

elephant.waveform_features.waveform_snr(spiketrain)[source]

Return the signal-to-noise ratio of the waveforms of a SpikeTrain.

Signal-to-noise ratio is defined as the difference in mean peak-to-trough voltage divided by twice the mean SD. The mean SD is computed by measuring the SD of the spike waveform over all acquired spikes at each of the sample time points of the waveform and then averaging [1].

Parameters:
spiketrain : Neo SpikeTrain

The spike times with attached waveforms.

Returns
——-
snr : float

signal-to-noise ratio according to Hatsopoulos 2007

Raises:
ValueError

If spiketrain has no attached waveforms.

References

[1] Hatsopoulos, N. G., Xu, Q. & Amit, Y.
Encoding of Movement Fragments in the Motor Cortex. J. Neurosci. 27, 5105–5114 (2007).