[FieldTrip] Question about loading in ERP data

Amna Hyder hyder.amna at gmail.com
Wed Nov 27 20:30:11 CET 2019


Hi Julian,
Actually I got it to work. The issue turned out to be related to the dimord
field. I have to average over individuals and avg separately and have a
corresponding dimord field that matches.
Thanks!
Amna

On Wed, Nov 27, 2019 at 10:45 AM Amna Hyder <hyder.amna at gmail.com> wrote:

> Hi Julian,
> I will update the eeglab2fieldtrip function. Right now it is
> referencing it from the EEGlab folder (I have the latest one for that, so
> they must not have updated it).
> As for ft.math, I looked at the documentation and cant figure anything out
> to fix it. I do use cfg.parameter = 'avg' which also exists in the data. Is
> there no way to do ft.math and also keep individual files? It works when I
> do it on data that does not have the individual field as well.
> Here are the 2 files I am using and you can see the code I use to call the
> function below:
> [image: image.png]
> [image: image.png]
> [image: image.png]
> The error I get is as follows:
> Warning: timelock structure contains field with and without repetitions
> selecting these fields that have repetitions: individual
> removing these fields that do not have repetitions: avg, dof, var
> Warning: timelock structure contains field with and without repetitions
> selecting these fields that have repetitions: individual
> removing these fields that do not have repetitions: avg, dof, var
> Error using ft_math (line 144)
> the requested parameter is not present in the data
>
> On Wed, Nov 27, 2019 at 1:05 AM Julian Keil <julian.keil at gmail.com> wrote:
>
>> 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
>> )
>>
>> 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) 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). 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>
>> 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>:
>>>
>>> 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
>>> 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://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
>>>
>> _______________________________________________
>> fieldtrip mailing list
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> 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/a235f17e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 74963 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20191127/a235f17e/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 70181 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20191127/a235f17e/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 174708 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20191127/a235f17e/attachment-0005.png>


More information about the fieldtrip mailing list