[Eeglablist] ERSP Conversion: dB to Microvolts-squared
Thomas Ferree
tom.ferree at gmail.com
Sun Sep 21 07:57:18 PDT 2008
Zach,
I will take a stab at this, and let Arno correct me on any details. My
description
applies only to the short-window Fourier transform method. I don't know
about wavelets.
The EEGLAB function timef takes the log of post-stimulus power in each time
window, and the log of pre-stimulus power averaged over the
pre-stimulus time window, and averages over epochs to get a good
statistical estimate. It takes the ratio of these times 10 to get dB.
That is the same as taking the ratio of raw powers then taking the log,
since log(a/b) = log(a) - log(b). Note the log is base 10, so the inverse
is
10^ not exp. So, roughly speaking, you can take ERSP/10, take 10^, and
multiply by the baseline power which is stored in the variable powbase.
That will give you approximately power in uV^2. Taking the sqrt gives
approximately uV.
However, if you wanted a function that would give you a value of 2 when a
2 uV sine wave is passed in, you need to do considerably more bookkeeping.
I will list the main issues. First, cosine tapering, if done, reduces the
power
but this can be corrected by dividing by a suitable factor. Second, there
are several ways that people normalize the Fourier transform and the
various definitions of power (average power, total power, power spectral
density) and these all differ by factors of the number of time points passed
to FFT, the sample rate, etc. Third, zero-padding to increase frequency
resolution increases the number of time points but not the power, and
this changes the power by a factor of padratio. The function timef does
not keep careful track of these kinds of factors, because they cancel in
the definition of ERSP as a ratio, so they do not matter. The prescription
above will give you something that is proportional to, but not exactly
equal to uV.
--
Thomas Ferree, PhD
Department of Radiology
UT Southwestern Medical Center
Email: tom.ferree at gmail.com
Voice: (214) 648-9767
On Thu, Sep 11, 2008 at 6:29 PM, Zachary Moran <zdmoran at gmail.com> wrote:
> Hi all,
>
> I have been trying to convert ERSP estimates from dB units to uV or uV^2
> but have so far been unsuccessful. I saw that a number of people have
> posted on this topic, but I haven't seen any conclusive replies and thought
> I'd send out another attempt.
>
> Based on my own experience and the posts of others, the trouble seems to
> relate to the following:
>
> 1) There is a command - 'outputformat','old' - that is supposed to make
> this conversion (and is also said to convert ITC arrays into non-complex
> numbers) that I haven't gotten to work. The problem may be in the
> programming - matlab requires a "10.^" rather than the dot-less "10^" to do
> element-wise exponents on non-square matrices, and the below error suggests
> that this may be missing:
>
> ??? Error using ==> mpower
> Matrix must be square.
>
> Error in ==> newtimef at 1750
> mbase = 10^(mbase/10);
>
> 2) Someone has suggested that the 'baseline','NaN' command may provide a
> uV output, though when I use it I get plots in units of uV/Hz. It was also
> suggested that these values must then be further converted to get absolute
> power or volts but I'm unsure as to how that would be done.
>
> 3) I considered the possibility of converting from dB to uV^2 directly in
> Matlab by using a formula for converting from dB to Volts. However, given
> that dB here are used as logarithmic voltage ratios (I think?), I don't know
> what value I would use as a reference voltage in the equation. Would I use
> the values given in the 'powbase' vector as reference values for the
> conversion?
>
> Any help or insight into conversion of ERSP and ITC arrays would be very
> greatly appreciated!
>
> Many thanks,
>
> Zach Moran
> Graduate Student
> University of California-Los Angeles
> Lab for Clinical Affective Psychophysiology
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20080921/cbe1aa89/attachment.html>
More information about the eeglablist
mailing list