<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Kirstin,
<div class=""><br class="">
</div>
<div class="">The EMG channels are not supposed to be added to the forward model.</div>
<div class=""><br class="">
</div>
<div class="">The error that is thrown suggests indeed a mismatch between the channels in the data and/or their order, that are used for the covariance/csd matrix and the channels and/or their order in the precomputed forward model. I would start by inspecting
 the list of channels at the line in which the error occurs (either putting in an explicit breakpoint, or use the command 'dbstop if error’) in cfg.channel, and sourcemodel.label. I’d expect the cfg.channel to only contain the EEG channels, unless you put in
 a weird cfg.channel into the ft_sourceanalysis’ cfg. Note that you don’t need to put in a cfg.channel at this stage.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 12 Sep 2019, at 16:27, Kirstin Heise <<a href="mailto:kirstin.heise@kuleuven.be" class="">kirstin.heise@kuleuven.be</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Dear FieldTrip community, 
<div class=""><br class="">
</div>
<div class="">I am following the pipeline of the  <a href="http://www.fieldtriptoolbox.org/tutorial/beamformingextended/#loading-of-the-data" class="">http://www.fieldtriptoolbox.org/tutorial/beamformingextended/#loading-of-the-data</a> tutorial to source localise
 EEG activity that is coherent with muscle/EMG channels. I have a pre-computed leadfield (using simbio), which does not include the muscle channels that I want to use. </div>
<div class=""><br class="">
</div>
<div class="">When attempting to run ft_sourceanalysis, I receive the following error message: </div>
<div class="">
<div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(160, 32, 240);" class="">
<span style="" class=""><br class="">
</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(160, 32, 240);" class="">
<span style="" class="">Error </span>using<span style="" class=""> </span>ft_sourceanalysis<span style="" class="">
</span>(line 542)</div>
<div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(160, 32, 240);" class="">
<span style="" class="">There's a </span>mismatch<span style="" class=""> </span>
between<span style="" class=""> </span>the<span style="" class=""> </span>number/order<span style="" class="">
</span>of<span style="" class=""> </span>channels<span style="" class=""> </span>
in<span style="" class=""> </span>the<span style="" class=""> </span>data<span style="" class="">, </span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(160, 32, 240);" class="">
<span style="" class="">with </span>respect<span style="" class=""> </span>to<span style="" class="">
</span>the<span style="" class=""> </span>channels<span style="" class=""> </span>
in<span style="" class=""> </span>the<span style="" class=""> </span>precomputed<span style="" class="">
</span>leadfield/filter.</div>
<div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(160, 32, 240);" class="">
<span style="" class="">This </span>is<span style="" class=""> </span>not<span style="" class="">
</span>easy<span style="" class=""> </span>to<span style="" class=""> </span>solve<span style="" class="">
</span>automatically.<span style="" class=""> </span>Please<span style="" class="">
</span>look<span style="" class=""> </span>into<span style="" class=""> </span>this.</div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Courier; min-height: 14px;" class="">
<br class="">
</div>
</div>
<div class="">Is there a way of solving this post hoc? I am not sure which information is required in which part of the leadfield structure. I saw that in the tutorial data set, there are more sensors in the data set than included in the forward model and wonder
 whether it is just a matter of adding the additional channels “somehow” in the forward model? </div>
<div class=""><br class="">
</div>
<div class="">Also, not having interpolated bad channels and hence having a different number of channels in the EEG data set, at what point can I control the numbering/order of the actual channels in the source reconstruction procedure? </div>
<div class=""><br class="">
</div>
<div class="">Thanks a lot for your support. </div>
<div class="">Best, </div>
<div class="">Kirstin</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>