<div dir="ltr">Dear respondent,<div><br></div><div style>Thank you for your advices. </div><div style>I will try these methods.</div><div style><br></div><div style>Best regards</div><div style><br></div><div style><br></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/30 Chungki Lee <span dir="ltr"><<a href="mailto:dr.chungki.lee@gmail.com" target="_blank">dr.chungki.lee@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Min<div><br></div><div>you'd better use ft_definetrial routine before <span style="font-family:arial,sans-serif;font-size:14px"> </span><span style="font-family:arial,sans-serif;font-size:14px">ft_preprocessing.</span></div>

<div><span style="font-family:arial,sans-serif;font-size:14px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:14px">example)</span></div><div><span style="font-family:arial,sans-serif;font-size:14px"><br>

</span></div><div><div><font face="arial, sans-serif"><span style="font-size:14px">    cfg                              = [];</span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px">    cfg.dataset                 = filename;  % string</span></font></div>

<div><font face="arial, sans-serif"><span style="font-size:14px">    cfg.trialdef.eventtype  =  your define text; % string</span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px">    cfg.trialdef.eventvalue = your label value;  % integer </span></font></div>

<div><font face="arial, sans-serif"><span style="font-size:14px">    cfg.trialdef.prestim    = before onset time (sec); </span></font><span style="font-family:arial,sans-serif;font-size:14px">% positive integer, not negative integer</span></div>

<div><font face="arial, sans-serif"><span style="font-size:14px">    cfg.trialdef.poststim   = after onset time (sec); </span></font><span style="font-family:arial,sans-serif;font-size:14px">% positve integer</span></div>

<div><font face="arial, sans-serif"><span style="font-size:14px">    cfg                            = ft_definetrial(cfg); </span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px">    data                          = ft_preprocessing(cfg);</span></font></div>

<div><font face="arial, sans-serif"><span style="font-size:14px"><br></span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px">have fun ^^</span></font></div></div></div><div class="gmail_extra">
<div><div class="h5">
<br><br><div class="gmail_quote">2013/5/30 Beom Jun Min <span dir="ltr"><<a href="mailto:mbj0310@gmail.com" target="_blank">mbj0310@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Dear Julian Keil,<div><br></div><div>Thank you for your reply. </div><div>I agree with that your problem was similar with mine. </div><div>My data was acquired by Neuroscan also. </div><div>
There might a problem associated with .CNT file in the newer version.</div><div><br></div><div>Could you tell me the number of the older version you used? </div><div><br></div><div>Best Regards</div>
<div><br></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/29 Julian Keil <span dir="ltr"><<a href="mailto:julian.keil@gmail.com" target="_blank">julian.keil@gmail.com</a>></span><br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Dear BJ Min,<div><br></div><div>what type of data are you trying to read in?</div><div>


I had similar problems when reading in .CNT data.</div><div>Also, with some systems you have to specify the bit rate (e.g. Neuroscan).</div><div>For me, reading in data with an older version of FieldTrip solved the problem, but this was in 2011, so I cannot say if the problem with .CNT files has been solved.</div>


<div><br></div><div>Good Luck</div><div><br></div><div>Julian</div><div><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div>


<div style="word-wrap:break-word;font-size:12px">********************</div><div style="word-wrap:break-word"><b>Dr. Julian Keil</b></div><div style="word-wrap:break-word"><b><br></b></div>AG Multisensorische Integration<br>


Psychiatrische Universitätsklinik<br>der Charité im St. Hedwig-Krankenhaus<br>Große Hamburger Straße 5-11, Raum E 307<br>10115 Berlin</div><div><br>Telefon: +49-30-2311-1879<br>Fax:        +49-30-2311-2209 </div><div><a href="http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration" target="_blank">http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration</a></div>


</span>
</div>
<br><div><div>Am 29.05.2013 um 11:47 schrieb Beom Jun Min:</div><br><blockquote type="cite"><div><div><div dir="ltr"><div>Dear all,</div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:14px">Hello, my name is BJ Min from Korea.</span><br>


</div><div><span style="font-family:arial,sans-serif;font-size:14px"><br>
</span></div><div>I'm dealing with EEG data of many subjects. </div><div><br></div><div>When I run ft_preprocessing, the error message below shows with only some files of my data. (not all files)</div><div><br></div>


<div>
Warning: rounding "endsample" to the nearest integer </div><div>> In ft_read_data at 100</div><div>  In ft_preprocessing at 577</div><div>??? Error using ==> ft_read_data at 149</div><div>cannot read data after the end of the file</div>



<div><br></div><div>Error in ==> ft_preprocessing at 577</div><div>      dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx,</div>



<div>      'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) </div><div><br></div><div>I think that there might be a kind of problem in data acquisition, and I modified below scripts in the ft_read_data function with comment %.</div>



<div><br></div><div>% % test whether the requested data segment is not outside the file</div><div>% if any(begsample<1)</div><div>%   error('FILEIO:InvalidBegSample', 'cannot read data before the begin of the file');</div>



<div>% elseif any(endsample>(hdr.nSamples*hdr.nTrials))</div><div>%   error('FILEIO:InvalidEndSample', 'cannot read data after the end of the file');</div><div>% end</div><div><br></div><div>After that, the ft_preprocessing worked well.</div>



