Get small data.
()
| 604 | |
| 605 | @pytest.fixture |
| 606 | def short_raw_epochs(): |
| 607 | """Get small data.""" |
| 608 | raw = read_raw_fif(raw_fname).crop(0, 5).load_data() |
| 609 | # some gymnastics here because tests fail if the channels get out of order... |
| 610 | picks = raw.ch_names[::10] + ["EOG 061", "MEG 1531", "MEG 1441", "MEG 0121"] |
| 611 | raw.pick(list(filter(lambda ch: ch in picks, raw.ch_names))) |
| 612 | assert "eog" in raw |
| 613 | raw.del_proj() # avoid warnings |
| 614 | raw.set_annotations(Annotations([0.5], [0.5], ["BAD"])) |
| 615 | raw.resample(100) |
| 616 | # XXX This breaks the tests :( |
| 617 | # raw.info['bads'] = [raw.ch_names[1]] |
| 618 | # Create epochs that have different channels from raw |
| 619 | events = make_fixed_length_events(raw) |
| 620 | picks = pick_types(raw.info, meg=True, eeg=True, eog=False)[:-1] |
| 621 | epochs = Epochs( |
| 622 | raw, |
| 623 | events, |
| 624 | None, |
| 625 | tmin, |
| 626 | tmax, |
| 627 | picks=picks, |
| 628 | baseline=(None, 0), |
| 629 | preload=True, |
| 630 | proj=False, |
| 631 | ) |
| 632 | assert len(epochs) == 3 |
| 633 | epochs_eog = Epochs( |
| 634 | raw, |
| 635 | epochs.events, |
| 636 | event_id, |
| 637 | tmin, |
| 638 | tmax, |
| 639 | picks=("meg", "eog"), |
| 640 | baseline=(None, 0), |
| 641 | preload=True, |
| 642 | ) |
| 643 | return raw, epochs, epochs_eog |
| 644 | |
| 645 | |
| 646 | @pytest.mark.slowtest |
nothing calls this directly
no test coverage detected