<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">only a brilliant mind might have
      created such a guide - chapeau ^^<br>
      <br>
      On 2/6/2013 3:17 PM, Stephen Whitmarsh wrote:<br>
    </div>
    <blockquote
cite="mid:CAFrxm=wcuvHkT-eabc6Rjt5oLmR30_RNdP=L1ar2Wy0xW9s84g@mail.gmail.com"
      type="cite">Dear Robin,
      <div><br>
      </div>
      <div>Please allow me to refer you to the excellent documentation
        on (negative) padding and artifact rejection in this gorgeous
        didactical masterpiece, a joy to behold: </div>
      <div>***** <a moz-do-not-send="true"
href="http://fieldtrip.fcdonders.nl/tutorial/automatic_artifact_rejection">http://fieldtrip.fcdonders.nl/tutorial/automatic_artifact_rejection</a>
        *****</div>
      <div><br>
      </div>
      <div>;-)</div>
      <div>Stephen<br>
        <br>
        <div class="gmail_quote">On 6 February 2013 15:07, Robin <span
            dir="ltr"><<a moz-do-not-send="true"
              href="mailto:robince@gmail.com" target="_blank">robince@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 Jörn,<br>
            <br>
            Thanks very much. Yes I think that will solve the problem -
            I hadn't<br>
            realised I could use negative trial padding values.<br>
            What I had just got working was as similar approach
            extracting larger<br>
            trials at first and then manually making a new trl
            defintion:<br>
            <br>
                % artifact detection<br>
                tmpcfg = [];<br>
                tmpcfg.continuous = 'no'; % some trials are excluded<br>
                tmpcfg.trl = run_clean.sampleinfo;<br>
                tmpcfg.trl(:,1) = tmpcfg.trl(:,1) +
            round(filterpad*run_clean.fsample);<br>
                tmpcfg.trl(:,2) = tmpcfg.trl(:,2) -
            round(filterpad*run_clean.fsample);<br>
            <br>
                [tmpcfg, artifact] = ft_artifact_muscle(tmpcfg,
            run_clean);<br>
            <br>
            which seemed to work but the trlpadding option definitely
            looks cleaner!<br>
            <br>
            Thanks,<br>
            <br>
            Robin<br>
            <div class="HOEnZb">
              <div class="h5"><br>
                On Wed, Feb 6, 2013 at 2:02 PM, "Jörn M. Horschig"<br>
                <<a moz-do-not-send="true"
                  href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>>
                wrote:<br>
                > Hi Robin,<br>
                ><br>
                > I think the steps you suggested sound reasonable,
                but I do not see how you<br>
                > are avoiding the filter artifact issue there, you
                just postpone it to a<br>
                > later stage. Instead it might be a smart way to
                'pad' your trials when<br>
                > defining them with 1s pre- and post (so cut out
                more than you need); that<br>
                > way all filter artifacts will be in that 1s that
                you are not interested in<br>
                > anyway. Then, you can define cfg.xxx.trlpadding =-1
                prior to calling<br>
                > ft_artifact_xxx (thereby ignoring that 1s of
                 'padded' data). If I<br>
                > understand your question correctly, that solves
                your problem, doesn't it?<br>
                ><br>
                > Best,<br>
                > Jörn<br>
                ><br>
                ><br>
                ><br>
                > On 2/6/2013 12:54 PM, Robin wrote:<br>
                >><br>
                >> Hi all,<br>
                >><br>
                >> I am a new fieldtrip user getting started
                preprocessing a large MEG<br>
                >> data set (I am in Glasgow and the data was
                collected at CCNi).<br>
                >><br>
                >> I think I am slowly getting to grips with all
                the steps necessary, but<br>
                >> I have a question about the artifact rejection.<br>
                >><br>
                >> My undersanding is that the denoise procedure
                helps correct external<br>
                >> sources of noise, so having the signal cleaned
                in this way should help<br>
                >> detect the biological artifacts which are valid
                magnetic signal at the<br>
                >> scalp. But I can't see an easy way to do this
                since the ft_artifact_*<br>
                >> functions want to load the raw continuous data
                from disk. I can get<br>
                >> them to act on the in memory trials data if I
                set the padding options<br>
                >> to 0, but then I get an unacceptable amount of
                rejections (I guess<br>
                >> because of the filter artifacts the padding
                usually prevents).<br>
                >><br>
                >> Is it possible to run ft_artifact_muscle,
                ft_artifact_eog etc. on the<br>
                >> denoised signal from ft_denoise_pca and if so
                how?<br>
                >><br>
                >> At the moment I am performing the following
                steps:<br>
                >><br>
                >> Load each run<br>
                >> Detect jumps with ft_artifact_jump.<br>
                >> Concatenate the jump-free trials from all runs
                together for this block.<br>
                >><br>
                >> Visually inspect the reference channels and
                remove high variance<br>
                >> trials (across the whole block).<br>
                >> Compute denoise PCA weights using only good
                reference data (and no MEG<br>
                >> jump) trials across the whole block.<br>
                >><br>
                >> I would now like to apply the denoise PCA
                weights, perform other<br>
                >> automatic artifact removal on the cleaned data,
                before further visual<br>
                >> inspection and the next steps of ICA etc.<br>
                >><br>
                >> Is there any problems with this strategy?<br>
                >><br>
                >> Thanks in advance for any advice,<br>
                >><br>
                >> Robin<br>
                >> _______________________________________________<br>
                >> fieldtrip mailing list<br>
                >> <a moz-do-not-send="true"
                  href="mailto:fieldtrip@donders.ru.nl">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>
                ><br>
                ><br>
                ><br>
                > --<br>
                > Jörn M. Horschig<br>
                > PhD Student<br>
                > Donders Institute for Brain, Cognition and
                Behaviour<br>
                > Centre for Cognitive Neuroimaging<br>
                > Radboud University Nijmegen<br>
                > Neuronal Oscillations Group<br>
                > FieldTrip Development Team<br>
                ><br>
                > P.O. Box 9101<br>
                > NL-6500 HB Nijmegen<br>
                > The Netherlands<br>
                ><br>
                > Contact:<br>
                > E-Mail: <a moz-do-not-send="true"
                  href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a><br>
                > Tel:    <a moz-do-not-send="true"
                  href="tel:%2B31-%280%2924-36-68493"
                  value="+31243668493">+31-(0)24-36-68493</a><br>
                > Web: <a moz-do-not-send="true"
                  href="http://www.ru.nl/donders" target="_blank">http://www.ru.nl/donders</a><br>
                ><br>
                > Visiting address:<br>
                > Trigon, room 2.30<br>
                > Kapittelweg 29<br>
                > NL-6525 EN Nijmegen<br>
                > The Netherlands<br>
                ><br>
                > _______________________________________________<br>
                > fieldtrip mailing list<br>
                > <a moz-do-not-send="true"
                  href="mailto:fieldtrip@donders.ru.nl">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>
                <br>
                _______________________________________________<br>
                fieldtrip mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:fieldtrip@donders.ru.nl">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>
              </div>
            </div>
          </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>
    <br>
    <pre class="moz-signature" cols="72">-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour 
Centre for Cognitive Neuroimaging
Radboud University Nijmegen 
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>
Tel:    +31-(0)24-36-68493
Web: <a class="moz-txt-link-freetext" href="http://www.ru.nl/donders">http://www.ru.nl/donders</a>

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
  </body>
</html>