[FieldTrip] CTF275 MEG channel position from FieldTrip to EEGLAB

Arnaud Delorme arnodelorme at gmail.com
Tue Jul 12 03:22:45 CEST 2022


Thanks,

Arno

> On Jul 11, 2022, at 5:48 PM, Zhi Li via fieldtrip <fieldtrip at science.ru.nl> wrote:
> 
> Sure. In line 242 of pop_fileio, I changed 'eegchanindx = find(ft_chantype(dat, 'refmag') | ft_chantype(dat, 'gradmag'))' to 'eegchanindx = find( ft_chantype(dat, 'meggrad') )'. I guess the channel type of some other MEG data is 'gradmag'. I also removed the reference channels because they are not useful in IClabel and somehow their channel's locations are mistakenly transferred from gradimtere channels. 
> 
> Best,
> 
> Zhi Li
> 
> On Mon, 11 Jul 2022 at 19:27, Arnaud Delorme <arnodelorme at gmail.com> wrote:
> Thank you Zhi Li,
> 
> Would you mind sharing the modified code of pop_fileio?
> 
> Arno
> 
> > On Jul 11, 2022, at 4:07 PM, Zhi Li via fieldtrip <fieldtrip at science.ru.nl> wrote:
> > 
> > Hi Arno,
> > 
> > Many thanks for your kind suggestions. You are right about the difference between EEG and MEG data and IClabel is modelled with EEG data. But I found that the eye components of most of our MEG dataset can be correctly labelled by IClabel. I did not use the components labelled by IClabel directly, instead I just use IClabel to narrow the search for artifactual components in our MEG dataset with hundreds of subjects that each one completed several tasks. I ranked the score by IClabel and found most artefact components were in the top 3 components. In my preprocessing pipeline, I manually find and check the artifactual components in the top 3 components labeled by IClabel or top 10 if the artefact components were not in the top 3. I found this strategy is working for all of our dataset.
> > 
> > About the data transformation between Fieldtrip and EEGLAB, I solved this one by adding the channel type of CTF275 to pop_fileio.
> > 
> > Thanks and best,
> > 
> > Zhi Li
> > 
> > On Mon, 11 Jul 2022 at 17:49, Arnaud Delorme via fieldtrip <fieldtrip at science.ru.nl> wrote:
> > Hi Zhi Li, 
> > 
> > You cannot use IClabel to detect ICA artifactual components because MEG components will be different than EEG components, and IClabel has been trained with EEG components. You would need a version of ICLabel that is trained with MEG components (there is no such version to my knowledge). This page describes how to go back and forth between Fieldtrip and EEGLAB https://eeglab.org/others/EEGLAB_and_Fieldtrip.html
> > 
> > Cheers,
> > 
> > Arno
> > 
> > 
> > > On Jul 6, 2022, at 2:27 PM, Zhi Li via fieldtrip <fieldtrip at science.ru.nl> wrote:
> > > 
> > > Hi Jan-Mathijs,
> > > 
> > > Many thanks for your kind reply. I have solved this problem by adding the ctf275 channel type to the source code for data reading. I'd like to use IClabel which is a plugin of EEGLAB to label the components automatically. 
> > > 
> > > Best wishes,
> > > 
> > > Zhi Li
> > > 
> > > On Wed, 6 Jul 2022 at 12:01, Schoffelen, J.M. (Jan Mathijs) via fieldtrip <fieldtrip at science.ru.nl> wrote:
> > > Hi Zhi Li,
> > > 
> > > I am unfamiliar with the way in which EEGLAB deals with sensor/electrode positions, and how these are read from the data file. 
> > > 
> > > On the other hand it is unclear to me what your actual problem is. Is it only a matter of visualization (because for ICA the sensor positions are not needed)? Have you checked the EEGLAB documentation?
> > > 
> > > Since you are asking for another solution: you can also do the ICA in fieldtrip, there’s no need to go to eeglab for that.
> > > 
> > > Best wishes,
> > > Jan-Mathijs
> > >  
> > > 
> > >> On 30 Jun 2022, at 22:07, Zhi Li via fieldtrip <fieldtrip at science.ru.nl> wrote:
> > >> 
> > >> Hi,
> > >> 
> > >> I would like to use ICA and IClabel in EEGLAB to detect artefacts in my MEG data. But no matter if I used fieldtrip2eeglab or pop_fileio, the gradiometer channel positions cannot be correctly extracted from the ctf275 .ds folder. The channel positions in eeglab format EEG are all empty.
> > >> 
> > >> I tried to copy the channel information directly from the header of the ctf275 data folder but the MEG channels cannot be projected on the 2-D map appropriately. It seems like the channel position in the MEG data imported by FieldTrip are the real locations of the MEG helmet and their unit is cm. whereas the channel position in EEGLAB is based on the 10-10 system which is already on the scalp. Hence the projected channels on the scalp are all misplaced if I use the raw XYZ from the header of ctf275 data.
> > >> 
> > >> May I ask how I could transform the MEG channel position from FieldTrip to EEGLAB appropriately, or is there any other solution? Many thanks.
> > >> 
> > >> Best regards,
> > >> 
> > >> Zhi Li
> > >> _______________________________________________
> > >> fieldtrip mailing list
> > >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> > >> https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!4nlSbH_0GXpYql1b5BdmOauGlwBmYWcD-GcO2tTXUsfc7B01vIZIOnzrL6yddIU4oGwbRSce4zkCW-a0CZssZMEWx9fEFWyg2DIGqA$ 
> > > 
> > > _______________________________________________
> > > 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://urldefense.com/v3/__https://mailman.science.ru.nl/mailman/listinfo/fieldtrip__;!!Mih3wA!C3U9Le9A9AoDfDFEKUzitfx5fmK8ciwvwDYBboeO2pzxPq9gC9-8x0tcS37w6_d4DSFYmuoo3gAF-iRwv1nv$ 
> > https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!Mih3wA!C3U9Le9A9AoDfDFEKUzitfx5fmK8ciwvwDYBboeO2pzxPq9gC9-8x0tcS37w6_d4DSFYmuoo3gAF-mb4cCEN$ 
> 
> _______________________________________________
> fieldtrip mailing list
> https://urldefense.com/v3/__https://mailman.science.ru.nl/mailman/listinfo/fieldtrip__;!!Mih3wA!BtDtvBOm_9ha-2x5lPV5CnIqytZRssQ6YFWRzTY8e-eMxyajC-KKV7uViS9Tipq8yGPF7Bd0F8SRzJkJrmhZ$ 
> https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!Mih3wA!BtDtvBOm_9ha-2x5lPV5CnIqytZRssQ6YFWRzTY8e-eMxyajC-KKV7uViS9Tipq8yGPF7Bd0F8SRzEuJXdMe$




More information about the fieldtrip mailing list