Importing BCI2000 .dat files into EEGLab
Importing BCI2000 .dat files into EEGLab
I have been trying to find a command line method to import .dat files into EEGLab, and have been getting some very strange errors. The GUI based plug-in works fine, but when I try to load multiple .dat files at the same time with pop_loadBCI2000.m it loses 60% of my event flags. Has anybody else been having this problem? Is there a know fix for this? Is there some way to use BCI2000import.m from the command line? Does anybody have any suggestions?
Thanks in advance.
Thanks in advance.
Re: Importing BCI2000 .dat files into EEGLab
I wanted to read .dat files into EEGLAB. Can you tell me how you have been able to do it using the GUI?
I tried using the option for read BCI2000 ASCII files, but that does not complete. I tried using Import Data-> From other formats using BIOSIG toolbox, but then all event information is lost.
The following is the read log:
Any help would be appreciated.
Thanks
Sumit
I tried using the option for read BCI2000 ASCII files, but that does not complete. I tried using Import Data-> From other formats using BIOSIG toolbox, but then all event information is lost.
The following is the read log:
Code: Select all
Pop_loadbci: importing BCI file...
eeg_checkset note: upper time limit (xmax) adjusted so (xmax-xmin)*srate+1 = number of frames
Reading data file header...
Warning SOPEN (BCI2000): HDR.EVENT.TYP information need to be extracted from HDR.BCI2000.STATE
Warning SOPEN: Automated OVERFLOWDETECTION not supported - check yourself for saturation artifacts.
Warning SOPEN (BCI2000): HDR.EVENT.TYP information need to be extracted from HDR.BCI2000.STATE
Reading data in BCI2000 format...
eeg_checkset note: upper time limit (xmax) adjusted so (xmax-xmin)*srate+1 = number of frames
Extracting events from last EEG channel...
Warning: event extraction failure, the last channel contains data
Warning: no event found. Events might be embeded in a data channel.
To extract events, use menu File > Import Event Info > From data channel
Creating a new ALLEEG dataset 1
Done.
Thanks
Sumit
Re: Importing BCI2000 .dat files into EEGLab
I've attached a file. Put it in
eeglab\plugins\bci2000import0.21\pop_loadBCI2000.m
Can you try it and tell me if it works for you? This should be the same as in the BCI2000 source (BCI2000/tools/EEGlabImport).
eeglab\plugins\bci2000import0.21\pop_loadBCI2000.m
Can you try it and tell me if it works for you? This should be the same as in the BCI2000 source (BCI2000/tools/EEGlabImport).
Re: Importing BCI2000 .dat files into EEGLab
Sorry, I should add more information.
eeglab comes with a BCI2000 import plugin already (not the ascii one, ignore that). From the EEGLAB menu you should have the option to
File>Import Data>Using EEGLAB functions and plugins>From BCI2000 .DAT file
(For some reason this is purple on my screen).
If you do not have that option, you can either download the eeglab source again, or you can download the BCI2000 source and copy the BCI2000\tools\EEGlabImport folder to eeglab\plugins\
That option should now be available to you.
The file attached in the previous e-mail is a replacement for the older one that comes with eeglab. I've made a few enhancements so it should be faster and work with more types of input.
eeglab comes with a BCI2000 import plugin already (not the ascii one, ignore that). From the EEGLAB menu you should have the option to
File>Import Data>Using EEGLAB functions and plugins>From BCI2000 .DAT file
(For some reason this is purple on my screen).
If you do not have that option, you can either download the eeglab source again, or you can download the BCI2000 source and copy the BCI2000\tools\EEGlabImport folder to eeglab\plugins\
That option should now be available to you.
The file attached in the previous e-mail is a replacement for the older one that comes with eeglab. I've made a few enhancements so it should be faster and work with more types of input.
Re: Importing BCI2000 .dat files into EEGLab
Hi,
Thanks for the help. I was unable to view the attachment that you had mentioned.
However, I copied the BCI2000\tools\EEGlabImport folder to eeglab\plugins\ and then tried to read a BCI2000 .dat file, but got the following error message:
I am using EEGLAB v10.2.2.4b and BCI2000 source from http://www.bci2000.org/svn/trunk.
Thanks for the help. I was unable to view the attachment that you had mentioned.
However, I copied the BCI2000\tools\EEGlabImport folder to eeglab\plugins\ and then tried to read a BCI2000 .dat file, but got the following error message:
I am using EEGLAB v10.2.2.4b and BCI2000 source from http://www.bci2000.org/svn/trunk.
Re: Importing BCI2000 .dat files into EEGLab
Either
1) make sure bci2000/tools/Mex is on your matlab path or
2) copy that folder's contents into the eeglab plugin folder you copied previously.
1) make sure bci2000/tools/Mex is on your matlab path or
2) copy that folder's contents into the eeglab plugin folder you copied previously.
Re: Importing BCI2000 .dat files into EEGLab
I tried the steps mentioned, but the following error message is obtained.
Re: Importing BCI2000 .dat files into EEGLab
I need some more information.
1) What version of the plugin are you using? Open EEGLAB, then from the MATLAB command prompt run.
Do you see the 0.34 revision history comments around line 41? If not, then you're using an older version of the plugin than I am.
2) How many files are you trying to load at once?
There was an error with one of my revisions that had trouble loading a single file from the GUI, but that has since been fixed.
If you are loading more than 1 file, are you certain that the files are identical in structure? Do they have the same sample rate, same channel number, and same states?
3) In my version of pop_loadBCI2000.m, line 167 is. Is that what you have on that line? Probably not because I doubt that line would generate the error you posted. Please tell me what you have on line 167.
1) What version of the plugin are you using? Open EEGLAB, then from the MATLAB command prompt run
Code: Select all
open pop_loadBCI2000
Do you see the 0.34 revision history comments around line 41? If not, then you're using an older version of the plugin than I am.
2) How many files are you trying to load at once?
There was an error with one of my revisions that had trouble loading a single file from the GUI, but that has since been fixed.
If you are loading more than 1 file, are you certain that the files are identical in structure? Do they have the same sample rate, same channel number, and same states?
3) In my version of pop_loadBCI2000.m, line 167 is
Code: Select all
EEG = eeg_checkset(EEG, 'eventconsistency');
Re: Importing BCI2000 .dat files into EEGLab
Using EEGLAB v10.4.2.2b
These are lines 40-45.
Trying to load only one file as of now.
Line 167 is :
These are lines 40-45.
Code: Select all
% Revision history:
% 0.30: Create boundary events when loading multiple files
% 0.26: Import channel labels
% 0.25: Added EEG.urevent structure
% 0.20: Adapted to EEGLAB conventions
% 0.10: Initial version
Line 167 is :
Code: Select all
EEG.chanlocs(k).labels = parms.ChannelNames.Value{k}; end
Re: Importing BCI2000 .dat files into EEGLab
I sent you the newest version of pop_loadBCI2000.m. If you still have trouble then you might need newer versions of the load_bcidat mex files.
I use EEGLAB v12.0.2.2 but that shouldn't matter.
I use EEGLAB v12.0.2.2 but that shouldn't matter.
Who is online
Users browsing this forum: No registered users and 27 guests