Python Forum
MNE Sample Data - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: MNE Sample Data (/thread-29493.html)



MNE Sample Data - Chriso99 - Sep-05-2020

Hey. New to Python. Just installed MNE. Any reason sample data has not downloaded successfully also as part of the library / package? Thanks


RE: MNE Sample Data - Larz60+ - Sep-05-2020

please show code


RE: MNE Sample Data - Chriso99 - Sep-06-2020

import os
import numpy as np
import mne
import matplotlib.pyplot as plt

mne.datasets.sample.data_path(path=None, force_update=False, update_path=True, download=True, verbose=None)

sample_data_folder = mne.datasets.sample.data_path()
sample_data_raw_file = os.path.join(sample_data_folder, 'MEG', 'sample',
                                    'sample_audvis_filt-0-40_raw.fif')
raw = mne.io.read_raw_fif(sample_data_raw_file)



RE: MNE Sample Data - Larz60+ - Sep-06-2020

One thing stands out: looks like you're missing an import:
from mne.datasets import sample
I suggest you try the sample application here first:
https://mne.tools/dev/auto_tutorials/source-modeling/plot_mne_dspm_source_localization.html