Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MNE Sample Data
#1
Hey. New to Python. Just installed MNE. Any reason sample data has not downloaded successfully also as part of the library / package? Thanks
Reply
#2
please show code
Reply
#3
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)
Reply
#4
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/sou...ation.html
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Sample based on the distribution of a feature to create more balanced data set dervast 1 1,723 Nov-15-2019, 12:25 AM
Last Post: schuler

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020