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

Function _get_data

mne/utils/tests/test_check.py:93–127  ·  view source on GitHub ↗

Read in data used in tests.

()

Source from the content-addressed store, hash-verified

91
92
93def _get_data():
94 """Read in data used in tests."""
95 # read forward model
96 forward = mne.read_forward_solution(fname_fwd)
97 # read data
98 raw = mne.io.read_raw_fif(fname_raw, preload=True)
99 events = mne.read_events(fname_event)
100 event_id, tmin, tmax = 1, -0.1, 0.15
101
102 # decimate for speed
103 left_temporal_channels = read_vectorview_selection("Left-temporal")
104 picks = mne.pick_types(raw.info, meg=True, selection=left_temporal_channels)
105 picks = picks[::2]
106 raw.pick([raw.ch_names[ii] for ii in picks])
107 del picks
108
109 raw.info.normalize_proj() # avoid projection warnings
110
111 epochs = mne.Epochs(
112 raw,
113 events,
114 event_id,
115 tmin,
116 tmax,
117 proj=True,
118 baseline=(None, 0.0),
119 preload=True,
120 reject=reject,
121 )
122
123 noise_cov = mne.compute_covariance(epochs, tmin=None, tmax=0.0)
124
125 data_cov = mne.compute_covariance(epochs, tmin=0.01, tmax=0.15)
126
127 return epochs, data_cov, noise_cov, forward
128
129
130@testing.requires_testing_data

Callers 1

test_check_info_invFunction · 0.70

Calls 4

pick_typesMethod · 0.80
normalize_projMethod · 0.80
pickMethod · 0.45

Tested by

no test coverage detected