Skip to content

find_peak_()

jamesjun edited this page Dec 18, 2017 · 12 revisions

Find turning points that exceed the threshold. If P.nneigh_min_detect>0, the number of consecutive points below the threshold must be greater than one. For example, the figure below has three consecutive points below the threshold thus it will be detected if P.nneigh_min_detect=1 or 2. This is turned off by default (P.nneigh_min_detect = 0).

Syntax

  • viSpk1 = find_peak_(vrWav1, thresh1, nneigh_min)

Input

  • vrWav1: filtered trace
  • thresh1: spike detection threshold (referenced from P.vnThresh_site).
  • nneigh_min: Minimum nearest neighbors. If 1, there must be at least two consecutive points below the threshold. If 2, there must be at least three consecutive points below the threshold (default: 0).

Output

  • viSpk1: Spike times (at the peak)

See also

detect_spikes_(), spikeDetectSingle_fast_(), nneigh_min_detect

Clone this wiki locally
You can’t perform that action at this time.