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
0
votes
1 answer
How to get age of persons from their raw EEG data(edf file)?
I want to work with the ages of individuals from their eeg records for research. I am using these tuh_eeg dataset (https://isip.piconepress.com/projects/tuh_eeg/downloads/tuh_eeg_abnormal/). I have tried different methods in matlab and python to…

TA_N28
- 1
- 1
0
votes
2 answers
Parsing EDF dataset to .MAT (matlab file structure)
Parsing EDF dataset to .MAT (matlab file structure)
I'm trying to parse an EDF dataset to the .MAT file structure described below (originally from https://www.bbci.de/competition/iv/desc_1.html):
dict_keys(['header', 'version', 'globals', 'mrk',…

Iuri Sampaio
- 57
- 1
- 8
0
votes
2 answers
Open a EEG EDF file using mne python
I need to use mne python for my master degree project, but i'm new in python programming. So i'm trying to open a single EEG edf file, i have tried several codes and none of them worked. The last code i tried:
import mne
from google.colab import…

Hanna Arruda
- 1
- 2
0
votes
1 answer
raw.plot() not plotting time series in eeg data
I am using mne to read my EEG data. When I am doing raw.plot(), I am getting an image of this type, rather than a time series. I am unable to interpret this. Please help.

bipvan
- 77
- 7
0
votes
1 answer
Is there a MNE Python function that can enable me to use only part of the EEG data?
I currently have an EEG.set file with data from 40 minutes of measurement. I only need 20 minutes (from somewhere in the middle) of which I know the starting and ending timestamps. Is there a function within the MNE package so I can select the part…

Esther
- 3
- 1
0
votes
1 answer
How to read headers of GDF file using mne.io.read_raw_gdf()?
I am trying to read EEG header and data from a .gdf file using Python 3.
I tried and failed to install Biosig tool that offers this functionality according to documentation:
import biosig
import…

Vicky Fi
- 79
- 9
0
votes
0 answers
How to remove Syntax error when doing mne_edf2fiff conversion
I am new to MNE python, and wanted to convert the raw file provided to me in edf format to .fif format. However, I came across this problem. I was wondering if anyone could help me with resolving the issue. I am sharing the code below:
import…

Subrat Bavarian Bastola
- 111
- 2
0
votes
1 answer
How to convert a .mat file to mne raw file?
I tried to convert a 'BCICIV_calib_ds1d.mat' file to a .mne raw file using the mne.io.RawArray() function.
First, I read the .mat file using the scipy.io.loadmat() function:
data = scipy.io.loadmat(filepath)
to get a dictionary. Then, convert the…

Hasin Manjare
- 1
- 4
0
votes
1 answer
Is there a way to change mne.io.raw first sample information?
I want to modify my raw.first_samp which is an integer that looks like it.
Input ->
file = 'yourfilename.fif'
raw = mne.io.read_raw_fif(file)
print(raw.first_samp)
Output ->
100500
I would like to put it at 0. But when I try, this is the error I…

Yedfa
- 1
0
votes
1 answer
ploting mutliple PSD with mne for python in same figure
I would like to plot multiple PSD obtained with plot_psd() from MNE python.
I tried the following code
import matplotlib.gridspec as gridspec
gs = gridspec.GridSpec(3,1)
plt.figure()
ax = plt.axes()
# First plot
ax1 =…

fredooms
- 123
- 8
0
votes
1 answer
pyCharm doesn't open plot with "Show plots in tool window" disabled - probably due to blocking
I'm trying to plot an interactive plot with pyCharm (from mne), and disabled "Show plots in tool window". When I run my code, I see that a new window is trying to open, but closes immediately, as if something is blocking it. I know it's not a…

user287263
- 41
- 4
0
votes
1 answer
In MNE-python, why is the power data scale from time-frequency representation (tfr) different from power spectral density (PSD) ?
When I managed my EEG data, the results of mne.time_frequency.tfr_morlet (or the other two methods) were an array of power around 1e-7. When being plotted with dB = 'True', a good graph was got only when the scale of color is around -150 to -200.…
0
votes
1 answer
Find peaks amplitude and latency in EEG data python, preferably using MNE
I have EEG data, for which I want to calculate the peaks' amplitudes and latencies. I'm working with MNE, and found the method get_peak in the Evoked object. However, I want to find peaks on epochs data (not averaged). How can I do it? I didn't see…

user287263
- 41
- 4
0
votes
1 answer
Plot trials of eeg data in mne python
Im new to MNE and EEG in general.
I have data consisting of many epochs from one channel. I would like to plot a graph of the average and std throughout time across the epochs.
I can do this with plt, but I thought there should be something that…

user287263
- 41
- 4
0
votes
1 answer
How can I split EEG evoked potentials in different frequency bands using MNE-python?
So far, I have calculated the evoked potentials. However, I would like to see if there is relatively more activity in the theta band wrt the other bands. When I use mne.Evoked.filter, I get a plot which lookes a lot like a sine wave, containing no…

Smamorti7
- 40
- 7