File: test_peak_finder.py

package info (click to toggle)
python-mne 0.8.6%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 87,892 kB
  • ctags: 6,639
  • sloc: python: 54,697; makefile: 165; sh: 15
file content (10 lines) | stat: -rw-r--r-- 279 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
from numpy.testing import assert_array_equal

from mne.preprocessing.peak_finder import peak_finder


def test_peak_finder():
    """Test the peak detection method"""
    x = [0, 2, 5, 0, 6, -1]
    peak_inds, peak_mags = peak_finder(x)
    assert_array_equal(peak_inds, [2, 4])