wp.table(x, cost.fun="entropy", wavelet="s8", n.levels=6, boundary=NULL, precondition=F, pdeg=0, pfrac=0, dual=F, analysis.filter=NULL, synthesis.filter=NULL, filter.reverse=F, scale=NULL, thresh=NULL, p=2, prob=.5) as.ptable(x)
as.ptable
only,
an object of
wp.table, wpt, wp.molecule
.
"entropy"
,
"threshold"
,
"sure"
, and "
lp
" are available.
See
pcosts
for details.
"d4", "s8"
.
See
wavelet
for a list of all available wavelet names.
For user-provided filter, input the values in
analysis.filter
and
synthesis.filter
below.
n.levels
is bigger than
ml
, where
ml
is the maximum possible level,
then
n.levels
is set to
ml
and a warning message is given.
The
max.level
function is used to compute
ml
.
"periodic"
,
"infinite"
,
"zero"
. See details below for a list of available
boundary rules.
boundary="interval"
only.
If
TRUE
, then a preconditioning transform will be applied
to the the data.
The preconditioning transformation preserves the vanishing
moments property when the DWT is applied to polynomial signals.
See Cohen, Daubechies, and Vial (1993) for details.
"infinite"
only:
degree of polynomial used for boundary extension.
boundary="infinite"
only:
fraction of data used to fit a polynomial of degree
pdeg
.
wavelet
for details.
filter
argument in
wave.filter
for
details.
filter
argument in
wave.filter
for
details. When
analysis.filter
is provided, then the default
synthesis.filter
is also
analysis.filter
.
dwt
for details.
cost.fun
.
See
pcosts
for details.
(0,2]
giving the degree of the
lpnorm when
cost.fun
is
"lp"
.
See
pcosts
for details.
cost.fun
is
"threshold"
or
"sure"
.
See
pcosts
for details.
(0,1)
used to
compute the threshold for when
cost.fun
is
"threshold"
.
See
pcosts
for details.
"wp.table"
inheriting from classes
"wp"
and
"crystal.vector"
.
or
"cp.table"
inheriting from classes
"cp"
and
"crystal.vector"
.
When
boundary="infinite"
, the table of class
"wp.table.list"
or
"cp.table.list"
is a list inheriting
from class
"crystal.list"
;
for other
boundary
rules, the table is a vector inheriting from class
"crystal.vector"
.
See
crystal.list.object
and
crystal.vector.object
for details.
Associated with a wavelet packet table is a table of wavelet
packet costs,
stored in the attribute
pcosts
.
Additional information about the transform is
stored in attribute
dictionary
.
as.ptable
returns
x
, if
x
is an object of class which inherits from
wp.table
,
wpt
, or
wp.molecule
.
Wavelet packet analysis starts with construction of
a wavelet packet table.
Like the DWT,
a wavelet packet table has coefficients at different
resolution levels and translations.
However, a wavelet packet table also has coefficients
corresponding to different oscillations.
At resolution level
j
,
the table has wavelet packet coefficients
with oscillation indices
b = 0, 1, ..., 2^j-1
.
By contrast, for each resolution level,
the DWT has coefficients at just one oscillation index
(or two at the coarsest level).
The wavelet packet table has
n.levels
resolution levels.
At resolution level
j
,
a table has
n
coefficients.
When you stack the
J+1
resolution levels on top of one another,
you get the
(J+1)*n
table of coefficients.
Each resolution level is
divided into
2^j
coefficient blocks corresponding
to oscillations
0, 1, ..., 2^j-1
.
The coefficient blocks are called crystals,
and have names of the form
wj.b
where
j
is
the resolution level and
b
is the oscillation number.
The
wp.table
function stores a wavelet packet table by level
in "sequency" order (increasing oscillation numbers):
see Wickerhauser (1994) for details.
You can select wavelet transforms from a wavelet packet table
using the
best.basis
,
best.level
,
as.dwt
functions
and the
Subscript
operators.
Refer to the section "Wavelet Packet Tables" in the
S+WAVELETS User's Manual
for more details about wavelet packet tables.
The default optional arguments for
wavelet, n.levels, boundary, precondition
,
pdeg, pfrac, dual
can be reset using function
wavelet.options
.
See
wavelet.options
for details.
Coifman, R., Meyer, Y., Quake, S. and Wickerhauser, M. V. (1990). Signal processing and compression with wavelet packets. Technical report, Yale University.
Wickerhauser, M. V. (1994). Adapted Wavelet Analysis from Theory to Software. A. K. Peters Ltd, Wellesley, MA.
xx <- make.signal("twochirp", n=1024) wp0 <- wp.table(xx, wavelet="s8", boundary="zero") plot(wp0) wpi <- wp.table(xx, wavelet="s8", boundary="periodic") plot(wpi)