Test find EOG peaks.
()
| 15 | |
| 16 | |
| 17 | def 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 |
nothing calls this directly
no test coverage detected