<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Thank you, Cris.<br>
    <div class="moz-cite-prefix"><br>
    </div>
    <blockquote
cite="mid:CADW7XCAdS=fk_JQLqwQKxa9_bS+FoNpOOE5tcmAJKWM98gfcWg@mail.gmail.com"
      type="cite">
      <div dir="ltr">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>
    </blockquote>
    One of them (cfgn) is only being used to define neighbours, so I
    don't think that matters.<br>
    <blockquote
cite="mid:CADW7XCAdS=fk_JQLqwQKxa9_bS+FoNpOOE5tcmAJKWM98gfcWg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>On top of that I would always clean the actual cfg by
          nulling it at the beginning of every function call (cfg=[]).</div>
      </div>
    </blockquote>
    I always do this, only didn't paste that part of my code to have it
    occupying less space. So that isn't the problem either.<br>
    <blockquote
cite="mid:CADW7XCAdS=fk_JQLqwQKxa9_bS+FoNpOOE5tcmAJKWM98gfcWg@mail.gmail.com"
      type="cite">
      <div dir="ltr">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>
    </blockquote>
    I doubt it's the cfg in ft_freqanalysis that is causing the problem
    - it's the same cfg I've been using for 5 years now, and in line
    with the one shown in the tutorial. So unfortunately, not the
    solution either.<br>
    <br>
    The key is in the computation of the scd depending on the method.
    The error only occurs with 'hjorth' and 'finite', but not with
    'spline'. Maybe I should just read more on these three methods
    before I try to advance any further.<br>
    <br>
    Thanks anyways, Vitoria<br>
    <br>
    <br>
    <br>
    <br>
    <blockquote
cite="mid:CADW7XCAdS=fk_JQLqwQKxa9_bS+FoNpOOE5tcmAJKWM98gfcWg@mail.gmail.com"
      type="cite">
      <div class="gmail_extra">On Mon, Mar 9, 2015 at 4:58 AM, Vitória
        Piai <span dir="ltr"><<a moz-do-not-send="true"
            href="mailto:v.piai.research@gmail.com" target="_blank">v.piai.research@gmail.com</a>></span>
        wrote:<br>
        <div class="gmail_quote">
          <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_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.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>
            _______________________________________________<br>
            fieldtrip mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
            <a moz-do-not-send="true"
              href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip"
              target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
    </blockquote>
    <br>
  </body>
</html>