<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:835077164;
mso-list-type:hybrid;
mso-list-template-ids:-874991118 134807569 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l0:level1
{mso-level-text:"%1\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Dear Fieldtrip community,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have a question about reconstructing virtual electrodes using DICS or PCC. I know there was a similar discussion about it (<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/2009-February/002017.html">http://mailman.science.ru.nl/pipermail/fieldtrip/2009-February/002017.html</a>)
, however I didn’t find all the answers in it. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><u>My problem:</u> I have 2 phase-effects on the electrode level which I try to localize. The effects in source space look oddly weak and in one condition on the wrong side (I triple checked all the orientations and dimensions) compared
to its size on the electrode level (see attachments). Other effects show up quite nicely, so I hope there is not a general problem with my BEMs, electrode positions or the grid.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The effect (on electrode level) is phase connectivity (similarity) between two conditions at the same electrodes (trials cond1 -> trials cond2). More specific it is encoding retrieval similarity, where encoding is a 3 second time window
and retrieval is 4 seconds long. I extract my phase values using wavelet convolution and do the connectivity manually on the fourier-output.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><u>This is how I did the source reconstruction so far</u>: <o:p>
</o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">1)<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>I reconstructed the activity in source space on a virtual grid, following the tutorial (<a href="http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors">http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors</a>) ,
using a common filter over all data (-0.5-3.5s encoding; -0.5-4.5s retrieval): <o:p>
</o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">2)<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]><o:p> </o:p></p>
<p class="MsoNormal"> % compute the beamformer filter<o:p></o:p></p>
<p class="MsoNormal"> cfg = []; cfg.covariance = 'yes'; cfg.vartrllength = 2; cfg.covariancewindow = 'all';<o:p></o:p></p>
<p class="MsoNormal"> timelock = ft_timelockanalysis(cfg, data_all);<o:p></o:p></p>
<p class="MsoNormal"> cfg = []; cfg.method = 'lcmv'; cfg.elec = elec; cfg.vol = vol; cfg.grid = grid; cfg.lcmv.keepfilter = 'yes';
<u>cfg.lcmv.fixedori = 'yes'; % (could that be a problem?)</u>;<o:p></o:p></p>
<p class="MsoNormal"> source = ft_sourceanalysis(cfg, timelock);<o:p></o:p></p>
<p class="MsoNormal"> source_filter = source.avg.filter(source.inside);<o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"> <o:p></o:p></p>
<p class="MsoNormal" style="text-indent:36.0pt;text-autospace:none">% use the filter to reconstruct virtual timecourse<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:36.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">filtermat = [];</span><span style="font-size:12.0pt;font-family:"Courier New"">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">for</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> f_ = 1 : numel(source_filter); filtermat = cat(1, filtermat, source_filter{f_,1});
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">for</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> tr_ = 1 : size(data.trial,2); sourcedata.trial{tr_} = filtermat*data.trial{tr_};
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">3)<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>Then I do the exact same analysis on the virtual data as on the electrode data. (wavelet convolution to get an estimate of the phase values in source space (cfg.output = ‘fourier’, cfg.wifth = 6, cfg.foi = 8, ), then the connectivity
analysis. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Since the effect does not correctly show on the virtual electrode level, I think that my phase estimate in source space might be somewhat off (also I get negative T values in source space, that are not there on the electrode level)<o:p></o:p></p>
<p class="MsoNormal">My question is now, <u>can I directly beam the complex fourierspectrum onto virtual electrodes using the complex filters (or maybe better the real filters, so the complex timecourse would preserve its phase properties, right?)</u>
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I was thinking of something like: <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-indent:36.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">cfg = [];cfg.method =
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'wavelet'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">; cfg.output =
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'fourier'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">; cfg.width = 6; cfg.keeptrials =
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'yes'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">; cfg.toi = [-0.5:1/512:4.5]; cfg.foi = 8;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:36.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">freq = ft_freqanalysis(cfg, data_all);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><u><span style="font-family:"Courier New"">an additional question: can I use variable trial length (something like
</span>cfg.vartrllength = 2 with ft_freqanalysis as well? <o:p></o:p></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> latencies = freq.time(~isnan(squeeze(freq.fourierspctrm(1,1,1,:))));<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:36.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">cfg = [];</span><span style="font-size:12.0pt;font-family:"Courier New"">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">cfg.method =
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'pcc'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">;%or dics</span><span style="font-size:12.0pt;font-family:"Courier New"">?<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:36.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">cfg.elec = elec; cfg.vol = vol; cfg.grid = grid;
</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> cfg.pcc.realfilter =
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'no'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">; % or yes?</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> cfg.pcc.keepfilter =
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'yes'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> cfg.pcc.fixedori =
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'yes'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> cfg.latency = [latencies(1) latencies(end)];</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> cfg.frequency = [6 10];
</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> source = ft_sourceanalysis(cfg, freq);
</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> source_filter = source.avg.filter(source.inside);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><u><span style="font-size:10.0pt;font-family:"Courier New";color:black">Then I would have to multiply the filters with my fourierspectrum, right?
<o:p></o:p></span></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-indent:36.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">filtermat = [];</span><span style="font-size:12.0pt;font-family:"Courier New"">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">for</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> f_ = 1 : numel(source_filter); filtermat = cat(1, filtermat, source_filter{f_,1});
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> sz= size(freq.fourierspctrm);<o:p></o:p></p>
<p class="MsoNormal"> fspctrm2 = zeros(sz(1), size(grid.inside,2), sz(3), sz(4));
<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">for tr_ = 1 : sz(1)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"> fspctrm2(tr_,:,:,:) = filtermat * squeeze(freq.fourierspctrm(tr_,:,:,:));<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">end<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If you have another idea, what could have gone wrong in this reconstruction I would be greatful for suggestions!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><u>Another potential problem is maybe, that the activity is much stronger during encoding (participants are actually getting sensory input). Is that a bad case for common filters?
<o:p></o:p></u></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none">I used the fieldtrip version: <span style="font-size:10.0pt;font-family:"Courier New";color:black">
20140921 with MatlabR20</span><span style="font-size:10.0pt;font-family:"Courier New"">13<span style="color:black">a</span></span><span style="font-size:12.0pt;font-family:"Courier New";color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">All the best and thanks a lot in advance,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="DE">Sebastian<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="DE">Sebastian Michelmann<o:p></o:p></span></p>
<p class="MsoNormal"><a href="http://www.memorybham.com/lab-simon-hanslmayr#michelmanns"><span lang="DE" style="color:windowtext;text-decoration:none">PhD student in Psychology</span></a><span lang="DE"><o:p></o:p></span></p>
<p class="MsoNormal"><a href="http://www.memorybham.com/lab-simon-hanslmayr#michelmanns">Cognition and Oscillations Lab</a><span style="mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a href="http://www.memorybham.com/lab-simon-hanslmayr#michelmanns"><span style="color:windowtext;text-decoration:none">School of Psychology</span></a><o:p></o:p></p>
<p class="MsoNormal"><a href="http://www.memorybham.com/lab-simon-hanslmayr#michelmanns"><span style="color:windowtext;text-decoration:none">University of Birmingham</span></a><o:p></o:p></p>
<p class="MsoNormal"><a href="http://www.memorybham.com/lab-simon-hanslmayr#michelmanns"><span style="color:windowtext;text-decoration:none">Edgbaston</span></a><o:p></o:p></p>
<p class="MsoNormal">B15 2TT<span style="mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>