[FieldTrip] (no subject)

Kaelasha Tyler ktyler at swin.edu.au
Wed Nov 5 14:50:48 CET 2014


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);
%%







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141105/70747a70/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RH_ButtonPush.jpg
Type: image/jpeg
Size: 37138 bytes
Desc: RH_ButtonPush.jpg
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141105/70747a70/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Sensors_Volume.jpg
Type: image/jpeg
Size: 26947 bytes
Desc: Sensors_Volume.jpg
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141105/70747a70/attachment-0003.jpg>


More information about the fieldtrip mailing list