[FieldTrip] Regarding analysis of MEG data

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Mon May 2 09:17:06 CEST 2022


Hi Saini,

The error you get is caused by the fact that FieldTrip is not clairvoyant. Specifically, it is not able to figure out what the fileformat of your data is. You need to explicitly point to an existing file (with file extension) in cfg.dataset. I am not clairvoyant either, but given your specifications, my guess would be that you need to write something like: ‘C:\blabla\subject_1_MEG_data\4\c,rfDC’, assuming you are dealing with 4D neuroimaging data. If it’s another MEG data format your are using, you’d need to specify the appropriate filename for that system.

Best wishes and good luck.

Jan-Mathijs


On 22 Apr 2022, at 18:58, Shubhangi Saini via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Hi
This is my code
cfg = [];
cfg.dataset = 'C:\Users\hp\Documents\MATLAB\subject_1\MEG_data\4';
data_meg = ft_preprocessing(cfg,MEG_data);
for trialsel=1:10
chansel = 1; % this is the STIM channel that contains the trigger
figure
plot(data_meg.time{trialsel}, data_meg.trial{trialsel}(chansel, :))
xlabel('time (s)')
ylabel('channel amplitude (a.u.)')
title(sprintf('trial %d', trialsel));
end

And I am getting the following error please someone help me out.
Error using ft_read_header
unsupported header format "unknown"

Error in ft_preprocessing (line 404)
  hdr = ft_read_header(cfg.headerfile, headeropt{:});
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!-ig0ZjvOaj67RHMp96oKOB7JZMLooOwDTjYidKl3f5IJbHsSahEos_kB_EnalThyu1vxTIZj7wTxVv4ix_3hL_VudGj1mCfYCT9ngw$

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220502/ba952f9c/attachment.htm>


More information about the fieldtrip mailing list