File: signaltools.README

package info (click to toggle)
python-scipy 0.18.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 75,464 kB
  • ctags: 79,406
  • sloc: python: 143,495; cpp: 89,357; fortran: 81,650; ansic: 79,778; makefile: 364; sh: 265
file content (96 lines) | stat: -rw-r--r-- 3,854 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
## SIGTOOLS module 
##
#Copyright (c) 2002 Travis Oliphant all rights reserved
#Oliphant.Travis@altavista.net
#Permission to use, modify, and distribute this software is given under the 
#terms of the SciPy (BSD style) license.  See LICENSE.txt that came with
#this distribution for specifics.

I hope that this packages grows into a set of widely useful 1-D, 2-D,
3-D, etc. filtering routines in this collection.  To start it off I
have created C-code to do fast, general filtering of data.  Most
additional code to be added should probably be written in Python
unless a specific need for speed is needed.  If you have good routines
to add to this collection (in Python or in C) please send them to me.

So far this library has 4 C-code routines: 
   (1) a general purpose N-D correlation.  This is almost like N-D
         convolution but performs no 180 degree flipping of either
	 input to the routine.  It takes two N-D arrays and returns
	 the correlation of the two arrays.  It is intended for use in
	 filtering large arrays with small kernels for blurring,
	 edge-detection, etc.  Zero-padding is used to handle
	 edges. 

   (2) a general purpose N-D order-filter routine
         An order-filter takes a data array and a domain kernel with
         the same number of dimensions which has zero and non-zero
         entries.  Each output is the order_th element of a sorted
         list composed of the elements in the data array where the
         kernel window (centered on the output point) is non-zero.
         Zero-padding is used to handle the edges.  

   (3) a 1-D linear filter.
         linear_filter is a replacement for MATLAB's filter function.
         It takes two 1-D arrays representing the numerator and
         denominator of the z-transform of a rational linear
         system. It then performs the filtering along the given
         axis of an N-D array.  Access to initial conditions on the
         Direct Form II Transposed system are provided.

   (4) a remez exchange algorithm.
         remez is Python wrapping for code from Erik Kvaleberg (itself a 
         conversion to C of original code by Mcclellan) which
	 implements the Parks-McClellan alogrithm for FIR optimal
         filter design.

In Python several more routines are defined:

convolveND  (performs 180 degree flipping of all axes)
wiener      (implements a wiener filter in N-D)
medfilt     (implements an N-D median filter)


All of these methods operate on arbitrary Python sequence objects (even 
NumPy arrays of objects).  

Due to popular request I have also included the numpyio module as part of
this package.  It compiles along with the sigtools code.

----------------------------------------
INSTALLATION
----------------------------------------

To install, copy Makefile.pre.in from your python installation directory
(mine is /usr/lib/python1.5/config/Makefile.pre.in) to this directory.

Type 
make -f Makefile.pre.in boot
make

Copy the file to somewhere under $PYTHON/site-packages or somewhere
else on your path.

Please send me feedback, questions, and especially contributions.

CHANGELOG
============
Feb 5, 1999	First release just contains convolveND

Feb 8, 1999	Second release (0.20) added order_filterND

Feb 23, 1999    Third release (0.40) added linear_filter and remez 
		routines.

May  1, 1999    Release 0.5.1 introduces the signaltools.py module which
                has some filtering routines.  Fixed a small bug with complex
                filters that was preventing them from functioning.

July 10, 1999   Release 0.5.2 is incorporated now with multipack.  Changed
                the remez.c code to that from Erik Kvaleberg so that it 
                could be incorporated into and LGPL package.  Placed remez
                code directly in sigtoolsmodule.c
Travis Oliphant
oliphant.travis@ieee.org