[Eeglablist] Scaling data to microvolts after loadavg()
Arnaud Delorme
arno at ucsd.edu
Fri May 20 07:49:01 PDT 2011
Dear Stephen,
this is a known problem with the loadavg() function. I suggest you modify the loadavg.m function directly and send us an updated version with microvolt scaling. Ideally, there would be an input parameter that would indicate if the user wants the data converted to microvolt or not.
Best,
Arno
On May 17, 2011, at 7:52 PM, Stephen Politzer-Ahles wrote:
> 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/
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110520/c6384223/attachment.html>
More information about the eeglablist
mailing list