[FieldTrip] (no subject)

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Wed Nov 5 15:59:09 CET 2014


Hi Kaelasha,

It's hard to evaluate why the localization in not exactly how you would
expect it, but here are some idea you could try from the top of my head.
Note I never used LCMV beamformer myself, although I've done DICS.
Also, to me there seems to be not something obviously *wrong *in the code
or pictures, so I'm just suggesting some thoughts here.

- Beamformer performance is VERY dependent on the data. Check your sensor
level data, clean it more if necessary.
- Play around with including more or less data centered around the
component you are localizing for both the common filter as the data you
localize. Since I don't know the details of the data (nor do i have
experience with LCMV) your choices here are hard to evaluate.
- Plot the scalp as well to get a better idea whether your co-registration
is accurate. If you have additional headpoints e.g. by using a Polhemus,
that would help.
- Play around with some regularization - in ft_sourceanalysis use e.g.:
cfg.alpha = '10%';
- Evaluate your lcmv beamformer with a dipole fit.
- Check other subjects/recordings - other recordings might be better (or
worse...)

Finally, if you haven't already, take a look at the scripts we used in our
recent workshop using a Neuromag system (although as I said I see nothing
wrong with your script):
http://fieldtrip.fcdonders.nl/workshop/stockholm2014q3

The beamformer lecture there given by Robert on Beamforming is also online:
http://natmeg.se/wp/activities/natmeg-lectures/

Good luck!
Stephen




On 5 November 2014 14:50, Kaelasha Tyler <ktyler at swin.edu.au> wrote:

>  Dear Field trippers,
> And especially dear Neuromag users,
>
>  I have been going back over the analysis of my study, ironing out
> issues, and am finding that I am still having problems with source analysis
> coming up with some unexpected and probably inaccurate locations for
> clusters of significant effects.
>
>  I have decided to go back and look at a simple right handed button push,
> in one subject, to check if I was able to locate a realistic region in M1.
>
>  From the attached jpeg, you will see that the analysis is not accurately
> locating left hemisphere motor regions. I know I can't expect absolute
> accuracy, but I would be hoping for more than this.
>
>  I have included my code (below) and if any one has any suggestions about
> how to remedy this and produce more accurate results, please let me know!!!
>
>  I am wondering if I have realigned my mri to the neuromag system
> correctly, and have attached another jpeg of my volume conduction model,
> plotted alongside the neuromag sensors.
>
>  Neuromag users, does this look accurate to you?
>
>  As a general fix, I was wondering if any neuromag users would be happy
> to supply their FT code for use of mri, including realignment of mri to the
> neuromag system, segmentation and the creation of the volume conduction
> model?
>
>  As always, any help is much appreciated!
>
>  Here is the code as I have been currently using it:
>
>  %% Load MRI
>
>  mri = ft_read_mri('Subject1.nii');
>
>  %% Realigning
> cfg=[];
> cfg.coordsys = 'neuromag';
> mri = ft_volumerealign(cfg, mri);
>
> %% Segmentation.
>
>  cfg = [];
> cfg.coordsys='neuromag';
> cfg.units='mm';
> seg = ft_volumesegment(cfg, mri);
>
>  %% Prepare volumne conduction model
>
>  cfg = [];
> cfg.method = 'singleshell';
> vol = ft_prepare_headmodel(cfg, seg);
>
> %% Non warped grid for use in single subject comparison btw conditions
> cfg = [];
> cfg.grid.xgrid  = -20:1:20;
> cfg.grid.ygrid  = -20:1:20;
> cfg.grid.zgrid  = -20:1:20;
> cfg.grid.unit   = 'cm';
> cfg.grid.tight  = 'yes';
> cfg.vol        = vol;
> sourcemodel          = ft_prepare_sourcemodel(cfg);
>
>  %% Calculates leadfields
>
>  cfg                 = [];
> cfg.grid=sourcemodel;
> cfg.vol             = vol;
> cfg.channel={'MEGGRAD'};% For Planar gradiometers only
> cfg.grad=grad;%This needs to be edited to represent the MEG data set which
> has just been loaded
> grid = ft_prepare_leadfield(cfg, Condition1);
>
>  %% Append individuals data from two conditions.
> %This is so as to create a common filter, from the two conditions.
> cfg=[];
> cfg.appenddim = 'rpt';
> combined = ft_appendtimelock(cfg, Condition1, Condition2);
>
>  %% Calculate covariance and timelock. Input data should NOT have been
> timelocked before this.
>
>  cfg                  = [];
> cfg.keeptrials    = 'yes';
> cfg.covariance       = 'yes';
> cfg.covariancewindow = 'all';
> cfg.vartrllength     = 2;
> cfg.channel='MEGGRAD';
> tlckavgCond1          = ft_timelockanalysis(cfg, Condition1);
> tlckavgCombined           = ft_timelockanalysis(cfg, combined);
>
>  %% Create spatial filter using the lcmv beamformer
> cfg                  = [];
> cfg.grid             = grid; % leadfield, which has the grid information
> cfg.grad=grad;
> cfg.vol              = vol; % volume conduction model (headmodel)
> cfg.keepfilter       = 'yes';
> cfg.lcmv.fixedori    = 'yes'; % project on axis of most variance using SVD
> cfg.channel='MEGGRAD';
> sourceCombined = ft_sourceanalysis(cfg, tlckavgCombined);%
> %%
> cfg.grid.filter = sourceCombined.avg.filter;
> cfg.rawtrial='yes';
> sourceCond1=ft_sourceanalysis(cfg, tlckavgCond1);
>
>  %% The cluster stats at source space:
>
>  %%
> cfg=[];
> cfg.dim=sourceCond1.dim;
> cfg.method      = 'montecarlo';
> cfg.statistic   = 'depsamplesT';
> cfg.parameter   = 'pow';
> cfg.correctm    = 'cluster';
> cfg.numrandomization = 1000;
> cfg.alpha       = 0.05;
> cfg.tail        = 0;
> cfg.clusteralpha = 0.005;
> cfg.minnbchan = 8;
> cfg.correcttail = 'alpha';
> cfg.clusterstatistic = 'maxsum';
> Nsub = 84;
> cfg.design(1,1:2*Nsub)  = [ones(1,Nsub) 2*ones(1,Nsub)];
> cfg.design(2,1:2*Nsub)  = [1:Nsub 1:Nsub];
> cfg.ivar                = 1; % the 1st row in cfg.design contains the
> independent variable
> cfg.uvar                = 2; % the 2nd row in cfg.design contains the
> subject number
>
> stat = ft_sourcestatistics(cfg, sourceCond1, sourceCond2);
>
>  %% interpolate the t maps to the structural MRI of the subject %
> cfg = [];
> cfg.parameter = 'mask';
> statplot = ft_sourceinterpolate(cfg,stat, mri);
> %% plot the t values on the MRI %
>
>  cfg = [];
> cfg.method        = 'slice';
> cfg.funparameter  = 'mask';
> cfg.maskparameter = 'funparameter';
> figure
> ft_sourceplot(cfg, statplot);
> %%
>
>
>
>
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141105/f7d2b355/attachment-0002.html>


More information about the fieldtrip mailing list