|
| 1 | +WMTSA toolbox for MATLAB |
| 2 | +------------------------ |
| 3 | + |
| 4 | +Version: 0.2.6 |
| 5 | +Date: 2006-08-23 |
| 6 | + |
| 7 | +Overview |
| 8 | +-------- |
| 9 | + |
| 10 | +WMTSA toolbox is an implemenation for MATLAB of the wavelet methods for |
| 11 | +time series analysis techniques presented in: |
| 12 | + |
| 13 | +Percival, D. B. and A. T. Walden (2000) Wavelet Methods for |
| 14 | + Time Series Analysis. Cambridge: Cambridge University Press. |
| 15 | + |
| 16 | +henceforth referenced as WMTSA. |
| 17 | + |
| 18 | +The WMTSA toolbox follows the terminology, symbology, algoritms and |
| 19 | +presentation of WMTSA whenever possible. |
| 20 | + |
| 21 | +Currently only the MODWT and its inverse transform have been |
| 22 | +fully implemented in the WMTSA toolbox. The DWT has been implemented |
| 23 | +but lacks plotting and analysis functions. |
| 24 | + |
| 25 | +What's New |
| 26 | +---------- |
| 27 | + |
| 28 | +See ChangeLog for changes for the latest release. |
| 29 | + |
| 30 | + |
| 31 | +Installation |
| 32 | +------------ |
| 33 | + |
| 34 | +See INSTALL file for instructions on how to install. |
| 35 | + |
| 36 | +Platform Compability |
| 37 | +-------------------- |
| 38 | + |
| 39 | +The WMTSA package has been developed using MATLAB 7.x on Linux |
| 40 | +platform. It has been compiled and tested on the following platforms: |
| 41 | + |
| 42 | +OS MATLAB Version |
| 43 | +-- -------------- |
| 44 | +Linux (Redhat EL 3.0 WS) 7.2 (R2006a) |
| 45 | +Linux (Redhat EL 4.0 x86_64) 7.2 (R2006a) |
| 46 | +Windows 2000 7.2 (R2006a) |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +The distributed WMTSA package does not include compiled MEX function binaries |
| 51 | +for any platform. Binaries will be compiled during first launch of |
| 52 | +the wmtsa toolkit after installation. |
| 53 | + |
| 54 | +Required MATLAB toolboxes |
| 55 | +------------------------- |
| 56 | + |
| 57 | +Statistics toolbox is now option. If available, the chi2inv and |
| 58 | +norminv functions are used; otherwise, the wmtsa/stats toolbox |
| 59 | +funcitons QGauss and QChisq functions are used. |
| 60 | + |
| 61 | + |
| 62 | +Directory organization |
| 63 | +--------------------- |
| 64 | + |
| 65 | +WMTSA functions are organized in subdirectories under the |
| 66 | +toolbox/wmtsa root as follows: |
| 67 | + |
| 68 | +dwt -- Core wavelet analysis transform, ANOVA |
| 69 | + plotting, utiility and support functions. |
| 70 | +odwt -- Object-oriented version of toolkit (Experimental) |
| 71 | +plotutils -- Plotting utiltiy functions. |
| 72 | +utils -- Utility functions for application support. |
| 73 | +stats -- Statistical functions. |
| 74 | +signal -- Signal processing functions. |
| 75 | +data -- Example datasets. |
| 76 | +Examples -- Examples from WMTSA Book and other sources |
| 77 | + illustrating use of the toolbox. |
| 78 | +third-party -- Functions from third-party sources. |
| 79 | + |
| 80 | + |
| 81 | +Documentation |
| 82 | +------------- |
| 83 | + |
| 84 | +Each WMTSA function contains a standardized header which can be viewed |
| 85 | +by typing: help <function>. The standardized header describes |
| 86 | +usage/syntax, input and output arguments, detailed description, |
| 87 | +alorigthm description, and references. |
| 88 | + |
| 89 | +For the current release, documentation is partial and incomplete. |
| 90 | +Your comments/corrections/questions are welcome and will be used to |
| 91 | +enhance the WMTSA toolbox and documentation. |
| 92 | + |
| 93 | +Examples |
| 94 | +-------- |
| 95 | + |
| 96 | +A set of examples illustrating the use of the WMTSA toolbox are under |
| 97 | +toolbox/wmtsa/Examples directory. |
| 98 | + |
| 99 | +The Figures subdirectory contains MATLAB scripts that replicate |
| 100 | +figures contained in WMTSA. To display a figure, type: |
| 101 | + |
| 102 | + figureXXX |
| 103 | + |
| 104 | +where XXX is the figure number. |
| 105 | + |
| 106 | +Reviewing the MATLAB scripts in the Figures directory will demonstrate |
| 107 | +how to use the WMTSA functions in MATLAB. |
| 108 | + |
| 109 | +The data subdirectory contains data (.dat) files used by the figure |
| 110 | +scripts. These data files originally from the WMTSA web site have |
| 111 | +been formatted for loading into MATLAB. |
| 112 | + |
| 113 | +Testing |
| 114 | +------- |
| 115 | + |
| 116 | +Unit tests for testing proper functionality and verifying numerical |
| 117 | +accurarcy of the are included with toolkit and are found under the |
| 118 | +toolbox/wmtsa/Tests directory. There is a subdirectory for |
| 119 | +corresponding for each toolbox under toolbox/wmtsa. |
| 120 | + |
| 121 | +The unit tests utilize the MUnit toolbox for unit test, which is |
| 122 | +included with this distribution. |
| 123 | + |
| 124 | +To invoke unit tests: |
| 125 | + |
| 126 | +1. Add MUnit toolkit to your path: |
| 127 | + addpath <PATH_TO_MUNIT_DIRECOTORY/toolkit/munit/munit. |
| 128 | +2. Change to wmtsa/Tests/<XXX> directory (e.g. XXX = dwt) |
| 129 | +3. Run a test case: run_tcase(@YYY_tcase). |
| 130 | + For example: |
| 131 | + run_tcase(@modwt_functionality_tcase). |
| 132 | + |
| 133 | +Examining test cases illustrates the functionality of the wmtsa toolkit. |
| 134 | + |
| 135 | +License |
| 136 | +------- |
| 137 | + |
| 138 | +The WMTSA toolkit for MATLAB is released under a BSD-style license |
| 139 | +contained in LICENSE file. |
| 140 | + |
| 141 | + |
| 142 | +Key Functions in the WMTSA Toolbox |
| 143 | +--------------------------------- |
| 144 | + |
| 145 | +Key WMTSA functions are identified via the following function |
| 146 | +prefaces: |
| 147 | + |
| 148 | +modwt_ = modwt transform and analysis |
| 149 | +imodwt_ = imdowt transform and analysis |
| 150 | +plot_modwt_ = plot modwt transform and analysis results. |
| 151 | +plot_imodwt_ = plot imodwt transform and analysis results. |
| 152 | +plot_ = plot function common for plotting MODWT and DWT results. |
| 153 | + |
| 154 | +Listed below are names, usage and brief descriptions of key WMTSA |
| 155 | +functions for analysis and plotting. |
| 156 | + |
| 157 | +For Analysis: |
| 158 | +------------- |
| 159 | + |
| 160 | +% modwt -- Compute the (partial) maximal overlap discrete wavelet transform (MODWT) of a data series. |
| 161 | +% modwt_wvar -- Calculate wavelet variance from MODWT wavelet coefficients. |
| 162 | +% modwt_wcov -- Compute the wavelet covariance of two MODWT wavelet coefficient matrices. |
| 163 | +% modwt_wcor -- Compute the wavelet correlation of two MODWT wavelet coefficient matrices. |
| 164 | + |
| 165 | +% modwt_rot_cum_wsvar -- Calculate the rotated wavelet sample variance from MODWT wavelet coefficients. |
| 166 | +% modwt_cum_wav_svar -- Calculate cumulative sample variance of MODWT wavelet coefficients. |
| 167 | + |
| 168 | +% imodwt -- Calculate the inverse (partial) maximal overlap discrete wavelet transform (IMODWT). |
| 169 | + |
| 170 | +% imodwt_mra -- Calculate multi-resolution details and smooths via inverse maximal overlap discrete wavelet transform(IMODWT). |
| 171 | + |
| 172 | +% modwt_mra -- Calculate multi-resolution details and smooths of a time series via a single function call. |
| 173 | + |
| 174 | + |
| 175 | +For Plotting: |
| 176 | +------------- |
| 177 | + |
| 178 | +% plot_modwt_coef -- Plot the MODWT wavelet and scaling coefficients and (optionally) the original time series. |
| 179 | +% plot_wvar -- Plot the wavelet variance and (optionally) confidence intervals. |
| 180 | +% plot_wcor -- Plot the wavelet correlation and (optionally) confidence intervals. |
| 181 | +% plot_wcov -- Plot the wavelet covariance and (optionally) confidence intervals. |
| 182 | +% plot_modwt_rcwsvar -- Plot the rotated cumlative sample variance of the MODWT wavelet coefficients. |
| 183 | +% plot_modwt_clcwsvar -- Plot the cumlative level of cumulative sample variance of MODWT wavelet coefficients. |
| 184 | +% plot_imodwt_mra -- Plot the IMODWT multiresoution analysis (detail and smooth) values and original time seies. |
| 185 | + |
| 186 | + |
| 187 | +Workflow |
| 188 | +-------- |
| 189 | + |
| 190 | +For analysis of a single signal: |
| 191 | +------------------------------- |
| 192 | + |
| 193 | + X = vector series of observations |
| 194 | + |
| 195 | + | |
| 196 | + | |
| 197 | + V |
| 198 | + |
| 199 | + modwt |
| 200 | + |
| 201 | + | |
| 202 | + | |
| 203 | + V |
| 204 | + |
| 205 | +[WJt, VJ0t] ---> plot_modwt_coef |
| 206 | + |
| 207 | + | |
| 208 | + |-------------> modwt_wvar ---> plot_wvar |
| 209 | + | |
| 210 | + |-------------> modwt_cum_wav_svar ---> plot_modwt_cwsvar |
| 211 | + | |
| 212 | + |-------------> modwt_rot_cum_wav_svar.m ---> plot_modwt_rcwsvar |
| 213 | + | |
| 214 | + | |
| 215 | + V |
| 216 | + |
| 217 | +imodwt_mra |
| 218 | + |
| 219 | + | |
| 220 | + | |
| 221 | + V |
| 222 | + |
| 223 | +[DJt, SJ0t] ---> plot_imodwt_mra |
| 224 | + |
| 225 | + |
| 226 | +For analysis of a 2 signals: |
| 227 | +---------------------------- |
| 228 | + |
| 229 | + X Y |
| 230 | + |
| 231 | + | | |
| 232 | + | | |
| 233 | + V V |
| 234 | + |
| 235 | + modwt modwt |
| 236 | + |
| 237 | + | | |
| 238 | + | | |
| 239 | + V V |
| 240 | + |
| 241 | +[WJXt] [WJYt] |
| 242 | + |
| 243 | + \ / |
| 244 | + \ / |
| 245 | + \ / |
| 246 | + \ / |
| 247 | + \ / |
| 248 | + \ / |
| 249 | + V |
| 250 | + |
| 251 | + modwt_wcor ---> plot_wcor |
| 252 | + |
| 253 | + modwt_wcov ---> plot_wcov |
| 254 | + |
| 255 | + |
| 256 | +Unit Testing |
| 257 | +------------ |
| 258 | + |
| 259 | +We have developed a unit testing framework for MATLAB (munit) to unit test the toolkit. munit is similar to unit test frameworks developed for other languages (e.g. junit). A copy of munit is included with the WMTSA toolkit distribution. |
| 260 | + |
| 261 | +munit Unit test functions are located in the Test subdirectory. Under the Test directory is TestData subdirectory containing data for testing and verifying WMTSA toolkit functions. |
| 262 | + |
| 263 | +Note: Implementation of munit tests is still under development. Not all WMTSA toolkit functions have munit tests. |
0 commit comments