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

scipy-svn@scip... scipy-svn@scip...
Sun Nov 9 19:58:06 CST 2008


Author: ptvirtan
Date: 2008-11-09 19:57:55 -0600 (Sun, 09 Nov 2008)
New Revision: 5033

Modified:
   trunk/scipy/signal/signaltools.py
Log:
Fix signal.hilber* docstrings

Modified: trunk/scipy/signal/signaltools.py
===================================================================
--- trunk/scipy/signal/signaltools.py	2008-11-09 23:56:13 UTC (rev 5032)
+++ trunk/scipy/signal/signaltools.py	2008-11-10 01:57:55 UTC (rev 5033)
@@ -921,7 +921,36 @@
 
 
 def hilbert(x, N=None):
-    """Return the hilbert transform of x of length N.
+    """Compute the analytic signal.
+
+    The transformation is done along the first axis.
+
+    Parameters
+    ----------
+    x : array-like
+        Signal data
+    N : int, optional
+        Number of Fourier components. Default: ``x.shape[0]``
+
+    Returns
+    -------
+    xa : ndarray, shape (N,) + x.shape[1:]
+        Analytic signal of `x`
+
+    Notes
+    -----
+    The analytic signal `x_a(t)` of `x(t)` is::
+
+        x_a = F^{-1}(F(x) 2U) = x + i y
+    
+    where ``F`` is the Fourier transform, ``U`` the unit step function,
+    and ``y`` the Hilbert transform of ``x``. [1]
+
+    References
+    ----------
+    .. [1] Wikipedia, "Analytic signal".
+           http://en.wikipedia.org/wiki/Analytic_signal
+
     """
     x = asarray(x)
     if N is None:
@@ -946,7 +975,12 @@
     return x
 
 def hilbert2(x,N=None):
-    """Return the '2-D' hilbert transform of x of length N.
+    """Compute the '2-D' analytic signal of `x` of length `N`.
+
+    See also
+    --------
+    hilbert
+
     """
     x = asarray(x)
     x = asarray(x)



More information about the Scipy-svn mailing list