<div dir="ltr">Dear Kaelasha,<div>I recently came across the exact same problem in my Neuromag source analysis: mislocalization of motor beta over M1 (it was too posterior in my case). I used LCMV, so my analyses are quite similar to yours.</div><div>Do you use the Elekta Maxfilter routine of <b>tSSS </b>(a preprocessing step to remove non-brain noise)? There, I had the option <i>-trans</i> enabled, which transforms the sensor data of every subject to a common space, so that subjects become better comparable <b>in sensor space</b>. But this should not be used if you do source analysis, because the forward model uses the coregistered MRI, taking into account how that subject was positioned in the scanner. When I redid tSSS without the -trans option, and recomputed the forward model, motor beta suppression was right where it should be.</div><div>As for the coregistration, we used a polhemus point method of digitized 3D points, which allows for continuous tracking of head position in the Elekta scanner. With those points, there are built-in ways to coregister the MRI using the Elekta software (somebody else helped me with that, so I don't know the details how to do this).</div><div>With the coregistered MRIs, I just followed the fieldtrip tutorial up to ft_prepare_leadfield, and everything went fine.</div><div><br></div><div>Best,</div><div>Joram</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 5, 2014 at 2:50 PM, Kaelasha Tyler <span dir="ltr"><<a href="mailto:ktyler@swin.edu.au" target="_blank">ktyler@swin.edu.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<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>
</div>

<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Joram van Driel, MSc.<div>PhD student @ University of Amsterdam</div><div>Brain & Cognition @ Department of Psychology</div></div>
</div>