Test that field mapping can be done with CTF data.
()
| 44 | |
| 45 | @testing.requires_testing_data |
| 46 | def test_field_map_ctf(): |
| 47 | """Test that field mapping can be done with CTF data.""" |
| 48 | raw = read_raw_fif(raw_ctf_fname).crop(0, 1) |
| 49 | raw.apply_gradient_compensation(3) |
| 50 | events = make_fixed_length_events(raw, duration=0.5) |
| 51 | evoked = Epochs(raw, events).average() |
| 52 | evoked.pick(evoked.ch_names[:50]) # crappy mapping but faster |
| 53 | # smoke test - passing trans_fname as pathlib.Path as additional check |
| 54 | # set origin to "(0.0, 0.0, 0.04)", which was the default until v1.12 |
| 55 | # estimating origin from "auto" impossible due to missing digitization points |
| 56 | make_field_map( |
| 57 | evoked, |
| 58 | trans=Path(trans_fname), |
| 59 | subject="sample", |
| 60 | subjects_dir=subjects_dir, |
| 61 | origin=(0.0, 0.0, 0.04), |
| 62 | ) |
| 63 | |
| 64 | |
| 65 | def test_legendre_val(): |
nothing calls this directly
no test coverage detected