MCPcopy
hub / github.com/mne-tools/mne-python / test_find_eog

Function test_find_eog

mne/preprocessing/tests/test_eog.py:17–39  ·  view source on GitHub ↗

Test find EOG peaks.

()

Source from the content-addressed store, hash-verified

15
16
17def test_find_eog():
18 """Test find EOG peaks."""
19 ch_name = "EOG 061"
20 raw = read_raw_fif(raw_fname)
21 raw.set_annotations(Annotations([14, 21], [1, 1], "BAD_blink"))
22
23 events = find_eog_events(raw, ch_name=ch_name)
24 assert len(events) == 4
25 assert not all(events[:, 0] < 29000)
26
27 events = find_eog_events(raw, reject_by_annotation=True, ch_name=ch_name)
28 assert all(events[:, 0] < 29000)
29
30 # threshold option
31 events_thr = find_eog_events(raw, thresh=100e-6, ch_name=ch_name)
32 assert len(events_thr) == 5
33
34 # test different ways to specify the EOG channel(s)
35 events = find_eog_events(raw, ch_name=None)
36 assert len(events) == 4
37
38 events = find_eog_events(raw, ch_name=["EEG 060", "EOG 061"])
39 assert len(events) == 4

Callers

nothing calls this directly

Calls 4

read_raw_fifFunction · 0.90
AnnotationsClass · 0.90
find_eog_eventsFunction · 0.90
set_annotationsMethod · 0.45

Tested by

no test coverage detected