[Eeglablist] Scripting for NeurOne import

Hany Ferdinando Hany.Ferdinando at oulu.fi
Thu Apr 20 05:44:00 PDT 2023


Dear all EEGLAB users,

I am new to EEG signal analysis and found that EEGLAB is useful for me. I used EEGLAB 2022 in Matlab 2022b (Windows 10).

My EEG signals were recorded using NeurOne, so I used the plugin to import data to EEGLAB. No error message appeared, so I saved it to .set file and quit EEGLAB.

Using pop_saveh(ALLCOM), I got eeglabhist.m

% EEGLAB history file generated on the 20-Apr-2023
% ------------------------------------------------
[ALLEEG EEG CURRENTSET ALLCOM] = eeglab;
dataPath='C:\Users\hferdina\Matlab\Stroke-Data\4041\2022-12-20T103049\'; sessionPhaseNumber='1'; chans=''; [EEG,COM]=pop_readneurone(dataPath,sessionPhaseNumber,chans);
[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, 0,'setname','4041','gui','off');
eeglab redraw;

When I ran this script, I got the following error:

File to Import: C:\Users\hferdina\Matlab\Stroke-Data\4041\2022-12-20T103049\
Error using readneurone
The value of 'sessionPhaseNumber' is invalid. It must
satisfy the function: isnumeric.

Error in pop_readneurone (line 199)
    EEG = readneurone(SETTINGS.dataPath,SETTINGS.sessionPhaseNumber, ...

Error in eeglabhist (line 4)
dataPath='C:\Users\hferdina\Matlab\Stroke-Data\4041\2022-12-20T103049\'; sessionPhaseNumber='1'; chans=''; [EEG,COM]=pop_readneurone(dataPath,sessionPhaseNumber,chans);

I noticed that the sessionPhaseNumber is char, not numeric, so I changed it to numeric. However, the problem was not solved yet!

File to Import: C:\Users\hferdina\Matlab\Stroke-Data\4041\2022-12-20T103049\
Error using xmlstringinput
File C:\Users\hferdina\Matlab\Stroke-Data\4041\2022-12-20T103049\1\Session.xml
not found

Error in xmlread (line 85)
    filename = xmlstringinput(filename,true);

Error in module_read_neurone_xml (line 44)
xml = xmlread(xmlfile);

Error in readneurone (line 86)
session = module_read_neurone_xml([dataPath 'Session.xml']);

Error in pop_readneurone (line 199)
    EEG = readneurone(SETTINGS.dataPath,SETTINGS.sessionPhaseNumber, ...

Error in eeglabhist (line 4)
dataPath='C:\Users\hferdina\Matlab\Stroke-Data\4041\2022-12-20T103049\'; sessionPhaseNumber=1; chans=''; [EEG,COM]=pop_readneurone(dataPath,sessionPhaseNumber,chans);

readneurone.m tried to read Session.xml using "C:\Users\hferdina\Matlab\Stroke-Data\4041\2022-12-20T103049\1\Session.xml", but it should use "C:\Users\hferdina\Matlab\Stroke-Data\4041\2022-12-20T103049\Session.xml".

I didn't get any error message when ran EEGLAB without script, but why I got those error when I ran it using the script?

Thanks!

Hany



More information about the eeglablist mailing list