<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Dear Tara,<br>
    <br>
    you define cfg.trialdef.triallength prior to calling ft_definetrial.
    This will cause the trialfunction to not look for events, but cut
    your recorded data into chunks of 3 seconds, independently of the
    eventtype and -value that you specified. The parameters you probably
    want to use instead are cfg.trialdef.poststim and .prestim.
    Triallength is supposed for continuous data without events, e.g.
    resting state data. <br>
    <br>
    Btw, if you specifiy cfg.trialdef.eventtype='?' you will get a list
    with all events in your data - that way you can make sure that you
    are specifying the correct types or values (alternatively, you could
    also use ft_read_event).<br>
    <br>
    Hope it helps!<br>
    Best,<br>
    Jörn<br>
    <br>
    On 1/19/2012 10:12 PM, Tara Jacobson wrote:
    <blockquote
cite="mid:CA+yWUj7BcY_40Z=45S0aKPgZaON9Bsx37WtoFiJpzsNvfD+KPA@mail.gmail.com"
      type="cite">Hello,
      <div><br>
      </div>
      <div>Does anyone have experience with .nex files?  It seems
        straight forward to be able to define trials using events in the
        .nex, but ft_definetrial is not recognizing them as events.</div>
      <div><br>
      </div>
      <div>
        <div>filename =('11-087_12292011.nex')</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>stim30Hz=[27.25275<span class="Apple-tab-span"
            style="white-space:pre"> </span>159.26715<span
            class="Apple-tab-span" style="white-space:pre"> </span>258.277925<span
            class="Apple-tab-span" style="white-space:pre"> </span>357.2887<span
            class="Apple-tab-span" style="white-space:pre"> </span>489.303075<span
            class="Apple-tab-span" style="white-space:pre"> </span>522.306625<span
            class="Apple-tab-span" style="white-space:pre"> </span>621.317425<span
            class="Apple-tab-span" style="white-space:pre"> </span>786.335425<span
            class="Apple-tab-span" style="white-space:pre"> </span>885.3462<span
            class="Apple-tab-span" style="white-space:pre"> </span>984.356975<span
            class="Apple-tab-span" style="white-space:pre"> </span>1083.36775<span
            class="Apple-tab-span" style="white-space:pre"> </span>1149.3749<span
            class="Apple-tab-span" style="white-space:pre"> </span>1281.3893<span
            class="Apple-tab-span" style="white-space:pre"> </span>1347.396425<span
            class="Apple-tab-span" style="white-space:pre"> </span>1446.40725<span
            class="Apple-tab-span" style="white-space:pre"> </span>1578.4216<span
            class="Apple-tab-span" style="white-space:pre"> </span>1644.4288<span
            class="Apple-tab-span" style="white-space:pre"> </span>1776.443175<span
            class="Apple-tab-span" style="white-space:pre"> </span>1875.45395<span
            class="Apple-tab-span" style="white-space:pre"> </span>1974.464725];</div>
        <div><br>
        </div>
        <div>cfg = [];</div>
        <div>cfg.dataset = filename;</div>
        <div><br>
        </div>
        <div>cfg.trialdef.triallength=3;</div>
        <div>cfg.trialdef.eventtype=('Event007');</div>
        <div>cfg.trialdef.eventvalue=stim30Hz;</div>
        <div><br>
        </div>
        <div>cfg=ft_definetrial(cfg);</div>
        <div><br>
        </div>
        <div><font class="Apple-style-span" color="#ff0000">filename =</font></div>
        <div><font class="Apple-style-span" color="#ff0000">11-087_12292011.nex</font></div>
        <div><font class="Apple-style-span" color="#ff0000">Warning: no
            trialfun was specified, using trialfun_general </font></div>
        <div><font class="Apple-style-span" color="#ff0000">> In
            ft_definetrial at 95</font></div>
        <div>
          <font class="Apple-style-span" color="#ff0000">evaluating
            trialfunction 'trialfun_general'</font></div>
        <div><font class="Apple-style-span" color="#ff0000">reading the
            events from '11-087_12292011.nex'</font></div>
        <div><font class="Apple-style-span" color="#ff0000">found 0
            events</font></div>
        <div><font class="Apple-style-span" color="#ff0000">created 676
            trials</font></div>
      </div>
      <div><br>
      </div>
      <div>My question is what are the 676 trials if it found no
        events? </div>
      <div><br>
      </div>
      <div>Can anyone give me some advice?</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div>Thanks very much.</div>
      <div><br>
      </div>
      <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

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>