[FieldTrip] combine MEG data in CTF .ds format with EEG data in ANT eeprobe (.cnt) file

Eshwar Ghumare eshwargg at gmail.com
Wed Dec 20 14:54:52 CET 2023


Hi Jan Mathijs,
Thank you for the reply and suggestions. It worked out :). Integration has
been smooth so far but there are still two problems that I am facing.
1. I want to align (linear registration) EEG positions in the ds.eeg
structure (taken from the CNT file) and MEG positions in the
ds.res4.senres.pos structure. Is there a routine to do so?
2. Original.ds data (MEG only): when read into BESA, it ‘knows’ the CTF MEG
channels are magnetometers. But, after combining with EEG using the
FieldTrip's CTF toolbox, when read into BESA, BESA is showing there are
magnetometer and also gradiometer-type channels. Also, the MEG sensor
location information is lost. I suspect that the gradiometer type is coming
in through writeCTFds or readCTFds functions. Potentially, due to
differences in how FieldTrip and BESA interpret the CTF .ds data coming
from the CTF.
Could anyone please guide me? Potentially, some of you have experienced
this as well.
Thank you in advance for the help
Best regards,
Eshwar

On Wed, Sep 13, 2023 at 7:15 PM Schoffelen, J.M. (Jan Mathijs) via
fieldtrip <fieldtrip at science.ru.nl> wrote:

> Hi Eshwar,
>
> I don’t know. I’ve never had the need (luckily I guess) to try this myself.
>
> Are you sure that the issue is specific to adding ‘EEG’ channels to the
> *.ds, or might it (i.e. the new data all being 0) be independent of what
> you try to write into the file.
>
> I would check getCTFdata starting from line 321, which is a complicated
> section that combines with all types of ‘gain’ from the res4 header
> information, into a single number that is used as the ‘final gain’. Working
> your way backwards I guess that you’d need to at least adjust the same
> fields in the senres struct-array, in order to get anywhere close to
> success.
>
> Best wishes and good luck,
>
> Jan-Mathijs
>
>
>
> > On 13 Sep 2023, at 12:27, Eshwar Ghumare via fieldtrip <
> fieldtrip at science.ru.nl> wrote:
> >
> > Hi,
> > I am trying to combine simultaneously acquired MEG data in CTF .ds
> format and EEG data in ANT eeprobe 64-bit extended (.cnt) format in single
> .ds file.  I am using the CTF toolbox under Field Trip to read and write
> the CTF file. The triggers sent help me align the data, including
> resampling.
> >
> > I modified ds.res4.chanNames, ds.res4.senres and data to add the
> required EEG channels from the CNT file. But I think I am unsure about
> qgain, gain. By setting the qgain, gain, equal to 1 for the EEG channels
> and using unit 'T' ( that is, EEG data copied to CNT was converted to
> volts) for reading and writing the file, I can write the file successfully,
> but when I read the saved file again, my EEG data copied from CNT is
> changed to 0 for all channels.
> >
> > Could anyone please guide me on the correct way to do so?
> > Thank you in advance for the help
> > Best regards,
> > Eshwar
> > _______________________________________________
> > fieldtrip mailing list
> > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
> https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!4UNSJm9fNVIOhn3XcpQuwD1jaRea_VDj4ZplBcZfG1VI4CFgGRrGcUgeO70DFfcVyhrggZG78PeyInbIbMJNoVVLjwvqDOP_kce6oA$
>
>
> _______________________________________________
> 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/20231220/c87e861a/attachment.htm>


More information about the fieldtrip mailing list