<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear Field trippers,
<div>And especially dear Neuromag users,</div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>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!!!</div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>Neuromag users, does this look accurate to you?</div>
<div><br>
</div>
<div>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?</div>
<div><br>
</div>
<div>As always, any help is much appreciated!</div>
<div><br>
</div>
<div>Here is the code as I have been currently using it:</div>
<div><br>
</div>
<div>
<div><font color="#339966">%% Load MRI</font></div>
<div><br>
</div>
<div>mri = ft_read_mri('Subject1.nii');</div>
<div><br>
</div>
<div><font color="#008000">%% Realigning </font></div>
<div>cfg=[];</div>
<div>cfg.coordsys = 'neuromag';</div>
<div>mri = ft_volumerealign(cfg, mri);</div>
<div> </div>
<div><font color="#008000">%% Segmentation. </font></div>
<div><br>
</div>
<div>cfg = [];</div>
<div>cfg.coordsys='neuromag';</div>
<div>cfg.units='mm';</div>
<div>seg = ft_volumesegment(cfg, mri);</div>
<div><br>
</div>
<div><font color="#008000">%% Prepare volumne conduction model</font></div>
<div><br>
</div>
<div>cfg = [];</div>
<div>cfg.method = 'singleshell';</div>
<div>vol = ft_prepare_headmodel(cfg, seg);</div>
<div> </div>
<div><font color="#008000">%% Non warped grid for use in single subject comparison btw conditions </font></div>
<div>cfg = [];</div>
<div>cfg.grid.xgrid  = -20:1:20;</div>
<div>cfg.grid.ygrid  = -20:1:20;</div>
<div>cfg.grid.zgrid  = -20:1:20;</div>
<div>cfg.grid.unit   = 'cm';</div>
<div>cfg.grid.tight  = 'yes';</div>
<div>cfg.vol        = vol;</div>
<div>sourcemodel          = ft_prepare_sourcemodel(cfg);</div>
<div><br>
</div>
<div><font color="#008000">%% Calculates leadfields</font></div>
<div><br>
</div>
<div>cfg                 = [];</div>
<div>cfg.grid=sourcemodel;</div>
<div>cfg.vol             = vol;</div>
<div>cfg.channel={'MEGGRAD'};% For Planar gradiometers only</div>
<div>cfg.grad=grad;%This needs to be edited to represent the MEG data set which has just been loaded</div>
<div>grid = ft_prepare_leadfield(cfg, Condition1);</div>
<div><br>
</div>
<div><font color="#008000">%% Append individuals data from two conditions. </font></div>
<div><font color="#008000">%This is so as to create a common filter, from the two conditions.</font></div>
<div>cfg=[];    </div>
<div>cfg.appenddim = 'rpt';</div>
<div>combined = ft_appendtimelock(cfg, Condition1, Condition2);</div>
<div><br>
</div>
<div><font color="#008000">%% Calculate covariance and timelock. Input data should NOT have been timelocked before this.</font></div>
<div><br>
</div>
<div>cfg                  = [];</div>
<div>cfg.keeptrials    = 'yes';</div>
<div>cfg.covariance       = 'yes';</div>
<div>cfg.covariancewindow = 'all';</div>
<div>cfg.vartrllength     = 2;</div>
<div>cfg.channel='MEGGRAD'; </div>
<div>tlckavgCond1          = ft_timelockanalysis(cfg, Condition1);</div>
<div>tlckavgCombined           = ft_timelockanalysis(cfg, combined);</div>
<div><br>
</div>
<div><font color="#008000">%% Create spatial filter using the lcmv beamformer</font></div>
<div>cfg                  = [];</div>
<div>cfg.grid             = grid; % leadfield, which has the grid information</div>
<div>cfg.grad=grad; </div>
<div>cfg.vol              = vol; % volume conduction model (headmodel)</div>
<div>cfg.keepfilter       = 'yes';</div>
<div>cfg.lcmv.fixedori    = 'yes'; % project on axis of most variance using SVD</div>
<div>cfg.channel='MEGGRAD'; </div>
<div>sourceCombined = ft_sourceanalysis(cfg, tlckavgCombined);%</div>
<div><font color="#008000">%%</font></div>
<div>cfg.grid.filter = sourceCombined.avg.filter;</div>
<div>cfg.rawtrial='yes';</div>
<div>sourceCond1=ft_sourceanalysis(cfg, tlckavgCond1);</div>
<div><br>
</div>
<div><font color="#008000">%% The cluster stats at source space:</font></div>
<div><br>
</div>
<div>%%</div>
<div>cfg=[];</div>
<div>cfg.dim=sourceCond1.dim;</div>
<div>cfg.method      = 'montecarlo';</div>
<div>cfg.statistic   = 'depsamplesT';</div>
<div>cfg.parameter   = 'pow';</div>
<div>cfg.correctm    = 'cluster';</div>
<div>cfg.numrandomization = 1000;</div>
<div>cfg.alpha       = 0.05;</div>
<div>cfg.tail        = 0;</div>
<div>cfg.clusteralpha = 0.005;</div>
<div>cfg.minnbchan = 8;</div>
<div>cfg.correcttail = 'alpha';</div>
<div>cfg.clusterstatistic = 'maxsum';</div>
<div>Nsub = 84; </div>
<div>cfg.design(1,1:2*Nsub)  = [ones(1,Nsub) 2*ones(1,Nsub)];</div>
<div>cfg.design(2,1:2*Nsub)  = [1:Nsub 1:Nsub];</div>
<div>cfg.ivar                = 1; % the 1st row in cfg.design contains the independent variable</div>
<div>cfg.uvar                = 2; % the 2nd row in cfg.design contains the subject number</div>
<div>  </div>
<div>stat = ft_sourcestatistics(cfg, sourceCond1, sourceCond2);</div>
<div><br>
</div>
<div><font color="#008000">%% interpolate the t maps to the structural MRI of the subject %</font></div>
<div>cfg = [];</div>
<div>cfg.parameter = 'mask';</div>
<div>statplot = ft_sourceinterpolate(cfg,stat, mri); </div>
<div><font color="#008000">%% plot the t values on the MRI %</font></div>
<div><br>
</div>
<div>cfg = [];</div>
<div>cfg.method        = 'slice';</div>
<div>cfg.funparameter  = 'mask';</div>
<div>cfg.maskparameter = 'funparameter';</div>
<div>figure</div>
<div>ft_sourceplot(cfg, statplot);</div>
<div><font color="#008000">%%</font></div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</body>
</html>