30 Chapter 2: Using the <strong>IDL</strong> <strong>Wavelet</strong> <strong>Toolkit</strong>Vanishing MomentsAn important property of a wavelet function is the number of vanishing moments,which describes the effect of the wavelet on various signals. A wavelet such as theDaubechies 2 with vanishing moment=2 has zero mean and zero linear trend. Whenthe Daubechies 2 wavelet is used to transform a data series, both the mean and anylinear trend are filtered out of the series. A higher vanishing moment implies thatmore moments (quadratic, cubic, etc.) will be removed from the signal.RegularityThe regularity gives an approximate measure of the number of continuous derivativesthat the wavelet function possesses. The regularity therefore gives a measure of thesmoothness of the wavelet function with higher regularity implying a smootherwavelet.e-Folding Time (Continuous <strong>Wavelet</strong>s Only)The e-folding time is a measure of the wavelet width, relative to the wavelet scale s.Using the wavelet transform of a spike, the e-folding time is defined as the distance atwhich the wavelet power falls to 1/e^2, where e = 2.71828. Larger e-folding timeimplies more spreading of the wavelet power.User-Defined <strong>Wavelet</strong>sYou can easily extend the <strong>IDL</strong> <strong>Wavelet</strong> <strong>Toolkit</strong> by adding more wavelet functions.These wavelet functions should follow the same calling mechanism as the built-inwavelet functions such as “WV_FN_DAUBECHIES” on page 80. In addition, yourwavelet function should begin with the prefix 'wv_fn_'.1. Let’s say you would like to add a wavelet function called “Spline” giving theDaubechies “Spline” wavelets. To do this, first create a wavelet function toreturn the wavelet coefficients and the information structure:FUNCTION wv_fn_spline, Order, Scaling, <strong>Wavelet</strong>, Ioff, Joff; compute coefficients here......; find support, moments, and regularity...info = {family:'Spline', $order_name:'Order', $order_range:[1,5,1], $order:order, $discrete:1, $orthogonal:1, $<strong>Wavelet</strong> Viewer<strong>IDL</strong> <strong>Wavelet</strong> <strong>Toolkit</strong>
Chapter 2: Using the <strong>IDL</strong> <strong>Wavelet</strong> <strong>Toolkit</strong> 31symmetric:0, $support:support, $moments:moments, $regularity:regularity}RETURN, infoEND2. Save this function in a file 'wv_fn_spline.pro' that is accessible from yourcurrent <strong>IDL</strong> path.3. Now start the <strong>Wavelet</strong> <strong>Toolkit</strong> with your new wavelet function:WV_APPLET, WAVELETS='Spline'Or, if you are already running the <strong>Wavelet</strong> <strong>Toolkit</strong>:WV_IMPORT_WAVELET, 'Spline'Your new wavelet function should appear in the list of current wavelet functions, andshould be accessible from any of the wavelet tools.<strong>IDL</strong> <strong>Wavelet</strong> <strong>Toolkit</strong><strong>Wavelet</strong> Viewer