[Eeglablist] fieldtrip to eeglab

Tarik S Bel-Bahar tarikbelbahar at gmail.com
Mon Oct 23 16:40:05 PDT 2017


Hello Frederica, a few quick notes below. Best wishes.


***********BEGIN NOTES FOR FREDERICA

As Fieldtrip to eeglab cross-functionality is important, please do share
more about your experiences and solutions when you can, so that other users
on the list can benefit.

To keep things simple, one can first try to just export the data in the
simplest manner possible from Fieldtrip, and then use a normal import
function in eeglab (such as biosig, or file I/O, essentially just trying to
load simple matlab or text files). If you are trying to export a complex
Fieldtrip dataset, you may be creating unecessary issue. If you are not
already, shoot for just single-subject channels X time matrices.

Also, if you haven not had a chance to yet, first try some very simple
export from fieldtrip to eeglab, and vice versa, and see if you can get
that to work in a sane manner. Use a simple eeglab dataset and get it into
fieldtrip cleanly. then vice versa.

You basically want the structure of the data (channels X time) that is
exported from Fieldtrip (e.g., as text or mat files) to be as close to what
eeglab wants/expects. I recommend practicing the export and import paths
several different ways and going from there.

The fieldtrip2eeglab and eeglab2fieldtrip functions should work well
enough, but they may not be supported or fully updated to deal with all
kinds of cases. If you find that this is a replicable bug/problem then
please make a note about the issue on the eeglab bugzilla.

If you are matlab saavy, you want to examine  very closely the structure of
fireldtrip data and of eeglab data, and then look closely within the
fieldtrip2eeglab function. You would want to step through closely each step
that the functions take, and review closely what kind of data they are
looking for.

Also, you may want to check in with Max Cantor, or other people who have
posted to the eeglablist, that have used both fieldtrip and eeglab.
If you haven't had a chance to yet, make sure to google eeglablist and
"your topic" for past eeglab list comments related to your situation.









On Fri, Oct 20, 2017 at 7:03 AM, Federica Molteni <federica.molteni at univr.it
> wrote:

> Dear all,
>
> I have done preprocessing of my data with Fieldtrip and would like to load
> it into EEGLAB.
>
> At first I have tried to load it as matlab file, but got this error:
>
> pop_editset(): raw data file 'E:\Matlab_code\new
> pipeline\neglect\1_AM_data_pICA_clean.mat' found
> eeg_checkset note: upper time limit (xmax) adjusted so (xmax-xmin)*srate+1
> = number of frames
> Creating a new ALLEEG dataset 1
> Done.
> Undefined function 'isnan' for input arguments of type 'struct'.
>
> Error in eeglab>updatemenu (line 1560)
>     if ~isempty(ALLEEG) & CURRENTSET~= 0 & ~isequal(EEG.data,
> ALLEEG(CURRENTSET).data) & ~isnan(EEG.data(1))
>
> Error in eeglab (line 368)
>                         updatemenu;
>
> Error while evaluating Menu Callback
>
> So I have tried to use the function fieldtrip2eeglab, but I am probably
> making some mistakes because this is what happened:
>
> Undefined variable "data" or class "data.trial".
>
> Error in fieldtrip2eeglab (line 20)
> for i=1:size(data.trial,2)
>
> Do you have any idea about what I'm doing wrong or do you have any
> suggestions?
>
> Best,
> Federica
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.
> ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20171023/dceea207/attachment.html>


More information about the eeglablist mailing list