Wavelets:library
Authors:
Shane J. Neph, Michael S. Kuehn, John Stamatoyonnapoulos
University of Washington
Genome Sciences
Wavelets Library and Application
o Read the license. If you agree to those conditions then download the source, build the application, and run it by typing in a terminal:
- tar -xzf wavelets.tgz (or tar -xf wavelets.tar)
- cd wavelets/src
- make
- ../bin/wavelets --help
o The wavelets application has no runtime dependencies. You may move it wherever you like.
o The library is written to be efficient in RAM and time with particular emphasis on RAM.
o The default application provided efficiently utilizes the library.
Main Design Goals
Library
- Make it fast and memory efficient, with particular emphasis on RAM requirements.
- Build as a generic library API that can work with any number of different data types, including user-defined. The application discussed here does NOT utilize the full features of the library API, and is only a single example of how an application may utilize the library.
- Make computing wavelet values independent of the level/scale requested in terms of RAM requirements.
Application: wavelets
- Wrap many features of the library and expose as a command-line tool
- Use the library in the most efficient ways possible, even if the application itself becomes slightly cumbersome (see Output)
Application Usage
'wavelets --help' shows a lot of useful information, including available filters, boundary conditions and more.
wavelets
[--boundary <string = periodic>]
[--filter <string = LA8>]
[--help]
[--level <integer = 4>]
[--operation <string = smooth>]
[--prefix <string = "">]
[--to-stdout]
[--version]
<file-name>
Where
++++++++++++
<file-name> is required and may be '-' to indicate reading from standard input
++++++++++++
--boundary
periodic [default]
reflected
++++++++++++
--filter
d4, d6, d8, d10, d12, d14, d16, d18, d20 (daubechies)
la8, la10, la12, la14, la16, la18, la20 (least asymmetric) [la8 by default]
bl14, bl18, bl20 (best localized)
c6, c12, c18, c24, c30 (coiflet)
haar
++++++++++++
--level
the number of levels the program will sweep through [4 by default]
++++++++++++
--operation
all
details
mra
scale (coefficients)
smooth [default]
wave (coefficients)
wave-scale (coefficients)
++++++++++++
--prefix
prefix for all output files generated (may include directory path if specified)
incompatible with --to-stdout
++++++++++++
--to-stdout
send calculations to standard output
only available when --operation set to smooth or scale
incompatible with --prefix
Application option names and string values are case insensitive.
Output
Files produced from the default application have names of the form:
details.i: i = 1..level
scaling-coefficients.level
smoothing.level
wavelet-coefficients.i: i = 1..level
Any '--prefix' specified by the end user precedes each name shown above.
Not all of these files are produced unless --operation is set to ALL
Open Issues, Notes and Related Items
o Only MODWT and related items are currently available from the library. The rest is left as an exercise for the reader.
o The capability to feed files to the program to calculate the original series was not exposed, but the library has this functionality.
o Files are sent to current working directory when neither --to-stdout nor --prefix option is specified.
o The default application uses the C++ vector class for runtime flexibility. The library also works with built-in arrays if needed.
o The default application uses the float data type. For more precision (likely doubles RAM requirements):
1) Open WaveletApp.cpp and go to line 291
2) Change 'typedef float T;' to 'typedef double T;'
3) Build the application again