Next: Two-dimensional Up: One-dimensional Previous: Cost functions

#### Tools for visualization

The heart of the wavelet packet programs is showwp, which allows all of the above operations (selecting bases, setting cost functions, etc.) and many others to be performed interactively. An example (from the demo wpsig) is shown in figure 7, where a sinusoid with noise is analyzed. The top part is a tree as in figure 5, the blocks with red boundaries are those selected in the basis. The lower half of the figure is a phaseplane plot (frequency against time with amplitude shown in different shades of gray) generated by phasepln. Note how the wavelet packets recognize the frequency of the sinusoid by concentrating most of the wavelet packet coefficients to the two black horizontal bands.

```        SHOWWP -- shows wavelet packet coefficients and many other things

showwp(w, h, g)
showwp(w, f, h, g)

Displays the tree of the wavelet packet coefficients in w. f is
the original vector (possibly an empty vector). If any selections
are made, the selected packets are made to stand out. Both f and
selection are optional.

The display is divided into two parts: in the top part is the tree
of the wavelet packet coefficients, the bottom part is used for
graphing other things.

The original vector is the very first row of the tree. Here white
means large values, black small (possibly) negative values.

The wavelet packet coefficients form the rest of tree. The left
branches are the result of convolution-decimation with the low
pass filter (scaling function), right branches with the high pass
filter (wavelet). Here only the absolute values of the
coefficients are drawn: white means large absolute value, black
means zero.

Clicking in a box on the first row shows the original vector,
clicking in any other box shows the graph of the wavelet packet
corresponding to that box.

Packet          toggle the selected/unselected state of a
single packet
Group           toggle the selected/unselected state of a box
Fixed level     click anywhere in the tree to select a level
Wavelet basis   selects the wavelet basis
Best level      selects the level with lowest cost
Best basis      selects the basis with lowest cost
Clear           clears all selections

Inverse transform    computes the inverse transform using
current selection
Phaseplane plot      displays the phaseplane plot for the
currently selected basis
Nonincreasing rearrengement
displays the nonincreasing rearrengement
of the wavelet packet coefficients
Compute cost         displays the cost of various things

Discards all coefficients whose absolute value is less than the
selected percentage of the L2-norm of the whole collection of
wavelet packet coefficients.

Set cost function      allows to select the cost function
Show cost function     shows which cost function is being used
Natural order          switches the display to natural order
Sequency order         switches the display to sequency order
--> Color              switches the display to color
--> B/W                switches the display to black and white