[Eeglablist] Fwd: fieldtrip to eeglab

Federica Molteni federica.molteni at univr.it
Tue Nov 7 06:37:49 PST 2017


Dear all,

thank you for your help!

I checked the trial and time formats in fieldtrip and transformed one subject channels X time matrices at time. Also I slightly modified the function to fit my data; so it seems that I can export my data in eeglab. Now I'm dealing with another problem in eeglab.
After having transformed all my datasets in eeglab format, I created my study. I have a 3(groups)x4(condition) design, so two indipendent variables: groups (between factor) and condition (within factor). When I tried to plot the between factor (that in the study I created is the second variable) I obtained only 3 straight lines, one for each group of partecipants. For what concers the within factor, instead, it doesn't appear to give any problem.

Also sometimes (not all the times) eeglab gives me this error when I'm trying to plot my data:
 
While setting the 'YLim' property of 'Axes':
Value must be 1x2 vector of numeric type in which the second element is larger than the first and may be Inf,

(Error occured in function ylim() at line 44)

This problem 'disappears' if I Precompute channel measure again, even though I already did for the current study.
Do you have any suggestion? I'm probably still doing something wrong with the function fieldtrip2eeglab.

Best,
Federica


----- Messaggio originale -----
Da: "Tarik S Bel-Bahar" <tarikbelbahar at gmail.com>
A: "Federica Molteni" <federica.molteni at univr.it>
Cc: "eeglablist" <eeglablist at sccn.ucsd.edu>
Inviato: Martedì, 24 ottobre 2017 1:40:05
Oggetto: fieldtrip to eeglab

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.


----- Messaggio originale -----
Da: "Xie Wanze" <xiew1202 at gmail.com>
A: "Federica Molteni" <federica.molteni at univr.it>
Cc: "eeglablist" <eeglablist at sccn.ucsd.edu>
Inviato: Lunedì, 23 ottobre 2017 19:32:05
Oggetto: Re: [Eeglablist] fieldtrip to eeglab

Hi Federica,
The filedtrip2eeglab program only works when your data is in a certain
format in which the trial field in your data should be 1 x N cells. N
stands for the num of trials. In addition, the time information should also
be saved in one or certain number of cells.   When your data format does
not match with this the program will not work.
Also, the original field2eeglab program needs a string input for the file
name.

So, you either need to adjust your data structure or modify the
fieldtrip2eeglab program to fit your data.

Good luck.


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
>



More information about the eeglablist mailing list