<div dir="ltr">Hi Jose,<div><br></div><div>Following on from what Steve said, you could try to use the i/o function read_ctf_cls('ClassFile.cls'). This will return an array of values indexing the trials marked as BAD, which you can use later on to exclude BAD trials from the analysis. Probably this is not the ideal solution but is roughly what I do to read the ClassFile.</div><div><br></div><div>Best,</div><div>Lorenzo</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 February 2016 at 11:09, Stephen Politzer-Ahles <span dir="ltr"><<a href="mailto:stephen.politzer-ahles@ling-phil.ox.ac.uk" target="_blank">stephen.politzer-ahles@ling-phil.ox.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello Jose,<br><br></div>Does it work differently if you use ft_definetrial and ft_preprocessing? ft_read_event is a low-level function, it should be possible to read your data without using it, and just using ft_definetrial plus ft_preprocessing.<br><br></div>I don't remember off the top of my head whether ft_definetrial was able to find the BAD events in the classfile. If you don't find a better way to deal with this issue, another way around would be to just read all your events with ft_definetrial, and write some MATLAB code to read the classfile directly, identify the indices of the bad trials, and remove those rows from the trial definition (or remove them at some later time, e.g., to keep them in the trial definition so they do get read, but then not include those trials in your timelockanalysis later on).<br><br></div>best,<br></div>Steve<br><div><div><div><div><div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span><div><br><br>---<br></div>Stephen Politzer-Ahles<br>University of Oxford<br>Language and Brain Lab<br>Faculty of Linguistics, Phonetics & Philology<br><a href="http://users.ox.ac.uk/~cpgl0080/" target="_blank">http://users.ox.ac.uk/~cpgl0080/</a></span></div></div></div></div></div></div></div>
<div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Message: 4<br>
Date: Tue, 16 Feb 2016 18:43:01 +0100<br>
From: Jose <<a href="mailto:joseluisblues@gmail.com" target="_blank">joseluisblues@gmail.com</a>><br>
To: <a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a><br>
Subject: [FieldTrip] CTF data, marker and class files<br>
Message-ID:<br>
        <<a href="mailto:CAH3cVdA_VxHQDcXX3uxoqTFva%2B4UsMSWP%2BiccgZ4zZKH51PJ8A@mail.gmail.com" target="_blank">CAH3cVdA_VxHQDcXX3uxoqTFva+4UsMSWP+iccgZ4zZKH51PJ8A@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<div><div class="h5"><br>
<br>
dear list,<br>
<br>
I'm trying to analyse CTF MEG data, but I'm running into problems when<br>
getting my triggers. ft_read_event recognize well the triggers in my<br>
MarkerFile.mrk, but for some reason do not look at the ClassFile.cls file,<br>
so I'm missing the BAD triggers in my events,<br>
<br>
Someone has run on the same problem?,<br>
<br>
thanks<br>
Jose<br><br></div></div></blockquote></div><br></div></div></div></div></div></div></div>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>