[Scipy-svn] r2242 - trunk/Lib/signal

scipy-svn at scipy.org scipy-svn at scipy.org
Fri Oct 6 13:25:44 CDT 2006


Author: stefan
Date: 2006-10-06 13:25:18 -0500 (Fri, 06 Oct 2006)
New Revision: 2242

Modified:
   trunk/Lib/signal/info.py
   trunk/Lib/signal/signaltools.py
Log:
Clean up signal documentation.


Modified: trunk/Lib/signal/info.py
===================================================================
--- trunk/Lib/signal/info.py	2006-10-05 04:08:32 UTC (rev 2241)
+++ trunk/Lib/signal/info.py	2006-10-06 18:25:18 UTC (rev 2242)
@@ -11,7 +11,6 @@
     correlate2d   --  2-dimensional correlation (more options).
     sepfir2d      --  Convolve with a 2-D separable FIR filter.
 
-
  B-splines:
 
     bspline       --  B-spline basis function of order n.
@@ -35,20 +34,26 @@
 
     deconvolve    --  1-d deconvolution using lfilter.
 
-    hilbert       --- Compute the analytic signal of a 1-d signal.
-    get_window    --- Create FIR window.
+    hilbert       -- Compute the analytic signal of a 1-d signal.
+    get_window    -- Create FIR window.
 
-    detrend       --- Remove linear and/or constant trends from data.
+    detrend       -- Remove linear and/or constant trends from data.
+    resample      -- Resample using Fourier method.
 
  Filter design:
 
-    remez         --  Optimal FIR filter design.
-    firwin        --- Windowed FIR filter design.
-    iirdesign     --- IIR filter design given bands and gains
-    iirfilter     --- IIR filter design given order and critical frequencies
-    freqs         --- Analog filter frequency response
-    freqz         --- Digital filter frequency response
+    remez         -- Optimal FIR filter design.
+    firwin        -- Windowed FIR filter design.
+    iirdesign     -- IIR filter design given bands and gains.
+    iirfilter     -- IIR filter design given order and critical frequencies.
+    freqs         -- Analog filter frequency response.
+    freqz         -- Digital filter frequency response.
 
+    unique_roots  -- Unique roots and their multiplicities.
+    residue       -- Partial fraction expansion of b(s) / a(s).
+    residuez      -- Partial fraction expansion of b(z) / a(z).    
+    invres        -- Inverse partial fraction expansion.
+
  Matlab-style IIR filter design:
 
     butter (buttord)  -- Butterworth
@@ -59,31 +64,50 @@
 
  Linear Systems:
 
-    lti -- linear time invariant system object.
-    lsim -- continuous-time simulation of output to linear system.
+    lti     -- linear time invariant system object.
+    lsim    -- continuous-time simulation of output to linear system.
     impulse -- impulse response of linear, time-invariant (LTI) system.
-    step -- step response of continous-time LTI system.
+    step    -- step response of continous-time LTI system.
 
  LTI Reresentations:
 
     tf2zpk -- transfer function to zero-pole-gain.
     zpk2tf -- zero-pole-gain to transfer function.
-    tf2ss -- transfer function to state-space.
-    ss2tf -- state-pace to transfer function.
+    tf2ss  -- transfer function to state-space.
+    ss2tf  -- state-pace to transfer function.
     zpk2ss -- zero-pole-gain to state-space.
     ss2zpk -- state-space to pole-zero-gain.
 
  Waveforms:
 
-    sawtooth -- Periodic sawtooth
-    square -- Square wave
+    sawtooth   -- Periodic sawtooth
+    square     -- Square wave
     gausspulse -- Gaussian modulated sinusoid
-    chirp -- Frequency swept cosine signal
+    chirp      -- Frequency swept cosine signal
 
+ Window functions:
+
+    boxcar           -- Boxcar window
+    triang           -- Triangular window
+    parzen           -- Parzen window
+    bohman           -- Bohman window
+    blackman         -- Blackman window
+    blackmanharris   -- Minimum 4-term Blackman-Harris window
+    nuttall          -- Nuttall's minimum 4-term Blackman-Harris window
+    flattop          -- Flat top window
+    bartlett         -- Bartlett window
+    hann             -- Hann window
+    barthann         -- Bartlett-Hann window
+    hamming          -- Hamming window
+    kaiser           -- Kaiser window
+    gaussian         -- Gaussian window
+    general_gaussian -- Generalized Gaussian window
+    slepian          -- Slepian window
+
  Wavelets:
 
