[FieldTrip] Keeptrials using "pcc" for source analysis
"Jens Klinzing, Universität Tübingen"
jens.klinzing at uni-tuebingen.de
Wed Jan 4 16:47:12 CET 2017
are you sure your output does not contain trial data?
If you look in source.avg.mom you should see a cell array containing for
each inside source point another cell array with as many entries as
there are trials (I know it is confusing because you expect .avg to
contain averages, but it may not). The field .csd (cross-spectral
density) should contain only one (complex-valued) entry per source point
since it is averaged across trials (or calculated on the average over
all trials, not sure right now).
By the way: In case you get errors in downstream functions with your
current output (e.g. when using ft_sourcegrandaverage) check the
bugzilla on PCC output containing the spatial filter (e.g.
http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=2861 or 3184).
If you don't really need the filter you can use cfg.keepfilter = 'no' on
ft_sourceanalysis or remove the filter and filterdimord fields when
calling functions that would otherwise fail.
> Xie Wanze <mailto:xiew1202 at gmail.com>
> Samstag, 31. Dezember 2016 15:09
> Dear Fieldtrip community,
> I have a question about using the "keeptrials" option when do the
> source analysis with the beamformer ('PCC') method. The issue I met
> was that the cfg.keeptrials = 'yes' did not work, i.e., the
> calculation was not done for all the trials but generated averaged
> Has anyone met this issue before? And does anyone know how to fix it?
> It did not work for my data nor for the data I downloaded from the FT
> database. I attached the codes that I copied from the FT website using
> the FT's example data.
> I would like to keep the trials information in the source analysis
> because I plan to do the source space connectivity analysis later,
> which needs the individual trials information. Or maybe the
> "crsspctrm" matrix.
> cfg = ;
> cfg.frequency = freq.freq;
> cfg.method = 'pcc';
> cfg.grid = lf;
> cfg.headmodel = hdm;
> cfg.keeptrials = 'yes';
> cfg.pcc.lambda = '10%';
> cfg.pcc.projectnoise = 'yes';
> cfg.pcc.keepfilter = 'yes';
> cfg.pcc.fixedori = 'yes';
> source = ft_sourceanalysis(cfg, freq);
> Output ("source"):
> freq: 10
> cumtapcnt: [268x1 double]
> tri: [16000x3 double]
> inside: [8004x1 logical]
> pos: [8004x3 double]
> method: 'average'
> avg: [1x1 struct]
> cfg: [1x1 struct]
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fieldtrip