[FieldTrip] plotting interpolated sources with ft_sourceplot
Tyler Grummett
tyler.grummett at flinders.edu.au
Mon Mar 31 09:41:31 CEST 2014
Hey Jorn,
Previously I have let ft_sourceanalysis do a lead field because if I use the following code:
% compute lead field ( apparently source analysis computes
% lead field anyway
cfg = [];
cfg.elec = timelock.elec;
cfg.vol = vol;
cfg.reducerank = 3;
cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution
cfg.grid.unit = 'cm';
cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window
grid = ft_prepare_leadfield( cfg); %% THIS IS WHERE I AM UP TO
and then calculate the source analysis:
% Source Analysis: without contrasting condition
cfg = [];
cfg.method = 'lcmv';
cfg.grid = grid;
cfg.vol = vol;
% cfg.grid.pos = maxpos;
cfg.keepfilter = 'yes';
cfg.dics.projectnoise = 'yes';
% cfg.dics.lambda = 0;
source = ft_sourceanalysis( cfg, timelock);
then I get an error than says:
Error using *
Inner matrix dimensions must agree.
Error in beamformer_lcmv (line 268)
filt = pinv(lf' * invCy * lf) * lf' *
invCy; % van Veen eqn. 23, use
PINV/SVD to cover rank deficient leadfield
Error in ft_sourceanalysis (line 794)
dip(i) = beamformer_lcmv(grid, sens, vol,
squeeze_avg, squeeze(Cy(i,:,:)),
optarg{:});
I just removed the leadfield code and it successfully ran. I could also interpolate it later.
Is this the correct approach.
Thankyou in advance!
Tyler
*************************
Tyler Grummett ( BBSc, BSc(Hons I))
PhD Candidate
Brain Signals Laboratory
Flinders University
Rm 5A301
Ext 66124
________________________________________
From: fieldtrip-bounces at science.ru.nl <fieldtrip-bounces at science.ru.nl> on behalf of "Jörn M. Horschig" <jm.horschig at donders.ru.nl>
Sent: Monday, 31 March 2014 5:30 PM
To: FieldTrip discussion list
Subject: Re: [FieldTrip] plotting interpolated sources with ft_sourceplot
Hi Tyler,
what you are describing sounds to me like the center bias of the
beamformer. Did you contrast the activity with anything, or did you
normalize your leadfield?
Check this out:
http://fieldtrip.fcdonders.nl/tutorial/beamformer#source_analysiswithout_contrasting_condition
Best,
Jörn
On 3/31/2014 5:46 AM, Tyler Grummett wrote:
> I have been trying to plot my interpolated source data using the code:
>
> % interpolate sources
> mri = ft_read_mri('Subject01.mri');
> mri = ft_volumereslice([], mri);
> cfg = [];
> cfg.downsample = 2;
> cfg.parameter = 'avg.pow';
> sourceInt = ft_sourceinterpolate( cfg, source, mri);
> sourceInt = rmfield( sourceInt,'time'); % The avg.pow
> parameter
> % does not vary over time, therefore the time dimension
> is not needed.
>
> % Plot interpolated data
> cfg = []; %#ok<UNRCH>
> cfg.method = 'ortho'; % spline
> cfg.funparameter = 'avg.pow';
> ft_sourceplot( cfg, sourceInt);
>
> However the figure that comes up just had orange squares in the subplots.
>
> I dont know where Ive gone wrong.
>
>
> Tyler
>
>
> *************************
>
> /Tyler Grummett ( BBSc, BSc(Hons I))/
> /PhD Candidate/
> /Brain Signals Laboratory/
> /Flinders University/
> /Rm 5A301/
> /Ext 66124/
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
--
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team
P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands
Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel: +31-(0)24-36-68493
Web: http://www.ru.nl/donders
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
More information about the fieldtrip
mailing list