<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Tobias,<div><br></div><div>I forward your question to the discussion list, so that many may benefit from the discussion. I am not sure what is going on and I don't know whether other people have encountered this. Are you calling the function from the correct directory? In other words, you should not be within the *.ds directory itself. </div><div>You could also try to explicitly define cfg.datafile and cfg.headerfile (and omit the cfg.dataset).</div><div><br></div><div>Let me know when the problem persists.</div><div><br></div><div>Best wishes,</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>From: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Tobias Overath <<a href="mailto:t.overath@ucl.ac.uk">t.overath@ucl.ac.uk</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>Date: </b></span><span style="font-family:'Helvetica'; font-size:medium;">August 3, 2011 12:37:15 PM GMT+02:00<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>To: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</a><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>Subject: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>ft_definetrial crash</b><br></span></div><br><div>Hi Jan-Mathijs,<br><br>I participated in the MEG FieldTrip course this past April and have finally managed to get my first MEG dataset from the CTF machine here at the FIL. However, I am already crashing at the first step, i.e. when running ft_definetrial.<br><br>This is my code:<br>cfg = [];<br>cfg.dataset = 'S01_01.ds';<br>cfg.trialdef.eventtype = 'frontpanel trigger';<br>cfg.trialdef.eventvalue = 1;<br>cfg.trialdef.prestim = .25;<br>cfg.trialdef.poststim = 2.75;<br>cfg = ft_definetrial(cfg);<br><br>It recognises correctly that it's supposed to read the header from  S01_01.ds/S01_01.res, but it then tells me that it can't find the file S01_01.meg4 (which is true, because it should be S01_01.ds/S01_01.meg4). I presume this is a pretty common error, but it occurs with two FieldTrip versions that I have downloaded (very recent ones). I am probably missing something very obvious...<br><br>Incidentally, is there no other way to search the FieldTrip email archives than to download a zipped text file for each month of the previous 7 years?!?<br><br>Thanks,<br><br>Tobias<br><br><br><br>--<br>Tobias Overath, PhD<br>UCL Ear Institute<br>University College London<br>332 Grays Inn Road<br>London, WC1X 8EE<br>UK<br><a href="http://www.homepages.ucl.ac.uk/~skgtjto">http://www.homepages.ucl.ac.uk/~skgtjto</a><br><br><br><br><br><br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dr. J.M. (Jan-Mathijs) Schoffelen </div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: +31-24-3614793</div></div></span></div></span></span>
</div>
<br></div></body></html>