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

Function test_field_map_ctf

mne/forward/tests/test_field_interpolation.py:46–62  ·  view source on GitHub ↗

Test that field mapping can be done with CTF data.

()

Source from the content-addressed store, hash-verified

44
45@testing.requires_testing_data
46def 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
65def test_legendre_val():

Callers

nothing calls this directly

Calls 8

read_raw_fifFunction · 0.90
make_fixed_length_eventsFunction · 0.90
EpochsClass · 0.90
make_field_mapFunction · 0.90
cropMethod · 0.45
averageMethod · 0.45
pickMethod · 0.45

Tested by

no test coverage detected