[FieldTrip] Virtual electrode data error
Schoffelen, J.M. (Jan Mathijs)
jan.schoffelen at donders.ru.nl
Tue Mar 12 15:31:52 CET 2019
Hi Holly,
You need to ensure that the field RSN_data.label is consistent with the time courses in RSN_data.trial. I suspect that your variable ‘ROI’ is not what it should be.
If there is only a single time course, RSN_data.label should be a 1x1 cell-array with a string in it, e.g. {‘my_virtual_channel’};
Best wishes,
Jan-Mathijs
J.M.Schoffelen, MD PhD
Associate PI, VIDI-fellow - PI, language in interaction
Telephone: +31-24-3614793
Physical location: room 00.028
Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands
On 12 Mar 2019, at 11:29, Holly Rossiter <RossiterH at cardiff.ac.uk<mailto:RossiterH at cardiff.ac.uk>> wrote:
Hi there,
I am creating some virtual electrode data as recommended on your website using this code:
RSN_filter = source_idx.avg.filter{1};
chansel = ft_channelselection('MEG', pain.label);
chansel = match_str(pain.label, chansel);
RSN_data = [];
RSN_data.label = ROI;
RSN_data.time = pain.time;
RSN_data.fsample = pain.fsample;
for i=1:length(pain.trial)
RSN_data.trial{i} = RSN_filter * pain.trial{i}(chansel,:);
End
Then when I try and view the data using ft_databrowser like this:
cfg = [];
cfg.viewmode = 'vertical';
ft_databrowser(cfg, RSN_data);
I get this error:
the input is raw data with 7 channels and 60 trials
Error using ft_datatype_raw (line 84)
inconsistent number of channels in trial 1
Error in ft_checkdata (line 268)
data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo);
Error in ft_databrowser (line 281)
data = ft_checkdata(data, 'datatype', {'raw+comp', 'raw'}, 'feedback',
'yes', 'hassampleinfo', 'yes');
I can see that there is only 1 channel in the data structure so I cannot understand why it thinks there are 7. I have tried using a recent version of fieldtrip (20190219) but still get the same error.
Can you help me work out why this is?
Thanks,
Holly
_______________________________________________
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/20190312/67b75ce4/attachment-0002.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202
More information about the fieldtrip
mailing list