<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Ricardo,<div><br></div><div>It looks as if there's a discrepancy between what FieldTrip extracts from the header, and what is actually in the data file. Did you try another data file to see whether your problem occurs just in this single example or not? I read brainvision data all the time, and haven't encountered issues so far. If your data file is sufficiently small, you could try to .zip it (both data/header/marker files) and upload it to our <a href="http://bugzilla.fcdonders.nl">bugzilla.fcdonders.nl</a> website. You have to create an account, and then you can 'file a bug', describing the problem (basically just copy and paste what you wrote in your original e-mail), and upload the data. Our team than can have a look at it.</div><div><br></div><div>Best wishes,</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br><div><div>On Feb 14, 2013, at 4:12 PM, Ricardo Moura wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Dear all,<div><br></div><div style="">I am very new to fieldtrip and I am experiencing a problem when reading brainvision data. I searched in the mailinglist archives but I didn't find anything that could help me. In case there is information about it somewhere else, I would appreciate if someone can send me a reference.</div>
<div style=""><br></div><div style="">The problem is the following. I am tring to read continuous data from the brainvision analyzer (already preprocessed), but I always have an error which seems to be due to a problem with the identification of the channels resolution. I exported the data from brainvision in ".dat" vectorized format, and I am loading it first with the ft_preprocessing command.</div>
<div style=""><br></div><div style="">Here is the command I am running to load it:</div><div style=""><div>cfg = [];</div><div>cfg.dataset = 'Raw Data Inspection.dat';</div><div style="">eegData = ft_preprocessing(cfg)</div><div style="">
<br></div><div style=""><br></div><div style="">Then the following warning message is returned, for each of the 56 channels I have in the data:</div><div style=""><div>Warning: Unknown resolution for channel 55 in Raw Data Inspection.vhdr! </div>
<div>> In fileio\private\read_brainvision_vhdr at 50</div><div>  In ft_read_header at 381</div><div>  In ft_preprocessing at 394</div></div><div style=""><br></div><div style=""><br></div><div style="">And at the end, I have the following error:</div>
<div style=""><div>??? Index exceeds matrix dimensions.</div><div><br></div><div>Error in ==> read_brainvision_eeg at 150</div><div>    dat(chan,:) = tmp(begsample:endsample);</div><div><br></div><div>Error in ==> ft_read_data at 400</div>
<div>    dat = read_brainvision_eeg(filename, hdr.orig, begsample, endsample, chanindx);</div><div><br></div><div>Error in ==> ft_preprocessing at 573</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></div><div style=""><br></div><div style=""><br></div><div style="">Interestingly, when I read the header file with the "hdr = ft_read_header('Raw Data Inspection.vhdr')", it says that I have only 80 samples in the data. When checking the header file with the notepad, it says that there are actualy 797740 data points.</div>
<div style=""><br></div><div style="">So, am I realling doing it right?</div><div style="">Thank you very much in advance, and best wishes,</div><div style="">Ricardo</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>
<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; "><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 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-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 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-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-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>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div><div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></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></div></span></div></span></div></span></span>
</div>
<br></div></body></html>