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

Function _get_epochs

mne/conftest.py:378–399  ·  view source on GitHub ↗

Get epochs.

(stop=5, meg=True, eeg=False, n_chan=20)

Source from the content-addressed store, hash-verified

376
377
378def _get_epochs(stop=5, meg=True, eeg=False, n_chan=20):
379 """Get epochs."""
380 raw = read_raw_fif(fname_raw_io)
381 events = read_events(fname_event_io)
382 picks = pick_types(
383 raw.info, meg=meg, eeg=eeg, stim=False, ecg=False, eog=False, exclude="bads"
384 )
385 # Use a subset of channels for plotting speed
386 picks = np.round(np.linspace(0, len(picks) + 1, n_chan)).astype(int)
387 with pytest.warns(RuntimeWarning, match="projection"):
388 epochs = Epochs(
389 raw,
390 events[:stop],
391 event_id,
392 tmin,
393 tmax,
394 picks=picks,
395 proj=False,
396 preload=False,
397 )
398 epochs.info.normalize_proj() # avoid warnings
399 return epochs
400
401
402@pytest.fixture()

Callers 6

epochsFunction · 0.70
epochs_unloadedFunction · 0.70
epochs_fullFunction · 0.70
epochs_spectrumFunction · 0.70
epochs_tfrFunction · 0.70
epochs_emptyFunction · 0.70

Calls 5

read_raw_fifFunction · 0.90
read_eventsFunction · 0.90
pick_typesFunction · 0.90
EpochsClass · 0.90
normalize_projMethod · 0.80

Tested by

no test coverage detected