[Eeglablist] Scaling data to microvolts after loadavg()

Stephen Politzer-Ahles politzerahless at gmail.com
Tue May 17 19:52:26 PDT 2011


Hello all,

I am using loadavg() to import Neuroscan average files for some simple
processing in MATLAB, and I would like to scale the imported data back into
microvolts (so that I can compare the data I'm working with in MATLAB
against data processed in Neuroscan, which represents data points in
microvolts). Does anyone happen to have any sample code to do this? I found
the following instructions in
http://sccn.ucsd.edu/eeglab/allfunctions/loadavg.m :

% Average data is stored as 4-byte floats in vectored format for each
> % channel. Each channel has a 5-byte header that is no longer used. Thus,
> % after the main file header, there is an unused 5-byte header followed by
> % erp.pnts of 4-byte floating point numbers for the first channel; then a
> % 5-byte header for channel two followed by erp.pnts*sizeof(float) bytes,
> % etc. Therefore, the total number of bytes after the main header is:
> % erp.nchannels * (5 + erp.pnts*sizeof(float)). To scale a data point to
> % microvolts, multiply by the channel-specific calibration factor (i.e., for
> % electrode j: channel[j]->calib) and divide by the number of sweeps in the
> % average (i.e., channel[j]->n).
>
>
>
> However, I don't know how to retrieve the necessary information (number of
sweeps and calibration factor) when running loadavg(). The function outputs
the number of sweeps in the MATLAB command window (from fprintf('number of
trials (s)       : %d\n', nsweeps);), but as far as I can tell that number
isn't stored in a variable anywhere that I can access? Any advice would be
greatly appreciated.

Thank you,
Stephen Politzer-Ahles


-- 
Stephen Politzer-Ahles
University of Kansas
Linguistics Department
http://www.linguistics.ku.edu/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110517/4e220d7c/attachment.html>


More information about the eeglablist mailing list