<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear all, <div class=""><br class=""></div><div class="">I am trying to compute a source reconstruction of different ERPs between two experimental conditions. Well, good news is that the script ‘works’, but the issue is that I am producing contemporary art instead of a brain with ft_sourcemovie (see figure in attachement). The headmodel I used is the standard one available for download. The leadfield I built seems to look like a brain with a correct positions of the electrodes (see also figure in attachement). </div><div class=""><br class=""></div><div class="">I really have no cue about how I produced such output with ft_sourcemovie and what could possibly be the issue (code is below). If someone can help transforming this to a brain? ;-)</div><div class="">The only thing that differs (I think) from the tutorial is that I don’t have a headmodel.tri but rather a headmodel.bnd.tri. Don’t know if it makes any difference. Perhaps the sourcespace defined in the tutorial is something different?</div><div class=""><br class=""></div><div class="">Thank you, </div><div class=""><br class=""></div><div class="">Emilie</div><div class=""><br class=""></div><div class=""><img height="617" width="918" apple-width="yes" apple-height="yes" apple-inline="yes" id="60EAF9D8-840E-4A2C-B31D-63A4DCE46F23" src="cid:266B65A9-BE7C-4BE6-9E20-C7ABE9CC315E@pool.ulb.ac.be" class=""><img height="423" width="559" apple-width="yes" apple-height="yes" apple-inline="yes" id="2FB91162-550D-4DDF-9F0B-1CEAE1008143" src="cid:B4040A41-2B79-4957-95B2-3A49D12B6E15@pool.ulb.ac.be" class=""><img height="499" width="566" apple-width="yes" apple-height="yes" apple-inline="yes" id="9AB8407B-51B2-444D-9108-38BB7D8B2A7E" src="cid:5AA9AF20-25AE-4082-9E1B-4FD38A4FC417@pool.ulb.ac.be" class=""></div><div class=""><br class=""></div><div class=""><b class="">CODE</b></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">q=biosim64;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">ph = cell2mat(q(:,2));</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">th = cell2mat(q(:,3));</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">x = sin(ph*pi/180) .* cos(th*pi/180);</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">y = sin(ph*pi/180) .* sin(th*pi/180);</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">z = cos(ph*pi/180);</div><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">plot3(x, y, z, <span style="color: #b245f3" class="">'.'</span>);</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">elec.label = q(:,1);</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">elec.pnt = [x y z];</div><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.sourcemodel.pos = elec.pnt;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">sourcemodel = ft_prepare_sourcemodel(cfg);</div><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">headmodel = ft_read_headmodel(<span style="color: #b245f3" class="">'headmodel/standard_bem.mat'</span>);</div><p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45); min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">% realign electrodes to headmodel</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg = [];</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.method = <span style="color: #b245f3" class="">'interactive'</span>;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.elec = elec;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.headshape = headmodel.bnd(1); <span style="color: #25992d" class="">%1 = skin</span></div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">elec = ft_electroderealign(cfg);</div><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">%save new electrodes</div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(178, 69, 243);" class=""><span style="color: #000000" class="">save </span>elec64.mat<span style="color: #000000" class=""> </span>elec</div><p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(178, 69, 243); min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px;" class=""><font face="Courier" size="1" class="">ERPsAll.elec = ft_read_sens(</font><span style="font-family: Courier; font-size: 10px; color: rgb(178, 69, 243);" class="">'elec64.mat</span><font color="#b245f3" face="Courier" size="1" class="">’</font><font face="Courier" size="1" class="">);</font></div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class=""><br class=""></div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">% Prepare leadfield</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg = [];</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.elec = ERPsAll.elec;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.vol = headmodel;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.reducerank = 3;</div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class=""><span style="color: #000000" class="">cfg.grid.resolution = 1; </span>% use a 3-D grid with a 1 cm resolution</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.grid.unit = <span style="color: #b245f3" class="">'cm'</span>;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.channel ={<span style="color: #b245f3" class="">'all'</span>};</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">leadfield = ft_prepare_leadfield(cfg);</div><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> </p><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">%%mne</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg = [];</div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class=""><span style="color: #000000" class="">cfg.method = </span><span style="color: #b245f3" class="">'mne'</span><span style="color: #000000" class="">; </span>%pcc: partial cannonical correlation/coherence</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.elec = ERPsAll.elec; <span style="color: #25992d" class="">%grid.cfg.elec;%</span></div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.headmodel = headmodel;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.grid = leadfield;</div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">%cfg.sourcemodel = sourcemodel;</div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">% cfg.channel ={'all'};%, '-spmnas', '-spmlpa', '-spmrpa'};</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.mne.prewhiten = <span style="color: #b245f3" class="">'yes'</span>;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.mne.lambda = 3;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.mne.scalesourcecov = <span style="color: #b245f3" class="">'yes'</span>;</div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">%cfg.reducerank = 2;</div><p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45); min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">source_C_Shock = ft_sourceanalysis(cfg, GA_C_Shock);</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">source_C_Noshock = ft_sourceanalysis(cfg, GA_C_NOshock);</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class=""><br class=""></div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(178, 69, 243);" class=""><span style="color: #000000" class="">save </span>source_C_Shock.mat<span style="color: #000000" class=""> </span>source_C_Shock</div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(178, 69, 243);" class=""><span style="color: #000000" class="">save </span>source_C_Noshock.mat<span style="color: #000000" class=""> </span>source_C_Noshock</div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(178, 69, 243);" class=""><br class=""></div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">bnd.pos = headmodel.bnd.pos;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">bnd.tri = headmodel.bnd.tri;</div><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">m=source_C_Shock.avg.pow(:,450); </div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">%timeN1 = [1232:1301];timeP3 = [1722:1927];timeeLPP = [1928:2356];timelLPP = [2357:2868];</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">ft_plot_mesh(bnd, <span style="color: #b245f3" class="">'vertexcolor'</span>, m);</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">view([180 0]); h = light; set(h, <span style="color: #b245f3" class="">'position'</span>, [0 1 0.2]); lighting <span style="color: #b245f3" class="">gouraud</span>; material <span style="color: #b245f3" class="">dull</span></div><p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(178, 69, 243); min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg = [];</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.projectmom = <span style="color: #b245f3" class="">'yes'</span>;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">sdShock = ft_sourcedescriptives(cfg,source_C_Shock);</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">sdNoShock = ft_sourcedescriptives(cfg,source_C_Noshock);</div><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">sdDIFF = sdNoShock;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">sdDIFF.avg.pow = sdNoShock.avg.pow - sdShock.avg.pow;</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">sdDIFF.tri = headmodel.bnd.tri;</div><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(178, 69, 243);" class=""><span style="color: #000000" class="">save </span>sd<span style="color: #000000" class=""> </span>sdDIFF<span style="color: #000000" class="">;</span></div><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg = [];</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg.funparameter = <span style="color: #b245f3" class="">'pow'</span>;</div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">%cfg.method = 'surface';</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">ft_sourcemovie(cfg,sdDIFF);</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">---------------------------------------------<br class="">Emilie Caspar, Ph.D<br class=""> <br class="">CO3, Centre de Recherche Cognition et Neurosciences (CRCN), ULB </div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Voice : +32 2 650 32 95 <br class="">mail : <a href="mailto:ecaspar@ulb.ac.be" class="">ecaspar@ulb.ac.be</a><br class="">office: DB10-138 </div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Social Brain Lab, Netherlands Institute for Neuroscience (NIN), KNAW<br class="">mail : <a href="mailto:e.caspar@nin.knaw.nl" class="">e.caspar@nin.knaw.nl</a><br class=""></div></div></div></div></div></div></div></div>
</div>
<br class=""></div></body></html>