<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 Marjolein,
<div><br>
</div>
<div>Even een snelle vraag, wat is de risingedge(mask)?</div>
<div><br>
</div>
<div>Groetjes,</div>
<div>Ervin<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<p class="MsoNormal"><br>
</p>
<p class="MsoNormal">--</p>
<p class="MsoNormal"></p>
<p class="MsoNormal">Ervin Poljac, PhD </p>
<p class="MsoNormal">Donders Institute for Brain, Cognition and Behaviour </p>
<p class="MsoNormal">Centre for Cognition (DCC) </p>
<p class="MsoNormal">Radboud University Nijmegen </p>
<p class="MsoNormal">Room B.00.78A Montessorilaan 3 6500 HE Nijmegen </p>
<p class="MsoNormal">T. 024 36 15457</p>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF333451" 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 Lorenzo Magazzini [lorenzomagazzini@gmail.com]<br>
<b>Sent:</b> Tuesday, January 12, 2016 3:46 PM<br>
<b>To:</b> fieldtrip@science.ru.nl<br>
<b>Subject:</b> [FieldTrip] Help understanding the lcmv beamformer output<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div>Hi,<br>
</div>
<div><br>
</div>
<div>I hope someone can help me to understand the use of the lcmv beamformer, because either I am using it incorrectly, or I misunderstood the meaning of its output.</div>
<div><br>
</div>
<div>I am trying to get source-level power estimates of 'baseline' and 'active' time-windows. I first compute a common filter, and then apply it separately to the two conditions. I thought the power estimates would be stored, voxel-wise, in the '.avg.pow' field
of the ft_sourceanalysis output. However, the values I get in the '.pow' field for the analysis of 'baseline' and 'active' windows are identical. Furthermore, the '.pow' values are identical to the '.noise' values when using <font class="" face="monospace, monospace">cfg.projectnoise
= 'yes';</font>.</div>
<div><br>
</div>
<div>I have checked if the sensor-level data that passed on to ft_sourceanalysis is different between baseline and active - it is.</div>
<div><br>
</div>
<div>Also, if I do the following...</div>
<div>1. reconstruct virtual sensors by applying the common filter separately to baseline and active, </div>
<div>2. average the single-trial (virtual sensor) power estimates, </div>
<div>3. replace the '.pow' value for each voxel, </div>
<div>...then the contrast between baseline and active is correct.</div>
<div><br>
</div>
<div>Can anyone please help me figure out what I'm doing wrong here? Below I copied part of the code.</div>
<div><br>
</div>
<div>Many thanks in advance!</div>
<div><br>
</div>
<div>Lorenzo</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div><font class="Apple-style-span" face="monospace, monospace">%compute the leadfield</font></div>
<div><font class="Apple-style-span" face="monospace, monospace">cfg = [];</font></div>
<div><font class="Apple-style-span" face="monospace, monospace">cfg.channel = {'MEG'};</font></div>
<div><font class="Apple-style-span" face="monospace, monospace">cfg.grid = sourcemodel;</font></div>
<div><font class="Apple-style-span" face="monospace, monospace">cfg.vol = hdm;</font></div>
<div><font class="Apple-style-span" face="monospace, monospace">cfg.grad = grad;</font></div>
<div><font class="Apple-style-span" face="monospace, monospace">cfg.normalize = 'yes';</font></div>
<div><font class="Apple-style-span" face="monospace, monospace">leadfield = ft_prepare_leadfield(cfg);</font></div>
</div>
<div><br>
</div>
<div><font class="" face="monospace, monospace">%compute covariance matrix</font></div>
<div>
<div><font class="" face="monospace, monospace">cfg = [];</font></div>
<div><font class="" face="monospace, monospace">cfg.channel = {'MEG'};</font></div>
<div><font class="" face="monospace, monospace">cfg.removemean = 'no';</font></div>
<div><font class="" face="monospace, monospace">cfg.covariance = 'yes';</font></div>
<div><font class="" face="monospace, monospace">cfg.covariancewindow = [-1.5 1.5];</font></div>
<div><font class="" face="monospace, monospace">tlck = ft_timelockanalysis(cfg, data);</font></div>
</div>
<div><font class="" face="monospace, monospace"><br>
</font></div>
<div>
<div><font class="" face="monospace, monospace">%get the common spatial filter</font></div>
<div><font class="" face="monospace, monospace">cfg = [];</font></div>
<div><font class="" face="monospace, monospace">cfg.method = 'lcmv';</font></div>
<div><font class="" face="monospace, monospace">cfg.grid = leadfield;</font></div>
<div><font class="" face="monospace, monospace">cfg.vol = hdm;</font></div>
<div><font class="" face="monospace, monospace">cfg.grad = grad;</font></div>
<div><font class="" face="monospace, monospace">cfg.lcmv.fixedori = 'yes';</font></div>
<div><font class="" face="monospace, monospace">cfg.lcmv.keepfilter = 'yes';</font></div>
<div><font class="" face="monospace, monospace">cfg.lcmv.projectnoise = 'yes';</font></div>
<div><font class="" face="monospace, monospace">cfg.lcmv.lambda = '5%';</font></div>
<div><font class="" face="monospace, monospace">src = ft_sourceanalysis(cfg, tlck);</font></div>
<div><font class="" face="monospace, monospace"><br>
</font></div>
<div><font class="" face="monospace, monospace">%store the filter</font></div>
<div><font class="" face="monospace, monospace">wts = src.avg.filter;</font></div>
</div>
<div><br>
</div>
<div>
<div><font class="" face="monospace, monospace">%separate baseline and active windows of bandpass-filtered data</font></div>
<div><font class="" face="monospace, monospace">cfg = [];</font></div>
<div><font class="" face="monospace, monospace">cfg.toilim = [-1.5 -0.3];</font></div>
<div><font class="" face="monospace, monospace">data_bsln = ft_redefinetrial(cfg, data);</font></div>
<div><font class="" face="monospace, monospace">cfg = [];</font></div>
<div><font class="" face="monospace, monospace">cfg.toilim = [0.3 1.5];</font></div>
<div><font class="" face="monospace, monospace">data_actv = ft_redefinetrial(cfg, data);</font></div>
</div>
<div><font class="" face="monospace, monospace"><br>
</font></div>
<div>
<div><font class="" face="monospace, monospace">%timelock analysis of baseline and active</font></div>
<div><font class="" face="monospace, monospace">cfg = [];</font></div>
<div><font class="" face="monospace, monospace">cfg.channel = {'MEG'};</font></div>
<div><font class="" face="monospace, monospace">cfg.keeptrials = 'yes';</font></div>
<div><font class="" face="monospace, monospace">tlck_bsln = ft_timelockanalysis(cfg, data_bsln);</font></div>
<div><font class="" face="monospace, monospace">tlck_actv = ft_timelockanalysis(cfg, data_actv);</font></div>
</div>
<div><font class="" face="monospace, monospace"><br>
</font></div>
<div><font class="" face="monospace, monospace">%get source-power estimates of bsln and actv separately using the pre-computed common filter (wts)</font></div>
<div>
<div><font class="" face="monospace, monospace">cfg = [];</font></div>
<div><font class="" face="monospace, monospace">cfg.method = 'lcmv';</font></div>
<div><font class="" face="monospace, monospace">cfg.vol = hdm;</font></div>
<div><font class="" face="monospace, monospace">cfg.grid = leadfield; </font></div>
<div><font class="" face="monospace, monospace">cfg.grid.filter = wts;</font></div>
<div><font class="" face="monospace, monospace">% cfg.keepfilter = 'no';</font></div>
<div><font class="" face="monospace, monospace">cfg.lcmv.fixedori = 'yes';</font></div>
<div><font class="" face="monospace, monospace">cfg.projectnoise = 'yes';</font></div>
<div><font class="" face="monospace, monospace">cfg.lambda = '5%';</font></div>
<div><font class="" face="monospace, monospace">cfg.keeptrials = 'yes';</font></div>
</div>
<div>
<div><font class="" face="monospace, monospace">src_bsln = ft_sourceanalysis(cfg, tlck_bsln);</font></div>
</div>
<div><font class="" face="monospace, monospace">src_actv = ft_sourceanalysis(cfg, tlck_actv);</font><br>
</div>
<div><font class="" face="monospace, monospace"><br>
</font></div>
<div><font class="" face="monospace, monospace"><br>
</font></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>