Page 1 of 1

read and process file.dat in eeglab

Posted: 30 May 2014, 07:09
by Alberto88
Hello everyone, I wanted to know if it is possible to load the dat file in the bci2000 eeglab to prosecute

Re: read and process file.dat in eeglab

Posted: 30 May 2014, 11:18
by boulay
Are you asking if it is possible to load a BCI2000 dat file into EEGLAB?
Yes, it is. If you are using the latest version of EEGLAB then you can use its extension manager.
In EEGLAB, Click on File->Manage EEGLAB Extensions->Data import extensions
Click on the checkbox next to BCI2000import then click on OK. Click on OK to download the 4.3MB extension.
EEGLAB will restart.
Then click on File -> import -> and you'll find the BCI2000 import option at the bottom. Click on that.

Let me know if you have any trouble with the import tool.
-Chad

Re: read and process file.dat in eeglab

Posted: 01 Jun 2014, 09:07
by Alberto88
perfect I was able to import them now eeglab I read the tutorial, I wanted to know, how many electrodes (many channels) can be used to a minimum to run well ica? file.dat and how many do I need? I would like to extract signals with artifacts from bci2000 and see how to process in eeglab. after processing and file changes eeglab dat gives me the array with the values ​​to be inserted into the array to go to the classifier in the config bci2000?

Re: read and process file.dat in eeglab

Posted: 01 Jun 2014, 20:09
by boulay
Theoretically, you can do ICA with only 2 channels. Practically, to me, 16 is a bare minimum and I recommend at least 32 channels.

There is no clearly defined procedure to go from EEGLAB analysis to BCI2000 parameters for online processing. There are many possible ways to do it.

I suggest looking into BCILAB and learning how to use it to do offline classification. Then, when you are satisfied with your classification result, try to extract the spatial filter (includes procedures like re-referencing, ICA, CSP, etc) and subsequent feature combinations required to get your decision variable. Then try to emulate this functionality by parameterizing existing BCI2000 signal processing modules.

For example, let's say your offline analysis started with ICA and 2 of the sources it yielded were located over left and right motor cortices. Then, your machine-learning analysis yielded a decision variable that was the difference between left motor 12 Hz and right motor 12 Hz.

In BCI2000, you'd use SpectralSignalProcessing. You'd fill the spatial filter with the ICA weights, but you could limit yourself to only output the two sources of interest. You'd choose your frequency transformation (FFT or MEM AR) and you'd probably parameterize it with 3-Hz windows to at least 15 Hz. Then in the linear classifier you'd identify the spatial filter outputs (outputs 1 and 2) and frequency bins (12 Hz) and the weights to apply to them (+1 and -1) to yield your decision variable.

You don't have to limit yourself to 2 ICA sources and 1 frequency. You can use all channels and all frequencies. Indeed, this is likely what your machine-learning procedure will do.

You have a lot of learning and programming to do if you want to be able to do something like the above, but learning how will empower you to do more sophisticated signal processing in the future.

Re: read and process file.dat in eeglab

Posted: 02 Jun 2014, 06:26
by Alberto88
we say that is a bit long as work ...
first maximum I can use 16 electrodes I, we have these only.
After that, how many tests do? File.dat how many would be better to do? I do some testing myself causing ocular artifacts for example.
After that load the file.dat in eeglab and the procedure to be followed, which I read in the tutorial eeglab would be divided into sections short enough signals, ICA start and after making visual analysis and visual elimination, restart the ICA and then recheck signals.
This procedure is correct?
After this I did not understand what I EEGLAB returns?
What I'm going to put in BCI2000 to use these signals cleaned up?
I'm sorry but I want to understand a little step by step what to do ....


Another question:
if I wanted to use the signals learned for the MUrhytm, since they are only 8 channels of those they serve would not make sense to use ICA for the removal of any artifacts right?
It would all be done using filters and visual elimination?
My intent would be to take signals from the calibration artifacts MUrhytm pass to egglab for the removal and analysis, resume signals or values ​​to be entered in the config bci2000 and use these signals to guide the ball ....

Re: read and process file.dat in eeglab

Posted: 02 Jun 2014, 11:10
by boulay
I don't have time to explain everything to you in detail. EEGLAB has their own resources (its website has lots of documentation and there's a mailing list. Try searching its archives). Signal processing, artifact rejection and subtraction, and the mu rhythm, are all detailed topics on their own and outside the scope of this bulletin board.

To help you get started, I can give you one quick hint:
After running ICA using EEGLAB you'll get a variable in your works space called EEG. This variable is a structure. The multiplication of two of its fields will give you the values to put into the spatial filter in BCI2000.

EEG.icaweights*EEG.icasphere

Re: read and process file.dat in eeglab

Posted: 03 Jun 2014, 04:34
by Alberto88
ok thanks for the information

Re: read and process file.dat in eeglab

Posted: 03 Jun 2014, 18:09
by Alberto88
I Read tutorial and the pass for reject artefacts but don t load correctly the file .dat of the bci 2000 i dont know