The C structure is the following:
char cmt[mw_cmtsize]; /* Comments */ char name[mw_namesize]; /* Name of the wtrans1d */ int type; /* Type of the wtrans1d performed */ int edges; /* Type of the edges statments */ char filter_name[mw_namesize][mw_max_nfilter_1d]; /* Filters used */ int size; /* Size of the original signal */ int nlevel; /* Number of levels (octave) for this decomposition */ int nvoice; /* Number of voices per octave for this decomposition */ int complex; /* 1 if the wavelet is complex that is, if P is used */ int nfilter; /* Number of filters used to compute the decomposition */ Fsignal A[mw_max_nlevel+1][mw_max_nvoice]; /* Average or low-pass signals */ Fsignal AP[mw_max_nlevel+1][mw_max_nvoice];/* Phase of the average */ Fsignal D[mw_max_nlevel+1][mw_max_nvoice]; /* Detail or wavelet coefficients*/ Fsignal DP[mw_max_nlevel+1][mw_max_nvoice];/* Phase of the Detail */ } *Wtrans1d;
The first two fields of this structure is well known by the reader.
type records the type of the wavelet transform used.
Its value can be:
mw_orthogonal: orthogonal wavelet transform;
mw_biorthogonal: biorthogonal wavelet transform;
mw_dyadic: dyadic wavelet transform;
mw_continuous: continuous wavelet transform.
edges gives the type of the edges statment used to compute
the transformation. Indeed, since it is implemented as a bank of convolution
products, errors occur near the borders if no special statment is performed.
This field can have the following values:
mw_edges_zeropad: the signal is zero-padded (no special statment);
mw_edges_periodic: the signal is made periodic;
mw_edges_mirror: the signal is padded by mirror effect (avoid first-order discontinuities);
mw_edges_wadapted: special border functions are added to the wavelets (wavelets on the interval).
filter_name is an array of strings, where the names of the filters used for the decomposition are put.
The number of filters is put into the field
This number and the meaning of each filter depend to the wavelet type.
size contains the size of the original signal, which is put
average (see below).
nlevel is the number of levels used in this decomposition; it corresponds to the number of octaves;
nvoice is the number of voices per octave.
complex is set to 1 when the wavelet used has complex values, 0 elsewhere.
The result of the wavelet decomposition is put into two two-dimensional arrays of signals called
l = 0...nlevel and for
v = 0...nvoice - 1 is the low-pass signal at the octave l and at the voice v, that is the signal at the scale
A is the original signal,
A is the
smoothed signal at the scale
l = 0...nlevel and for
v = 0...nvoice - 1 is the band-pass (or detail) signal at the octave l and at the voice v, that is the wavelet coefficients signal at the scale
D is unused.
When the wavelet is complex, the fields
D represent the
modulus values only; the phase values is put in the fields