-    daub -- return low-pass filter for daubechies wavelets
-    qmf  -- return quadrature mirror filter from low-pass
+    daub    -- return low-pass filter for daubechies wavelets
+    qmf     -- return quadrature mirror filter from low-pass
     cascade -- compute scaling function and wavelet from coefficients
 """
 

Modified: trunk/Lib/signal/signaltools.py
===================================================================
--- trunk/Lib/signal/signaltools.py	2006-10-05 04:08:32 UTC (rev 2241)
+++ trunk/Lib/signal/signaltools.py	2006-10-06 18:25:18 UTC (rev 2242)
@@ -89,6 +89,7 @@
 
 def fftconvolve(in1, in2, mode="full"):
     """Convolve two N-dimensional arrays using FFT. See convolve.
+    
     """
     s1 = array(in1.shape)
     s2 = array(in2.shape)
@@ -367,6 +368,7 @@
 
     out -- An array the same size as input containing the median filtered
            result.
+           
     """
     image = asarray(input)
     if kernel_size is None:
@@ -509,6 +511,7 @@
     The output vector zi contains
 
     zi = {z_0[-1], z_1[-1], ..., z_K-1[-1]}  where K=max(M,N).
+    
     """
     N = size(a)-1
     M = size(b)-1
@@ -536,6 +539,7 @@
 
 def deconvolve(signal, divisor):
     """Deconvolves divisor out of signal.
+    
     """
     num = atleast_1d(signal)
     den = atleast_1d(divisor)
@@ -554,11 +558,13 @@
 
 def boxcar(M,sym=1):
     """The M-point boxcar window.
+    
     """
     return ones(M, float)
 
 def triang(M,sym=1):
     """The M-point triangular window.
+    
     """
     if M < 1:
         return array([])
@@ -580,7 +586,8 @@
     return w
 
 def parzen(M,sym=1):
-    """The M-point Parzen window
+    """The M-point Parzen window.
+    
     """
     if M < 1:
         return array([])
@@ -600,7 +607,8 @@
     return w
 
 def bohman(M,sym=1):
-    """The M-point Bohman window
+    """The M-point Bohman window.
+    
     """
     if M < 1:
         return array([])
@@ -618,6 +626,7 @@
 
 def blackman(M,sym=1):
     """The M-point Blackman window.
+    
     """
     if M < 1:
         return array([])
@@ -634,6 +643,7 @@
 
 def nuttall(M,sym=1):
     """A minimum 4-term Blackman-Harris window according to Nuttall.
+    
     """
     if M < 1:
         return array([])
@@ -652,6 +662,7 @@
 
 def blackmanharris(M,sym=1):
     """The M-point minimum 4-term Blackman-Harris window.
+    
     """
     if M < 1:
         return array([])
@@ -670,6 +681,7 @@
 
 def flattop(M,sym=1):
     """The M-point Flat top window.
+    
     """
     if M < 1:
         return array([])
@@ -689,6 +701,7 @@
 
 def bartlett(M,sym=1):
     """The M-point Bartlett window.
+    
     """
     if M < 1:
         return array([])
@@ -705,6 +718,7 @@
 
 def hanning(M,sym=1):
     """The M-point Hanning window.
+    
     """
     if M < 1:
         return array([])
@@ -719,8 +733,11 @@
         w = w[:-1]
     return w
 
+hann = hanning
+
 def barthann(M,sym=1):
     """Return the M-point modified Bartlett-Hann window.
+    
     """
     if M < 1:
         return array([])
@@ -738,6 +755,7 @@
 
 def hamming(M,sym=1):
     """The M-point Hamming window.
+    
     """
     if M < 1:
         return array([])
@@ -755,7 +773,8 @@
     
 
 def kaiser(M,beta,sym=1):
-    """Returns a Kaiser window of length M with shape parameter beta.
+    """Return a Kaiser window of length M with shape parameter beta.
+    
     """
     if M < 1:
         return array([])
@@ -772,7 +791,8 @@
     return w
 
 def gaussian(M,std,sym=1):
-    """Returns a Gaussian window of length M with standard-deviation std.
+    """Return a Gaussian window of length M with standard-deviation std.
+    
     """
     if M < 1:
         return array([])
@@ -789,11 +809,12 @@
     return w
 
 def general_gaussian(M,p,sig,sym=1):
-    """Returns a window with a generalized Gaussian shape.
+    """Return a window with a generalized Gaussian shape.
 
     exp(-0.5*(x/sig)**(2*p))
 
     half power point is at (2*log(2)))**(1/(2*p))*sig
+    
     """
     if M < 1:
         return array([])
@@ -810,6 +831,9 @@
 
 
 def slepian(M,width,sym=1):
+    """Return the M-point slepian window.
+
+    """
     if (M*width > 27.38):
         raise ValueError, "Cannot reliably obtain slepian sequences for"\
               " M*width > 27.38."
@@ -1327,6 +1351,7 @@
 
     If bp is given, then it is a sequence of points at which to
        break a piecewise-linear fit to the data.
+       
     """
     if type not in ['linear','l','constant','c']:
         raise ValueError, "Trend type must be linear or constant"



More information about the Scipy-svn mailing list