[FieldTrip] fieldtrip Digest, Vol 127, Issue 9
Richard Cui
richard.jie.cui at gmail.com
Wed Jun 9 17:08:55 CEST 2021
Hi Philip,
I think EEG.srate is the sampling rate of the signal, which is ‘fsample’ (2048) in your struct. I guess you should set dat.Fs = fsample in your code.
-Richard
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210608/1548174b/attachment-0001.htm>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 8 Jun 2021 18:28:38 +0200
> From: philip Joadavi <p.joadavi at gmail.com>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: [FieldTrip] fieldtrip2eeglab
> Message-ID:
> <CAHDRFUHGfJUCCB7wLeJP_dbxq=Nz-U5+sWgysDVOOYm5jBkBAQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi all,
>
> I would like to use AMICA (an ICA algorithm ) on my data. Unfortunatelly,
> FieldTrip doe not support AMICA (as far as I know ) and I would like to use
> EEGLAB for that.
>
> I'm using fieldtrip2eeglab function to convert my data to EEGLAB, however,
> I get multiple errors.
>
> my fieldtrip data is a structure with :
>
> struct with fields:
>
> hdr: [1×1 struct]
> trial: {[163×85724 double]}
> fsample: 2048
> sampleinfo: [1 85724]
> time: {[1×85724 double]}
> label: {163×1 cell}
> elec: [1×1 struct]
>
> I used the function as => fieldtrip2eeglab(data{1, 1}.hdr , data{1, 1} )
> and tried also fieldtrip2eeglab(data{1, 1}.hdr , data{1, 1}.trial )
> I get an error
> Reference to non-existent field 'Fs'.
> Error in pop_fileio (line 199)
> EEG.srate = dat.Fs;
>
> I would appreciate if you can help me with that.
>
> Philip
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210608/dc68273f/attachment-0001.htm>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 8 Jun 2021 07:03:37 -1000
> From: Arnaud Delorme <arnodelorme at gmail.com>
> Cc: FieldTrip discussion list <fieldtrip at science.ru.nl>, philip
> Joadavi <p.joadavi at gmail.com>
> Subject: Re: [FieldTrip] fieldtrip2eeglab
> Message-ID: <44BE4CAD-0B15-4BB0-8C28-834731238680 at gmail.com>
> Content-Type: text/plain; charset=utf-8
>
> The best way to convert Fieldtrip data to EEGLAB is to use the pop_fileio function.
>
> EEG = pop_fileio(hdr, dat, events);
>
> As described on this page.
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__eeglab.org_others_EEGLAB-5Fand-5FFieldtrip.html&d=DwIDaQ&c=-35OiAkTchMrZOngvJPOeA&r=q2b2jk6iMqHvTzFUUrmWpFcLBpvSfdmimXkepsdyNwg&m=Y4MtTwnPkCs49uQY1SwgdVpHZb6SofG4hViaPydGiMc&s=JwQkZc27Vjm3jOvAkVfRW6l4a0PayRWUtPMMLdwt4vc&e=
>
> Note that this is what the fieldtrip2eeglab.m is using as well although you might be using an obsolete version.
> Best wishes,
>
> Arno
>
>> On Jun 8, 2021, at 7:01 AM, Delorme, Arnaud <adelorme at ucsd.edu> wrote:
>>
>> The best way to convert Fieldtrip data to EEGLAB is to use the pop_fileio function.
>>
>> EEG = pop_fileio(hdr, dat, events);
>>
>> As described on this page.
>>
>> https://eeglab.org/others/EEGLAB_and_Fieldtrip.html
>>
>> Note that this is what the fieldtrip2eeglab.m is using as well although you might be using an obsolete version.
>> Best wishes,
>>
>> Arno
>>
>>> On Jun 8, 2021, at 6:28 AM, philip Joadavi via fieldtrip <fieldtrip at science.ru.nl> wrote:
>>>
>>> Hi all,
>>>
>>> I would like to use AMICA (an ICA algorithm ) on my data. Unfortunatelly, FieldTrip doe not support AMICA (as far as I know ) and I would like to use EEGLAB for that.
>>>
>>> I'm using fieldtrip2eeglab function to convert my data to EEGLAB, however, I get multiple errors.
>>>
>>> my fieldtrip data is a structure with :
>>>
>>> struct with fields:
>>>
>>> hdr: [1×1 struct]
>>> trial: {[163×85724 double]}
>>> fsample: 2048
>>> sampleinfo: [1 85724]
>>> time: {[1×85724 double]}
>>> label: {163×1 cell}
>>> elec: [1×1 struct]
>>>
>>> I used the function as => fieldtrip2eeglab(data{1, 1}.hdr , data{1, 1} )
>>> and tried also fieldtrip2eeglab(data{1, 1}.hdr , data{1, 1}.trial )
>>> I get an error
>>> Reference to non-existent field 'Fs'.
>>> Error in pop_fileio (line 199)
>>> EEG.srate = dat.Fs;
>>>
>>> I would appreciate if you can help me with that.
>>>
>>> Philip
>>>
>>>
>>> _______________________________________________
>>> fieldtrip mailing list
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__mailman.science.ru.nl_mailman_listinfo_fieldtrip&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=JXMzpyJSYnJcMxEfPzgzaA&m=TJ34Y7C0A382wX4UUUZx4BQve_UAzwEG65TuONZY__k&s=u73WWC-Mtzh-zc5HWk9YzZWjdaJTp9A3F4RYEcBlEMM&e=
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__doi.org_10.1371_journal.pcbi.1002202&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=JXMzpyJSYnJcMxEfPzgzaA&m=TJ34Y7C0A382wX4UUUZx4BQve_UAzwEG65TuONZY__k&s=-rYj5Og7N6H-80F0ZYsllFWkQpk0LEJBkWAUCPiR5Hs&e=
>>
>
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
>
> ------------------------------
>
> End of fieldtrip Digest, Vol 127, Issue 9
> *****************************************
More information about the fieldtrip
mailing list