[FieldTrip] Issue in ft_virtualchannel

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Fri Jan 20 10:38:11 CET 2023


Dear Marta,

If you are sure that the dipole positions in dummy_source_trans and source_plot are topologically equivalent, you could try and replace source_plot.pos with dummy_source_trans.pos.

Given the absence of additional information about the error in ft_dipolefitting, there’s no way I can comment on that

On 19 Jan 2023, at 22:31, Marta Stojanović via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

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
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!41tr5QP5vzFjJgdDw-D7ZDbYEAO_awhe-4opaXxzDrBXcCMD1BqQO0brFJn_0ssNwjePB6Edit0XhSJTux2-HrU3JmVAeVrtp5s7fw$

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


More information about the fieldtrip mailing list