Julian,<div><br></div><div>It is my understanding that the header file doesn't change at all, since Brainvision Analyzer stores all changes either in the 'history' files or temporary files in the history folder. The *.vhdr and *.eeg (and marker files, if any) should be unchanged after preprocessing. Therefore, resolution information should still be there.</div>

<div><br></div><div>Could you check the contents of the header file with notepad?</div><div>It should say something like this for every channel under "[Channel Infos]":<br><div><div>Ch27=Fz,,0.0715,µV</div><div>

<br></div></div></div><div>Also, you could try to open it with Brainvision Analyzer, and see if that gives an error of sorts.</div><div><br></div><div>Sincerely,</div><div><br></div><div>Casper van Heck</div><br><div class="gmail_quote">

On Tue, Jan 24, 2012 at 11:54 PM, Karch, Julian <span dir="ltr"><<a href="mailto:karch@mpib-berlin.mpg.de">karch@mpib-berlin.mpg.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">







<div lang="DE" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-US">I'm working on a brainvision EEG dataset  which was preprocessed by someone else using Brainvision Analyzer. One part of his preprocessing was to set a new reference. This processing step makes the resolution information
 in the *vhdr file disappear. Because of that hdr.orig.resolution=NaN for all channels.  As result of that the lines<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                </span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">calib = diag(hdr.resolution(chanindx));</span><span lang="EN-US"><u></u><u></u></span></p>


<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">     
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">% using a sparse multiplication speeds it up</span><span lang="EN-US" style="font-size:12.0pt;font-family:"Courier New""><u></u><u></u></span></p>


<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">      dat = full(sparse(calib) * dat);</span><span lang="EN-US" style="font-size:12.0pt;font-family:"Courier New""><u></u><u></u></span></p>


<p class="MsoNormal"><span lang="EN-US">in read_brainvision_eeg produce only NaN. This again results in trials which only contain NaNs.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I do weekly updates of fieldtrip using svn. Because I'm quite sure if was able to read in, using ft_preprocssing, the excact same dataset, even with the same cfg file, earlier this year I checked the modifications for
 the last half year or so but I couldn't find any change which could have broken it.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">My two questions are. How would you handle this problem? Just plug in some random numbers like 0.1 ? Is this an issue with fieldtrip or am I doing something wrong? Were there any changes to the involved functions which
 could have changed the behavior in that way?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks in advance!<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Best,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Julian<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Julian Karch <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Research Assistant<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Center for Lifespan Psychology<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">MPI for Human Development<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Lentzeallee 94, 14195 Berlin, Germany<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">phone: <a href="tel:%2B49-30-82406-296" value="+493082406296" target="_blank">+49-30-82406-296</a><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">fax: <a href="tel:%2B49-30-8249939" value="+49308249939" target="_blank">+49-30-8249939</a><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">web: </span><a href="http://www.mpib-berlin.mpg.de" target="_blank"><span lang="EN-US" style="color:blue">http://www.mpib-berlin.mpg.de</span></a><span lang="EN-US"><u></u><u></u></span></p>


<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</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>