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
Does python mne raw object represent a single trail? if so, how to average across many trials?
I'm new to python MNE and EEG data in general.
From what I understand, MNE raw object represent a single trial (with many channels). Am I correct? What is the best way to average data across many trials?
Also, I'm not quite sure what the…
user12450767
0
votes
1 answer
Copy an axes content and show it in an existing figure
The problem is there are 2 seperate Figure objects displayed on the screen. Each Figure object contains an Axes object. How can I overwrite / replace the Axes object in Figure 1, with the Axes object from Figure 2?
In other words:
We have some data…

ArmadilloChubbz65
- 153
- 9
0
votes
1 answer
Trimming and filtering signal using MNE - Python
I am working on an EEG Signal analysis problem with python. I need to remove the recordings below 1st minute and above 6th minute of the signal in edf format which is loaded using MNE, and pass it through a bandpass filter. I am not familiar with…
user12397996
0
votes
1 answer
Issues loading fieldtrip data with MNE python
I am having challenges loading fieldtrip data with MNE python. When I enter the code below
import mne
original_data = mne.io.read_raw_fif('data.fif', preload=False)
original_info = original_data.info
data_from_ft =…

acquayefrank
- 474
- 5
- 21
0
votes
1 answer
Why does mne resample method does not sample the data point to point?
My understanding of downsampling is that it is an operation to decrease the sample rate of x by keeping the first sample and then every nth sample after the first.
The example provided from the resample method of scipy package clearly illustrated…

mpx
- 3,081
- 2
- 26
- 56
0
votes
1 answer
How to keep plotting window open in MNE with Python?
In MNE with Python, I would like to keep the interactive plotting window open once the calling def is executed completely.
However, this is not achievable via the following code:
def get_plot():
sample_data_folder =…

mpx
- 3,081
- 2
- 26
- 56
0
votes
1 answer
Embed MNE plot in Tkinter
I have to use the plot function from MNE library that returns a matplotlib figure of my plot.
As I'm builing an application under Tkinter, I want the figure to appear inside a window of my app.
I used this code. The plot is appearing both in the…

imene.tar
- 33
- 5
0
votes
1 answer
Cannot load EDF data in MNE (65 channels instead of 64)
In our EEG experiment, we used 64 electrodes plus 1 EOG channel. We're trying to read it using the MNE package but run into an error. Looks like MNE expects 64 channels by default?
raw = read_raw_edf(input_fname=data_file,
…

Inkidu616
- 389
- 3
- 17
0
votes
1 answer
MNE volume source estimation with template MRI
I want to do volume source estimation with template MRI provided by MNE library. All I have is EEG data which is sampled with standard_1020 montage.
I successfully plotted source estimation with template MRI by referencing these documents:
EEG…

leroykim
- 85
- 1
- 6
0
votes
1 answer
EEG data preprocessing with mne python
I have Physiological EEG emotion dataset named "Deap". I want to analyze and visualize the data through MNE but it has its own format.
How can I load my personal data for pre-processing, data format is (.dat)?

Zeedin
- 1
- 1
0
votes
1 answer
Computing a mean of epochs
I'm working on EEG data analysis on Python using MNE Toolbox. I'm a Python newbie and I was wondering if there was a way to compute an epoch mean ? By "epoch mean", I mean taking every epoch,and find the average curve it would give.
(English is not…

Marionsaurus
- 3
- 1
0
votes
1 answer
Getting error to read edf file using mne-python
I am trying to visualize the EEG data fie which is in .edf file format.For this purpose I am using MNE python.
here is my code
import mne
file = "/home/test.edf"
data = mne.io.read_raw_edf(file,preload=True)
Whenever I run this code below error…

Fatema Sultana
- 45
- 2
- 12
0
votes
0 answers
Display multiple matplotlib figure object side-by-side
I am using mne package in Python for EEG plotting. I have a matplotlib figure instance and I want to plot two of them side by side and draw lines over it to show connections.
>>import mne
>>import matplotlib.pyplot as plt
>>a =…

thechargedneutron
- 802
- 1
- 9
- 24
0
votes
1 answer
MNE how to save full raw EEG signal with events as a matlab file?
raw, timestamp = ur.MNE_Read_EDF(path)
mne_events, events_dict = ev.MNE_prepare_events(path, timestamp)
epochs = mne.Epochs(raw, mne_events, events_dict, tmin=-0.5, tmax=0.5)
signal = epochs.plot(block=True)
This seems simple but I'm lost. I have…

Julia Bruyere
- 21
- 2
0
votes
1 answer
mne-python: Reading and writing edf files leads to runtime error
I would like to write an EDF file but haven't found a function in mne that would allow me to do so. So I used pyedflib instead. But when I try to read my newly created EDF file back using mne.io.read_raw_edf(), I get a runtime error:
RuntimeError:…

Alice Schwarze
- 559
- 7
- 21