<div dir="ltr"><div>Hi all,<br>The bva-io plugin had a bug which prevent correct scaling of the data.<br>most of the operation on chanlocs was not stored in EEG structure<br>I mainly changed the lines  117-136 of pop_loadbv.m for the following to restore correct scaling.<br><br><br>if isfield(hdr, 'channelinfos')<br>    for chan = 1:length(chans)<br>        try<br>            [EEG.chanlocs(chan).labels, EEG.chanlocs(chan).ref, EEG.chanlocs(chan).scale, EEG.chanlocs(chan).unit] = strread(hdr.channelinfos{chans(chan)}, '%s%s%s%s', 1, 'delimiter', ',');<br>        catch % Octave compatible code below<br>            str  = hdr.channelinfos{chans(chan)};<br>            [EEG.chanlocs(chan).labels str] = strtok(str, ',');<br>            [EEG.chanlocs(chan).ref        str] = strtok(str, ',');<br>            [EEG.chanlocs(chan).scale      str] = strtok(str, ',');<br>            [EEG.chanlocs(chan).unit       str] = strtok(str, ',');<br>        end;<br>        EEG.chanlocs(chan).labels = char(EEG.chanlocs(chan).labels);<br>        EEG.chanlocs(chan).scale = str2double(char(EEG.chanlocs(chan).scale));<br>%             EEG.chanlocs(chan).unit = native2unicode(double(char(EEG.chanlocs(chan).scale)), 'UTF-8');<br>%             EEG.chanlocs(chan).datachan = chans(chan);<br>    end<br>    if isempty([EEG.chanlocs.scale])<br>        EEG.chanlocs = rmfield(EEG.chanlocs, 'scale');<br>    end<br>end;<br></div><div><div><br><br><br></div><div>I am kind of lost between the repository for the code though so I didn't pushed anything.<br><br></div><div>Cheers.<br></div><div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><font size="1">Basile Pinsard<br></font></div><i><font size="1">PhD candidate, <br></font></i></div><font size="1">Laboratoire d'Imagerie Biomédicale, UMR S 1146 / UMR 7371, Sorbonne Universités, UPMC, INSERM, CNRS</font><br><font size="1"><span><span style="color:rgb(51,51,51)"><span style="font-family:Arial,serif"><span lang="en-GB"><i>Brain-Cognition-Behaviour Doctoral School </i></span></span></span><span style="color:rgb(51,51,51)"><span style="font-family:Arial,serif"><span lang="en-GB"><b>, </b>ED3C<b>, </b>UPMC, Sorbonne Universités<br>Biomedical Sciences Doctoral School, Faculty of Medicine, Université de Montréal <br></span></span></span></span></font><font size="1">CRIUGM, Université de Montréal</font><br></div></div></div></div>
</div></div></div>