MNE-Python is an open-source Python package for exploring, visualizing, and analyzing human neurophysiological data such as MEG, EEG, sEEG, ECoG, and more. It includes modules for data input/output, preprocessing, visualization, source estimation, time-frequency analysis, connectivity analysis, machine learning, and statistics.
Questions tagged [mne-python]
96 questions
14
votes
2 answers
How to read edf data in Python 3
How can I read edf data using Python? I want to analyze data of a edf file, but I cannot read it using pyEDFlib. It threw the error OSError: The file is discontinous and cannot be read and I'm not sure why.

Mindy
- 175
- 1
- 1
- 8
7
votes
2 answers
Python MNE - reading EEG data from array
I have EEG data that comes in the form of a 3D numpy array (epoch * channel * timepoint). timepoint is a 256 element array containing each sampled timepoint (1s total, at 256Hz). epoch is an experimental trial.
I'm trying to import the numpy array…

Simon
- 9,762
- 15
- 62
- 119
5
votes
3 answers
How can I plot a montage in Python MNE using a specified set of EEG channels?
I've loaded some EEG data using Python's MNE package. The data has 46 recording channels obtained from a 10-20 montage, but we've identified numerous dead channels and only want to focus on the remaining ones.
I'm able to remove the channels, but I…

fishbacp
- 1,123
- 3
- 14
- 29
4
votes
2 answers
How to read .eeg file from BrainVision Core Data Format in python?
I have a dataset in BrainVision Core Data Format which consists of the header file (.vhdr), marker file (.vmrk), and raw EEG data (.eeg) file for each subject. I know that python has mne.io.read_raw_brainvision() function which reads header file and…

bipvan
- 77
- 7
3
votes
1 answer
creating mne array from csv file
import numpy as np
import mne
csv = np.genfromtxt(r'C:\Users\Vincent\Desktop\vin.csv', delimiter=",")
print(csv)
ch_names = ['P7', 'P8', '01', '02']
sfreq = 256 # Sampling frequency
info = mne.create_info(ch_names=ch_names, sfreq=sfreq)
raw =…

Vincent Ngetich
- 31
- 1
2
votes
0 answers
Integration of MNE Python in Google Cloud Platform
Does anybody knows how to integrate mne python in google cloud.
We are basically using basic MEG analysis using data in Python and we want to import data onto Google Cloud and use the open source library MNE Python.
Have Tried of using sudo apt…

Vimoksh Bhavsar
- 23
- 3
2
votes
1 answer
delete consecutive duplicates in numpy array
I want to delete second row of an event trigger of this numpy list, the event triggers are decoded in the 3. column (starting with: 2,1,3,4,5). How can I delete the consecutive row of the same event?
Input:
[[ 108 0 2]
[ 323 0 2]
…

Reby
- 23
- 4
2
votes
1 answer
,getting error reading .set file while using MNE python package for EEG signal processing
import os
import numpy as np
import mne
data_folder = '/Users/sheetal/Desktop/emotions'
data_raw_file = os.path.join(data_folder,"sub-01","eeg","sub-01_task-ImaginedEmotion_eeg.set")
raw =…

Sheetal Jadhav
- 21
- 2
2
votes
0 answers
Access large BDF and EDF files stored on S3 from Sagemaker by URL and read them with mne library
I have a bucket on S3 and a SageMaker notebook. I try to get access to rather large BDF and EDF files (1-2 GB), stored on the S3 bucket, without uploading them to SageMaker volume.
I also need to access these files by URL as the EDF processing…

Wassily Minkow
- 53
- 1
- 7
2
votes
1 answer
how to read .gdf file using Python
I am working on EEG signal data stored in a ".gdf" file, for my university project. My aim is to open that file using Python. Till now, I am able to open that file using MNE package. The code is :
import os
import numpy as np
import…

DARUNJEET BAG
- 19
- 1
- 4
2
votes
1 answer
memory error! using mne dataset
I am trying to use the 'visual_92_categories' data set of mne-python, but when I want to do filtering and extracting the epochs, I get memory error! my RAM is 7G. I am wondering if someone could help me. Is there any memory limitation with python or…

Sima Hghz
- 33
- 2
2
votes
0 answers
Python - MNE - can not load .fif-Files
I tried to run this 3 lines of Code:
import mne
myfile = 'test_raw.fif'
raw = mne.io.read_raw_fif(myfile)
It should load a .fif-File
Its the example from http://martinos.org/mne/stable/index.html
When I try it with their sample-Data it works! When…

Flx Glandorf
- 21
- 2
2
votes
1 answer
Unit of measure for raw data in mne.RawArray
I am trying to load EEG data from a numpy array into an mne.io.RawArray object. What is the correct unit of measure for the data in the array? Volts?
I read the source for mne.create_info, and it looks like the unit should be volts. Can anyone…

jkr
- 17,119
- 2
- 42
- 68
1
vote
1 answer
Can't read EEG ".rec" file from St. Vincent's University Hospital Sleep Apnea Database using WFDB Package in Python. The isn't ".hea" file
I am trying to read EEG signals from the "St. Vincent's University Hospital / University College Dublin Sleep Apnea Database", which can be accessed at this link: https://physionet.org/content/ucddb/1.0.0/
I am using the Waveform Database Software…

Daniel Dantas
- 145
- 3
- 15
1
vote
0 answers
Error with yasa in mne. Error unexpected keyword argument 'vmin'
import yasa
import pandas as pd
data = pd.Series([4, 8, 7, 1, 2, 3, 5],
index=['F4', 'F3', 'C4', 'C3', 'P3', 'P4', 'Oz'],
name='Values'
yasa.topoplot(data,title='My first topoplot')
#----- output------
TypeError: plot_topomap() got an unexpeced…

Toronto
- 11
- 1