<div dir="ltr">Dear Vitoria,<div>how are you?</div><div><br></div><div>The problem seems to lie in the definition of the sensors (first error message, which is encapsulated by the subsequent ones). </div><div>What I noticed (but I fear I can't be more precise due to lack of information) is that you use two cfg definitions (cfg and cfgn) and that might create problems.</div><div>On top of that I would always clean the actual cfg by nulling it at the beginning of every function call (cfg=[]). This avoids to carry around incompatible fields in sequential calls of different functions (which also require different cfg options).</div><div><br></div><div>It would also help a lot if you included the call to ft_freqanalysis (again with an eye of regard of nulling the cfg beforehand).</div><div><br></div><div>I hope this helps!</div><div>Greetings from Oldenburg</div><div><br></div><div>Cris</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 9, 2015 at 4:58 AM, Vitória Piai <span dir="ltr"><<a href="mailto:v.piai.research@gmail.com" target="_blank">v.piai.research@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I'm interested in using Laplacian transformation prior to computing TFRs.<br>
I still haven't read anything about the three methods implemented in FieldTrip, I must confess, but I think my question is independent of that. I'm using FT version: fieldtrip-20140801 on Matlab2014a.<br>
<br>
If I use the method 'spline', I can subsequently run ft_freqanalysis (or ft_timelockanalysis for that matter). However, with either 'hjorth' or 'finite', I get an error when running ft_freqanalysis/ft_<u></u>timelockanalysis:<br>
My cfg:<br>
<br>
  cfgn.method       = 'template';<br>
  cfgn.layout       = 'biosemi64.lay';<br>
  cfg.neighbours      = ft_prepare_neighbours(cfgn, dat);<br>
<br>
  cfg.method = 'hjorth'; %'finite', 'spline'<br>
  cfg.elec            = ft_read_sens('standard_1005.<u></u>elc');<br>
  lpc = ft_scalpcurrentdensity(cfg, dat);<br>
% Then after that, a commonly used cfg for ft_freqanalysis<br>
<br>
Error using ft_datatype_sens (line 375)<br>
inconsistent number of channels in sensor description<br>
<br>
Error in ft_datatype_raw (line 138)<br>
      data.elec = ft_datatype_sens(data.elec);<br>
<br>
Error in ft_checkdata (line 219)<br>
  data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo);<br>
<br>
Error in ft_freqanalysis (line 211)<br>
data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes');<br>
<br>
I understand that the "inconsistent number of channels in sensor description" is coming from these two other implementations, but should that be the case? The help on ft_scalpcurrentdensity says " The output data has the same format as the input and can be used in combination with most other FieldTrip functions". So I'm wondering whether there's something special intrinsic to these implementations, I'm using a too old FT version, my config isn't right, or this is an issue that has gone unnoticed because those implementations are not used often.<br>
<br>
Thanks a lot!<br>
Cheers from Berkeley,<br>
Vitoria<br>
<br>
<br>
<br>
______________________________<u></u>_________________<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/<u></u>mailman/listinfo/fieldtrip</a><br>
</blockquote></div><br></div>