
The file type buttons can be set to read either normal data (i.e. 1-d data values) or sorted/truncated wavelet coefficients (see section 4.1.7 on reading compressed data files). The data type buttons can be set to read either text data (normal ASCII text delimited by tabs, commas, spaces, or returns) or binary data.
Text files must be of type 'TEXT', while binary files must be of type 'WBIN'. Binary files can be created with Fortran, C, or other programs. The format for binary files is as follows:
Number of points in data: 4-byte integer value
Each data point: 4-byte real value
Binary files are much smaller than text, and read and write much faster.After you have selected the file type and data type, click on OK. You will then be presented with a standard file dialog from which you can select the file to read. The data from this file will be displayed in the current window.
To perform a wavelet transform, first read (or create) data into a Wavelet window. Then, select the Perform DWT item from the Wavelets menu. This item will display a submenu of wavelet filter choices:

Select one of the submenu choices (e.g. Daubechies 4) to perform a wavelet transform using that set of filter coefficients.
In order to perform a transform, the length of your input data must be a power of 2. If your data is not a power of 2 in length, it will either be truncated to the next lowest power of 2 length, or padded to the next highest power of 2 length, depending on the Settings... item dialog in the Edit menu.
Once you have selected a filter type, the transform will be performed, and the result displayed in the current window, or in a new window, depending on the Settings... item dialog in the Edit menu. The discrete wavelet transform is a multi-step process. The total number of levels of analysis performed during this transform is also determined by the Settings... dialog.
Here is an example of the result of a wavelet transform:

Each resulting wavelet coefficient is displayed as one element of a 1-d array.
To create an SDP, first select a window containg a set of wavelet coefficients. Then, choose Create SDP from the Windows menu. Each row of the SDP corresponds to a different scale (spacial resolution) of features in the input dataset. The lowest 2 rows show the coarsest features, while the highest row shows the finest features. The numbers along the left side of the plot show the index of the first coefficient in each row. The value of each rectangle in the image is the absolute value of each coefficient, according to the color scale at right.
The name of the window, and the scale of the plot, can be set from the window's configuration dialog (available by double-clicking in the window or by choosing Configure Window... from the Edit menu) in the same way as for the 1-d Wavelet window.
Here is an example of an SDP and its input dataset. Note that to create an SDP you must first perform a wavelet transform, select the window containing the transform result, and then choose Create SDP from the Windows menu:

To create a Scalegram, first perform a wavelet transform and select the window contaning the resulting wavelet coefficients. Then, choose Create Scalegram from the Windows menu. The Scalegram will be created in a new Wavelet window.
Here is an example of an input array and its Scalegram:

Once you have chosen a filter to use, you will see the following dialog:

Type in the number of points you would like in the resulting curve, and the order of the wavelet you wish to generate (from 1 to the number of points). The default for this order is the number of coefficients in the corresponding filter (e.g. 4 for the Daubechies 4 filter). The wavelet shape will be generated by creating a vector which is equal to 1 at the element number of the order you entered, and which is zero everywhere else, and then performing an inverse wavelet transform on this vector. Click on OK to generate the wavelet shape.
Here is an example of the wavelet shape for the Daubechies 4 filter, with an order of 4:


Select the Text button to write an ASCII file (comma and return delimited), or select the Binary button to write a binary file. The format of a binary file is as follows:
Number of points in data: 4-byte integer value
Each data point: 4-byte real value
Click on OK. You will then see a standard Macintosh file dialog from which you
can name your data file. Text files are written as type 'TEXT', and binary files
are written as type 'WBIN'. Binary files can be read by the MacWavelets program,
or from Fortran, C, or other programs.
Contents | Previous Section | Next Section
MacWavelets 2.00 User's Manual.
"MacWavelets" is a trademark of Intergalactic Reality.
© Copyright Intergalactic Reality, 1996.
All rights reserved.
Photoshop is a trademark of Adobe, Inc.