bigfract
index
/.automount/ioasun3/root/disk/users/kybic/work/python_volumes/bigfract.py

 This module contains a Python reimplementation of
Thierry Blu's Matlab code to calculate
fractional Wavelet transform
 
See http://bigwww.epfl.ch/
 
Jan Kybic, July 2001 (and indirectly, Thierry Blu, October 1999)
$Id: bigfract.html,v 1.1 2002/08/26 14:11:15 jkybic Exp $

 
Modules
                      
FFT
Image
MA
RandomArray
bigsplines
bigtools
copy
copy_reg
math
multiarray
pickle
string
types

 
Functions
                      
FFTwaveletanalysis(x, filters, J)
 computes the wavelet transform of a signal x using a Fourier
method.  It uses periodic boundary conditions.  The length of the
signal must be a power of two and the frequency responses of the
filters specified in 'filters'. 'filters' can be obtained from
getFFTfractsplinefilters(M,alpha,type)[0]
 
J is the depth of the decomposition
FFTwaveletsynthesis(w, filters, J)
 computes the inverse wavelet transform of coefficients w using a Fourier
method.  It uses periodic boundary conditions.  The length of the
signal must be a power of two and the frequency responses of the
filters specified in 'filters'. 'filters' can be obtained from
getFFTfractsplinefilters(M,alpha,type)[0]
 
J is the depth of the decomposition
alltrue = reduce(...)
array(...)
array(sequence, typecode=None, copy=1, savespace=0) will return a new array formed from the given (potentially nested) sequence with type given by typecode.  If no typecode is given, then the type will be determined as the minimum type required to hold the objects in sequence.  If copy is zero and sequence is already an array, a reference will be returned.  If savespace is nonzero, the new array will maintain its precision in operations.
choose(...)
choose(a, (b1,b2,...))
cross_correlate(...)
cross_correlate(a,v)
cumproduct = accumulate(...)
cumsum = accumulate(...)
fractsplineautocorr(alpha, nu)
 Frequency domain computation of fractional spline 
autocorrelation.
fromstring(...)
fromstring(string, count=None, typecode='l') returns a new 1d array initialized from the raw binary data in string.  If count is not equal to None, the new array will have count elements, otherwise it's size is determined by the size of string.
genfractrand(r, J)
 Generate random 1D signal corresponding to
Sobolev exponent r. J is the decomposition depth.
Returns a signal of length 2**J
genfractrand2D(r, J)
 Generate random 2D signal corresponding to
Sobolev exponent r. J is the decomposition depth.
Returns an image of size (2**J,2**J)
getFFTfractsplinefilters(M, alpha, type)
 Returns two pairs of filters:
(analysisfilters,synthesisfilters), each being pair containing
a (lowpass,highpass) filter
M is the signal length and should be a power of two
alpha is a spline degree and should be grater than -0.5
 
The only type implemented is currently '*ortho' (symmetric orthogonal)
mFFTwaveletanalysis(x, filters, J)
 Multidimensional extension of FFTwaveletanalysis
 
WARNING: x must by square, otherwise we have a problem
         to be corrected later
mFFTwaveletsynthesis(x, filters, J)
 Multidimensional extension of FFTwaveletsynthesis
 
WARNING: x must by square, otherwise we have a problem
         to be corrected later
product = reduce(...)
repeat(...)
repeat(a, n, axis=0)
reshape(...)
reshape(a, (d1, d2, ..., dn)).  Change the shape of a to be an n-dimensional array with dimensions given by d1...dn.  One dimension is allowed to be None.  This dimension will be set to whatever value will make the size of the new array equal the size of the old one.  Note: the size specified for the new array must be exactly equal to the size of the  old one or an error will occur.  This returns a completely new array with the data of the old one copied.  Use a.shape=(...) for no data copying.
searchsorted = binarysearch(...)
binarysearch(a,v)
sinc(x)
 Evaluates sin(x*pi)/(x*pi) for a vector x
sometrue = reduce(...)
sum = reduce(...)
take(...)
take(a, indices, axis=0).  Selects the elements in indices from array a along the given axis.
test_fract()
test_fractimg()
test_genfractrand(r1=0.59999999999999998, r2=1.6000000000000001)
 generate signals of two different smothnesses
zeros(...)
zeros((d1,...,dn),typecode,savespace) will return a new array of shape (d1,...,dn) and type typecode (default 'l') with all it's entries initialized to zero.  If savespace (default 0) is nonzero the array will be a spacesaver array.

 
Constants
                      ArrayType = <type 'array'>
Complex = 'D'
Complex0 = 'F'
Complex16 = 'F'
Complex32 = 'F'
Complex64 = 'D'
Complex8 = 'F'
Float = 'd'
Float0 = 'f'
Float16 = 'f'
Float32 = 'f'
Float64 = 'd'
Float8 = 'f'
Int = 'l'
Int0 = '1'
Int16 = 's'
Int32 = 'i'
Int8 = '1'
LittleEndian = 1
PrecisionError = 'PrecisionError'
PyObject = 'O'
UnsignedInt8 = 'b'
arraytype = <type 'array'>
datadir = 'data_felreg/'
e = 2.7182818284590451
pi = 3.1415926535897931