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

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Wed Sep 13 18:47:28 CEST 2023


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$ 




More information about the fieldtrip mailing list