Unable to open EEGLAB file

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

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.

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

Yes, you always pass the .set file, and MNE will auto-detect if there is an additional .fdt file.

1 Like