[FieldTrip] Question about loading in ERP data

Julian Keil julian.keil at gmail.com
Wed Nov 27 10:04:38 CET 2019


Dear Amna,

First, I suggest you update your fieldtrip and EEGlab versions.
The line specified in your error does not match with the current eeglab2fieldtrip version (see here for the current implementation https://github.com/fieldtrip/fieldtrip/blob/master/external/eeglab/eeglab2fieldtrip.m <https://github.com/fieldtrip/fieldtrip/blob/master/external/eeglab/eeglab2fieldtrip.m>)

Second, what are you trying to compare with ft_math? Without posting your cfg structure, it’s not possible to see where you might be having issues. I suggest double checking the documentation (https://github.com/fieldtrip/fieldtrip/blob/master/ft_math.m <https://github.com/fieldtrip/fieldtrip/blob/master/ft_math.m>) to see how to call the function. The error you report could stem from either not specifying it at all (i.e. cfg.parameter is not in your cfg structure) or using one that is not present (i.e. using cfg.parameter = ‚avg‘, when ‚avg‘ is not in your data.

Hope that helps,

Julian

> Am 27.11.2019 um 08:36 schrieb Amna Hyder <hyder.amna at gmail.com>:
> 
> Alternate possible solution!!
> I thought I would add that the reason I am trying to import grand averaged ERPs from ERPlab is because I am running into some issues with the ft_timelockgrandaverage function when I use it on individual ERPs in fieldtrip. If I do cfg.keepindividual = 'yes' (which is required for cluster permutation analysis), the "avg" field is missing from the results. I only see the avg field if I specify "no" to keepindividual. I saw that someone had an issue with this in 2015 (https://mailman.science.ru.nl/pipermail/fieldtrip/2015-March/021876.html <https://mailman.science.ru.nl/pipermail/fieldtrip/2015-March/021876.html>). I have tried to combine the grand average ERP by doing it once with keepindividual='yes' and once with keepindividual='no'. See below:
>     [avgERP2]          =  ft_timelockgrandaverage(cfg);
>     avgERP.individual = avgERP2.individual; %avgERP has only the "avg" field and is missing "individual". The opposite is true for avgERP2
>     avgERP.dimord = avgERP2.dimord;
> 
> All of this matters because when I try to apply ft.math on this data to compare conditions I get the following error:    'the requested parameter is not present in the data'. 
> It doesnt specify which field, so I am worried that there is some error in the way ft_timelockgrandaverage is working. 
> If you can help out with this issue, I wouldn't need to import already grand averaged ERP files from ERPlab.
> Thanks so much for your prompt response.  
> Amna
> 
> On Tue, Nov 26, 2019 at 10:37 PM Julian Keil <julian.keil at gmail.com <mailto:julian.keil at gmail.com>> wrote:
> Hi Amna,
> 
> is there a specific reason why you want to export the ERPs as ICA components?
> eegla2fieldtrip has the option to use ’timelock’ as the second input option, which might be more sensible in your case.
> 
> Hope that helps,
> 
> Julian
> 
>> Am 27.11.2019 um 02:23 schrieb Amna Hyder <hyder.amna at gmail.com <mailto:hyder.amna at gmail.com>>:
>> 
>> Hi, 
>> I did all my preprocessing in EEGlab and ERPlab and wanted to put in my ERP files into fieldtrip to do the cluster permutation analysis on my ERPs. I tried using the function eeglab2fieldtrip as specified in the following link: https://mailman.science.ru.nl/pipermail/fieldtrip/2006-March/000441.html <https://mailman.science.ru.nl/pipermail/fieldtrip/2006-March/000441.html>
>> I used the 'component analysis' option eg: comp = eeglab2fieldtrip(ERP, 'componentanalysis').
>> However, I get the following error: 
>> Reference to non-existent field 'icachansind'.
>> Error in eeglab2fieldtrip (line 54)
>>  header.label   = { tmpchanlocs(EEG.icachansind).labels };
>> 
>> When I comment out these lines I run into another error:
>> Reference to non-existent field 'icaact'.
>> 
>> Error in eeglab2fieldtrip (line 119)
>>         if isempty(EEG.icaact)
>> 
>> It seems that this function requires ICA information in the EEGLAB ERP file, which isnt stored in the way that it is called. Can someone take a look into the function? Do I have to get the ERPs again in fieldtrip?
>> Amna
>> _______________________________________________
>> fieldtrip mailing list
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip <https://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
>> https://doi.org/10.1371/journal.pcbi.1002202 <https://doi.org/10.1371/journal.pcbi.1002202>
> 
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip <https://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
> https://doi.org/10.1371/journal.pcbi.1002202 <https://doi.org/10.1371/journal.pcbi.1002202>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20191127/dd161349/attachment.html>


More information about the fieldtrip mailing list