[FieldTrip] Issue in ft_virtualchannel

Marta Stojanović marta.stojanovic at student.uva.nl
Thu Jan 19 22:31:24 CET 2023


Hi,

I hope this question finds you well. I'm trying to use the ft_virtualchannel function to parcellate my source data obtained from ft_sourceanalysis, and time lock data of all trials from ft_covariance.

My code looks like the following:

cfg = [];
cfg.method = 'pca';
cfg.pos = 'pos';
parc_trls = ft_virtualchannel(cfg, tlck_all, dummy_source_trans, source_plot);

Where source_plot is volume+label data, dummy_source_trans is source data, and tlck_all is time lock. The source plot is a downscaled, interpolated version of the AAL atlas (source data interpolated onto the AAL atlas).

My structs look like the following:

tlck_all =

time: [1×1018 double]
label: {245×1 cell}
grad: [1×1 struct]
sampleinfo: [141×2 double]
trial: [141×245×1018 double]
trialinfo: [141×2 double]
dimord: 'rpt_chan_time'
cov: [141×245×245 double]
cfg: [1×1 struct]
avg: [1×1 struct]


dummy_source_trans =
time: 0
cfg: [1×1 struct]
dim: [26 33 28]
inside: [24024×1 logical]
pos: [24024×3 double]
method: 'average'
avg: [1×1 struct]

source_plot =

dim: [26 33 28]
transform: [4×4 double]
unit: [1×1 struct]
tissue: [26×33×28 double]
tissuelabel: {1×116 cell}
cfg: [1×1 struct]
inside: [24024×1 logical]
pow: [24024×1 double]
eta: [24024×1 double]

I receive the following error when trying to run the ft_virtualchannel: Error using ft_virtualchannel (line 175): the requested dipole position is > 1 mm away from the closest source position. I've used cfg.parcellation = 'tissue' instead of cfg.pos, I've played around with the measurement units of the time lock, source, and atlas data.

I've also tried to use ft_dipolefitting on tlck_all, but I receive the following error:

Unrecognized field name "avg". Error in ft_dipolefitting (line 269)Vdata = data.avg(seldata, :);

This error persists both when I include 'avg' included and not included in the struct.

I wonder if you might have any tips on how to run the ft_virtualchannel properly. I can of course provide more details if necessary.

Thanks in advance!

Best,Marta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230119/72ecc264/attachment.htm>


More information about the fieldtrip mailing list