[Scipy-svn] r4040 - trunk/scipy/signal

scipy-svn at scipy.org scipy-svn at scipy.org
Wed Mar 19 10:16:29 EDT 2008


Author: stefan
Date: 2008-03-19 09:16:20 -0500 (Wed, 19 Mar 2008)
New Revision: 4040

Modified:
   trunk/scipy/signal/wavelets.py
Log:
Fix Morlet wavelet.


Modified: trunk/scipy/signal/wavelets.py
===================================================================
--- trunk/scipy/signal/wavelets.py	2008-03-19 13:16:32 UTC (rev 4039)
+++ trunk/scipy/signal/wavelets.py	2008-03-19 14:16:20 UTC (rev 4040)
@@ -172,19 +172,19 @@
 def morlet(M, w=5.0, s=1.0, complete=True):
     """Complex Morlet wavelet.
 
-    :Parameters:
-        M : int
-            Length of the wavelet.
-        w : float
-            Omega0
-        s : float
-            Scaling factor, windowed from -s*2*pi to +s*2*pi.
-        complete : bool
-            Whether to use the complete or the standard version.
+    Parameters
+    ----------
+    M : int
+        Length of the wavelet.
+    w : float
+        Omega0
+    s : float
+        Scaling factor, windowed from -s*2*pi to +s*2*pi.
+    complete : bool
+        Whether to use the complete or the standard version.
 
     Notes:
     ------
-
     The standard version:
         pi**-0.25 * exp(1j*w*x) * exp(-0.5*(x**2))
 
@@ -210,7 +210,7 @@
     output = exp(1j*w*x)
 
     if complete:
-        x -= exp(-0.5*(w**2))
+        output -= exp(-0.5*(w**2))
 
     output *= exp(-0.5*(x**2)) * pi**(-0.25)
 




More information about the Scipy-svn mailing list