neurotools.spikes.waveform module

Routines for signal processing with spike waveforms

neurotools.spikes.waveform.realign(snip, pad='zeros')[source]

Realign waveforms to peak. This will rotate the signal contained in snip so that its global maximum lies at len(snip)//2.

Parameters:
  • snip (1D np.float32) – Array containing a spike waveform

  • Parameters (Other)

  • pad (str default 'zero') –

    Padding behavior
    • ”zero”: pad edges with zero

    • ”end”: pad edges with initial/final values

neurotools.spikes.waveform.getFWHM(wf)[source]

Full width half maximum

neurotools.spikes.waveform.getPVT(wf)[source]

peak to valley time

neurotools.spikes.waveform.getWAHP(wf)[source]

Width at half peak

neurotools.spikes.waveform.getPT(wf)[source]

Peak-trough duration

neurotools.spikes.waveform.getPTHW(wf)[source]
neurotools.spikes.waveform.getPHP(wf)[source]
neurotools.spikes.waveform.normalized_waveform(wf)[source]
neurotools.spikes.waveform.is_thin(wf, thr=0.98, time=123)[source]

Determine whether a mean-waveform is a thin spike. Uses amplituce 300 μs post-spike. This procedure was trained on well-isolated cells. See the 20160802_waveform_segmentation notebook for how threshold was derived

neurotools.spikes.waveform.is_thin_pvt(wf, thr=52.0349055393)[source]

Determine whether a mean-waveform is a thin spike. Uses peak-to-valley time

neurotools.spikes.waveform.process(i_f)[source]

Get high-dimensional feature description of data. TODO: remove; how did this even get here?