<div dir="ltr"><div><br></div><div>Zach,</div><div><br></div><div>I will take a stab at this, and let Arno correct me on any details. My description</div><div>applies only to the short-window Fourier transform method. I don't know</div>
<div>about wavelets.</div><div><br></div>The EEGLAB function timef takes the log of post-stimulus power in each <div>time window, and the log of pre-stimulus power averaged over the </div><div>pre-stimulus time window, and averages over epochs to get a good</div>
<div>statistical estimate. It takes the ratio of these times 10 to get dB. </div><div>That is the same as taking the ratio of raw powers then taking the log, </div><div>since log(a/b) = log(a) - log(b). Note the log is base 10, so the inverse is </div>
<div>10^ not exp. So, roughly speaking, you can take ERSP/10, take 10^, and </div><div>multiply by the baseline power which is stored in the variable powbase. </div><div>That will give you approximately power in uV^2. Taking the sqrt gives</div>
<div>approximately uV.<br><div><br></div><div>However, if you wanted a function that would give you a value of 2 when a</div><div>2 uV sine wave is passed in, you need to do considerably more bookkeeping.</div><div>I will list the main issues. First, cosine tapering, if done, reduces the power</div>
<div>but this can be corrected by dividing by a suitable factor. Second, there</div><div>are several ways that people normalize the Fourier transform and the</div><div>various definitions of power (average power, total power, power spectral</div>
<div>density) and these all differ by factors of the number of time points passed</div><div>to FFT, the sample rate, etc. Third, zero-padding to increase frequency</div><div>resolution increases the number of time points but not the power, and </div>
<div>this changes the power by a factor of padratio. The function timef does </div><div>not keep careful track of these kinds of factors, because they cancel in </div><div>the definition of ERSP as a ratio, so they do not matter. The prescription </div>
<div>above will give you something that is proportional to, but not exactly </div><div>equal to uV.</div><div><div><br>-- <br>Thomas Ferree, PhD<br>Department of Radiology<br>UT Southwestern Medical Center<br>Email: <a href="mailto:tom.ferree@gmail.com">tom.ferree@gmail.com</a><br>
<div class="gmail_quote">Voice: (214) 648-9767</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Thu, Sep 11, 2008 at 6:29 PM, Zachary Moran <span dir="ltr"><<a href="mailto:zdmoran@gmail.com">zdmoran@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr">Hi all,<br><br>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.<br>
<br>Based on my own experience and the posts of others, the trouble seems to relate to the following:<br><br>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:<br>
<br>??? Error using ==> mpower<br>Matrix must be square.<br><br>Error in ==> newtimef at 1750<br> mbase = 10^(mbase/10);<br><br>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.<br>
<br>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? <br>
<br>Any help or insight into conversion of ERSP and ITC arrays would be very greatly appreciated!<br><br>Many thanks,<br><br>Zach Moran<br>Graduate Student<br>University of California-Los Angeles<br>Lab for Clinical Affective Psychophysiology<br>
</div>
<br></blockquote></div>
</div></div></div></div>