When opening the .set
file, using the code below
import mne
raw = mne.io.read_raw_eeglab('s01_051017m.set')
the compiler return an error
IsADirectoryError: [Errno 21] Is a directory: 's01_051017m.set'
May I know how to solve this issue.
The .set
file is accessible via the following link: https://ndownloader.figshare.com/files/14242478
MNE-Python version: 0.21.2
operating system: Ubuntu
Appreciate for any help
agramfort
(Alexandre Gramfort)
May 9, 2021, 4:03pm
2
you passed the folder name and not the file to the read_raw_eeglab
I tested and it works fine
A
Hi @agramfort , thanks for the clarification.
I changed the following and now it works.
raw = mne.io.read_raw_eeglab('s01_051017m.set/s01_051017m.set')
print(raw.annotations)
outputted:
Reading s01_051017m.set/s01_051017m.fdt
<Annotations | 597 segments: 251 (95), 252 (104), 253 (199), 254 (199)>
But within the folder s01_051017m.set
, there are two files, .fdt
and .set
s01_051017m.set
-s01_051017m.fdt
-s01_051017m
I am curios on how to open the .fdt
file, or does the above amended code open the .fdt
simultaneously?
I read the documentation on read_raw_eeglab
, and it mentioned
input_fname str
Path to the .set file. If the data is stored in a separate .fdt file, it is expected to be in the same folder as the .set file
However, Iβm not so clear whether .fdt
is open simultaneously.
I assume, the .fdt
contained the time series signal.
Sorry, this is my first time work with .set
file.
Based on the discussion.
opened 03:28PM - 05 Dec 15 UTC
closed 01:30PM - 23 Dec 15 UTC
I was wondering if you have any tools for reading eeglab `.set` files (along wit⦠h `.fdt`) and converting to mne-python representation?
It would have seemed easy to do if not for the fact that sometimes (always?) `scipy.io.loadmat` fails in reading eeglab `.set` files (eeglab `.set` files are just `.mat` files). See my issue on `scipy` repo [here](https://github.com/scipy/scipy/issues/5516).
opened 12:41PM - 17 Sep 18 UTC
closed 03:03PM - 24 Sep 18 UTC
enhancement
help wanted
EEGLAB files are MATLAB files ... albeit with a `.set` extension instead of the β¦ usual `.mat`. The EEGLAB files can contain the EEG data in a matlab struct field called `data`. However, this `data` field can alternatively contain a link to an accompanying (separate) `.fdt` (=FloatDaTa) file.
Currently MNE-BIDS only allows the standalone `.set` files and thorws an error when an `.set`+`.fdt` combination is used. This should be fixed, see:
https://github.com/mne-tools/mne-bids/blob/7403fc56b33bfe9b61e2cd7ee214ab9ad24312b0/mne_bids/utils.py#L497-L505
Fdt is not matlab file. Itβs a companion file to a .set file that is actually a .mat file
Hence,
import mne
raw = mne.io.read_raw_eeglab('s01_051017m.set/s01_051017m.set')
raw.plot(start=5, duration=5)
will produce the following graph
This confirmed that, the read_raw_eeglab
load the .fdt
simultaneously.
1 Like
cbrnr
(Clemens Brunner)
May 10, 2021, 8:50am
5
Yes, you always pass the .set
file, and MNE will auto-detect if there is an additional .fdt
file.
1 Like