<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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 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: -webkit-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; "><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; ">********************</div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><b>Dr. Julian Keil</b></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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">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 class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div style="">Dear all,</div><div style=""><br></div><div style=""><span style="font-family:arial,sans-serif;font-size:14px">Hello, my name is BJ Min from Korea.</span><br></div><div style=""><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>
_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br></div></body></html>