<div><br></div><div>However, the files with the first problem showed additional warning message while running ft_definetrial. (not error message)</div><div><br></div><div>Warning: Integer operands are required for colon operator when used as index </div>



<div>> In fileio\private\loadcnt at 464</div><div>  In ft_read_header at 1450</div><div>  In ft_preprocessing at 398</div><div><br></div><div>Warning: rounding "endsample" to the nearest integer </div><div>> In ft_read_data at 100</div>



<div>  In ft_preprocessing at 577</div><div><br></div><div>Also, during ft_redefinetrial, following warning message occurs.(not error message)</div><div><br></div><div>Warning: removing inconsistent sampleinfo </div><div>



> In ft_datatype_raw at 97</div><div>  In ft_checkdata at 213</div><div>  In ft_redefinetrial at 104</div><div><br></div><div>Warning: the trial definition in the configuration is inconsistent with the actual data </div>



<div>> In utilities\private\warning_once at 116</div><div>  In utilities\private\fixsampleinfo at 74</div><div>  In ft_datatype_raw at 154</div><div>  In ft_checkdata at 213</div><div>  In ft_redefinetrial at 206</div>



<div><br></div><div>Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording </div><div>> In utilities\private\warning_once at 116</div><div>  In utilities\private\fixsampleinfo at 79</div>



<div>  In ft_datatype_raw at 154</div><div>  In ft_checkdata at 213</div><div>  In ft_redefinetrial at 206</div><div><br></div><div>I wonder if these messages during ft_redefinetrial mean wrong defining trials. </div><div>



Should I continue these process like this, modifying the ft_preprocessing function? </div><div>Or, is it better to exclude some erroneous files?</div><div><br></div><div>Best regards</div><div><br></div>-- <br><div dir="ltr">



<div><font face="arial, helvetica, sans-serif">BeomJun Min, M.D.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><span style="color:rgb(51,51,51);line-height:18px">Department of Medical System Engineering (DMSE)<br>



</span><span style="color:rgb(51,51,51);line-height:18px">Gwangju Institute of Science and Technology (GIST)</span><span style="color:rgb(51,51,51);line-height:18px"> </span><span style="color:rgb(51,51,51);line-height:18px"><br>



261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju <br>500-712, Republic of Korea (South) <br>Phone: +82-62-715-3266 / Fax: +82-62-715-3244 <br>E-mail: </span><a href="mailto:mbj0310@gmail.com" style="text-decoration:none;line-height:18px" target="_blank"><span>mbj0310@gmail.com</span></a><span style="color:rgb(51,51,51);line-height:18px">, <a href="http://bmssa.gist.ac.kr/" style="text-decoration:none" target="_blank">http://bmssa.gist.ac.kr</a></span></font><br>



</div></div>
</div></div></div>
_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote>


</div><br></div></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">


<div><font face="arial, helvetica, sans-serif">BeomJun Min, M.D.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><span style="color:rgb(51,51,51);line-height:18px">Department of Medical System Engineering (DMSE)<br>


</span><span style="color:rgb(51,51,51);line-height:18px">Gwangju Institute of Science and Technology (GIST)</span><span style="color:rgb(51,51,51);line-height:18px"> </span><span style="color:rgb(51,51,51);line-height:18px"><br>


261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju <br>500-712, Republic of Korea (South) <br>Phone: +82-62-715-3266 / Fax: +82-62-715-3244 <br>E-mail: </span><a href="mailto:mbj0310@gmail.com" style="text-decoration:none;line-height:18px" target="_blank"><span>mbj0310@gmail.com</span></a><span style="color:rgb(51,51,51);line-height:18px">, <a href="http://bmssa.gist.ac.kr/" style="text-decoration:none" target="_blank">http://bmssa.gist.ac.kr</a></span></font><br>


</div></div>
</div>
</div></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br></div></div><div>
----------------------------------------------------------------<br>
Chungki Lee, Ph.D.<br>Post-doc <br>Biomedical Research Institute <br>Korea Institute of Science and Technology <br>E-mail: <a href="mailto:chungki@kist.re.kr" target="_blank">chungki@kist.re.kr</a></div>
<div>Tel:+82-2-958-5636, C.P: +82-10-5223-7309</div>
<div>----------------------------------------------------------------<br></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" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">
<div><font face="arial, helvetica, sans-serif">BeomJun Min, M.D.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><span style="color:rgb(51,51,51);line-height:18px">Department of Medical System Engineering (DMSE)<br>
</span><span style="color:rgb(51,51,51);line-height:18px">Gwangju Institute of Science and Technology (GIST)</span><span style="color:rgb(51,51,51);line-height:18px"> </span><span style="color:rgb(51,51,51);line-height:18px"><br>
261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju <br>500-712, Republic of Korea (South) <br>Phone: +82-62-715-3266 / Fax: +82-62-715-3244 <br>E-mail: </span><a href="mailto:mbj0310@gmail.com" style="text-decoration:none;line-height:18px" target="_blank"><span>mbj0310@gmail.com</span></a><span style="color:rgb(51,51,51);line-height:18px">, <a href="http://bmssa.gist.ac.kr/" style="text-decoration:none" target="_blank">http://bmssa.gist.ac.kr</a></span></font><br>
</div></div>
</div>