[FieldTrip] how to combining gradiometer/magnetometer sensors - neuromag(elekta) data

bagen hasi hasibagenedu at gmail.com
Wed Apr 27 14:25:29 CEST 2022


Thank you very much for your reply, my problem is solved.

I really thank you for that!

mikkelcv at drcmr.dk <mikkelcv at drcmr.dk>

> You can use ft_appenddata to merge dataset with different channels; for
> example MEG data, EEG data, and extra channels:
>
> %% Append all data
>
> cfg = [];
>
> preprocessed_data = ft_appenddata(cfg, preprocessed_data_MEG,
> preprocessed_data_EEG, preprocessed_data_ExG);
>
>
>
> If they all have the same sample info FieldTrip will know to append them
> as different channels on the same trial.
>
>
>
> Best regards
>
> Mikkel
>
>
>
>
>
> *Fra: *fieldtrip <fieldtrip-bounces at science.ru.nl> på vegne af bagen hasi
> via fieldtrip <fieldtrip at science.ru.nl>
> *Dato: *onsdag, 27. april 2022 kl. 11.08
> *Til: *fieldtrip at science.ru.nl <fieldtrip at science.ru.nl>
> *Cc: *bagen hasi <hasibagenedu at gmail.com>
> *Emne: *[FieldTrip] how to combining gradiometer/magnetometer sensors -
> neuromag(elekta) data
>
> Does anyone know how to use fieldtrip to merge two separate files (mag,
> grad) back into one?
> I did grad and mag separately and saved them separately when I was doing
> ICA.
> But now I want to do source positioning, and I want to use all channels
> together for source positioning, how do I merge grad and mag back into one
> folder?
>
> Can I just merge the Matlab structure of grad and mag files? Will some
> information be lost this way?
>
> This is my previous code
>
> %% magnetometers ICA
> cfg=[]; cfg.channel={'MEG*1'};
> data_orig=ft_selectdata(cfg,data);
> save(['sub2019' subjectID{x} '_origmag.mat'],'data_orig', '-v7.3');
>
> %% planar gradiometers ICA
> cfg=[]; cfg.channel={'MEG*2','MEG*3'};
> data_orig=ft_selectdata(cfg,data);
> save(['sub2019' subjectID{x} '_origgrad.mat'],'data_orig', '-v7.3');
>
> I searched a previous question, but I didn't find in it exactly how to do
> this, and I also searched the fieldtrip GitHub site, but I didn't find the
> relevant statements either.
>
> https://mailman.science.ru.nl/pipermail/fieldtrip/2017-May/037417.html
>
> I was wondering if you could help me with this?
>
> Thank you for your time and I look forward to hearing from you soon!
>
> Best regards,
> Hasi Bagen
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220427/8823b604/attachment.htm>


More information about the fieldtrip mailing list