<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
h1
        {margin-top:12.0pt;
        margin-right:0in;
        margin-bottom:3.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:12.0pt;
        font-family:"Times New Roman";}
h2
        {margin-top:12.0pt;
        margin-right:0in;
        margin-bottom:3.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:12.0pt;
        font-family:"Times New Roman";
        font-style:italic;}
h3
        {margin-top:12.0pt;
        margin-right:0in;
        margin-bottom:3.0pt;
        margin-left:0in;
        line-height:200%;
        page-break-after:avoid;
        font-size:12.0pt;
        font-family:"Times New Roman";}
p.MsoToc5, li.MsoToc5, div.MsoToc5
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Times New Roman";
        font-style:italic;}
p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:6.0pt;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.JMsstyle01, li.JMsstyle01, div.JMsstyle01
        {margin:0in;
        margin-bottom:.0001pt;
        line-height:200%;
        font-size:12.0pt;
        font-family:"Times New Roman";
        font-weight:bold;}
p.JMsstyle02, li.JMsstyle02, div.JMsstyle02
        {margin:0in;
        margin-bottom:.0001pt;
        line-height:200%;
        font-size:12.0pt;
        font-family:"Times New Roman";
        font-style:italic;}
p.JMsstyle03, li.JMsstyle03, div.JMsstyle03
        {margin:0in;
        margin-bottom:.0001pt;
        text-align:justify;
        line-height:200%;
        font-size:12.0pt;
        font-family:"Times New Roman";
        font-weight:bold;
        font-style:italic;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi Brian,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The multiplication with 2 and the division
by the sampling rate achieves a proper normalization and should be included. The
factor 2 is coming from the fact that the power at a specific frequency is
estimated at both the frequency itself and its negative counterpart. The
division by the number of samples ensures that the total power (summed across
all computable frequencies, so between 0 and Nyquist) will be equal to the
total variance of the time-domain signal.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Yours,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Jan-Mathijs<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> <st1:PersonName
w:st="on">FieldTrip discussion list</st1:PersonName> [mailto:FIELDTRIP@NIC.SURFNET.NL]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Brian Roach<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, November 08, 2006
9:20 PM<br>
<b><span style='font-weight:bold'>To:</span></b> FIELDTRIP@NIC.SURFNET.NL<br>
<b><span style='font-weight:bold'>Subject:</span></b> [FIELDTRIP]
freqanalysis_wltconvol.m question</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hi,<br>
<br>
In the freqanalysis_wltconvol.m function, the FFT of zero-padded eeg or MEG
data and the FFT of the wavelets at various frequencies of interest are
convolved and the inverse FFT of that result is used to calculate power in this
manner on line 283:<br>
powdum </span></font><font face="Courier New"><span style='font-family:"Courier New"'>=
(2.* abs(autspctrmacttap)  ./ data.fsample) .^ 2;<br>
</span></font><font size=4 face=Arial><span style='font-size:13.5pt;font-family:
Arial'>here, autspctrmacttap corresponds to the complex output from the call to
ifft.  <br>
</span></font>In previous e-mail Jan-Mathijs has mentioned that the abs of the
complex data gets you amplitude, so I am wondering why it gets multiplied by 2
and divided by the sampling rate before being squared since power =
amplitude^2.  I am wondering how important it is to multiply by 2 and
divide by the AD rate because I would like to take this complex output and use
it to calculate phase-locking factor, but I am not sure what parts of the power
transformation need to be removed - just the abs() and the squaring? 
Clarification of this line of code would be extremely helpful to me.<br>
<br>
Thanks,<br>
Brian<o:p></o:p></p>

</div>

</body>

<br>
</html>