<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;">Hi all,
<div><br>
</div>
<div>Some great suggestions and resources here. I'll try a few of these suggestions out and get back to the post with results.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Kaelasha</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF199480" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> fieldtrip-bounces@science.ru.nl [fieldtrip-bounces@science.ru.nl] on behalf of Joram van Driel [joramvandriel@gmail.com]<br>
<b>Sent:</b> Thursday, 6 November 2014 2:15 AM<br>
<b>To:</b> FieldTrip discussion list<br>
<b>Subject:</b> Re: [FieldTrip] (no subject)<br>
</font><br>
</div>
<div></div>
<div>
<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>
<div id="divSelDisplay" class="unselected" style="position: relative; z-index: 0; top: -18px; padding-right: 15px; padding-bottom: 1px; font-family: 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 13px;">
<div id="divExpSubHdr" style="position: relative; height: 14px; padding-top: 7px; width: 563px;">
<div id="divSubFs" style="position: absolute; left: 0px; right: 250px;">
<div id="divFs" style="position: absolute; left: 0px; right: 0px; color: rgb(102, 102, 102); font-size: 7.5pt;">
<div class="divTx" style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap; position: absolute;">
 </div>
</div>
</div>
<div id="divSubSent" style="position: absolute; right: 0px; width: 250px; text-align: right; bottom: 2px;">
<span id="spnSent" style="font-size: 7.5pt; padding: 0px 0px 0px 5px; color: rgb(102, 102, 102);">Thursday, 6 November 2014 2:14 AM</span></div>
</div>
</div>
<div id="divBdy" class="bdyItmPrt" _fallwcm="1" style="font-size: medium; word-wrap: break-word; width: auto; overflow: hidden; position: relative; top: -5px; padding: 0px 15px 15px 0px; clear: both; font-family: 'Segoe UI', Helvetica, Arial, sans-serif;">
<div>
<div>
<div dir="ltr"><span dir="ltr">Hi <font face="arial,sans-serif" size="1"><span style="font-size: 13px;">Kaelasha,</span></font>
<div><font face="arial,sans-serif" size="1"><span style="font-size: 13px;"><br>
</span></font></div>
<div><font face="arial,sans-serif" size="1"><span style="font-size: 13px;">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.</span></font></div>
<div><font face="arial,sans-serif" size="1"><span style="font-size: 13px;">Note I never used LCMV beamformer myself, although I've done DICS.</span></font></div>
<div><font face="arial,sans-serif" size="1"><span style="font-size: 13px;">Also, to me there seems to be not something obviously </span></font><font face="arial,sans-serif" size="1"><span style="font-size: 13px;"><i>wrong </i></span></font><font face="arial,sans-serif" size="1"><span style="font-size: 13px;">in
 the code or pictures, so I'm just suggesting some thoughts here.</span></font></div>
<div><font face="arial,sans-serif" size="1"><span style="font-size: 13px;"><br>
</span></font></div>
<div><font face="arial,sans-serif">- Beamformer performance is VERY dependent on the data. Check your sensor level data, clean it more if necessary.</font><br>
</div>
<div><font face="arial,sans-serif">- 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. </font></div>
<div><font face="arial,sans-serif">- 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.</font></div>
<div><font face="arial,sans-serif">- Play around with some regularization - in ft_sourceanalysis use e.g.: cfg.alpha = '10%';</font></div>
<div><font face="arial,sans-serif" size="1"><span style="font-size: 13px;">- Evaluate your lcmv beamformer with a dipole fit. </span></font></div>
<div><font face="arial,sans-serif" size="1"><span style="font-size: 13px;">- Check other subjects/recordings - other recordings might be better (or worse...)</span></font></div>
<div><font face="arial,sans-serif" size="1"><span style="font-size: 13px;"><br>
</span></font></div>
<div><font face="arial,sans-serif">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):</font></div>
<div><a href="http://fieldtrip.fcdonders.nl/workshop/stockholm2014q3" target="_blank"><font face="arial,sans-serif">http://fieldtrip.fcdonders.nl/workshop/stockholm2014q3</font></a><font face="arial,sans-serif"><br>
</font></div>
<div><font face="arial,sans-serif"><br>
</font></div>
<div><font face="arial,sans-serif">The beamformer lecture there given by Robert on Beamforming is also online: </font><a href="http://natmeg.se/wp/activities/natmeg-lectures/" target="_blank"><font face="arial,sans-serif">http://natmeg.se/wp/activities/natmeg-lectures/</font></a></div>
<div><font face="arial,sans-serif"><br>
</font></div>
<div><font face="arial,sans-serif">Good luck!</font></div>
<div><font face="arial,sans-serif">Stephen</font></div>
</span></div>
</div>
</div>
</div>
</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" target="_blank">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>
</div>
</div>
</div>
</body>
</html>