pro WINTWAVE, X_work, WType, Par, QMF, LD ;+ ; NAME: ; WINTWAVE ; ; PURPOSE: ; This procedure generates a scalegram and plots it. ; ; CATEGORY: ; Wavelets. ; ; CALLING SEQUENCE: ; WINTWAVE, x_work, WType, Par, QMF, LD ; ; INPUTS: ; X_work: 1-d signal array ; WType: Wavelet Type (string) ; 'Haar', 'Daubechies', 'Coiflet', 'Symmlet' ; Par: Wavelet parameter depends on WType. ; Options are: ; 'Haar'-->Par = 2 ; 'Daubechies' -->Par = 4, 6 ; 'Coiflet' -->Par = 2, 3 ; 'Symmlet' -->par = 6, 8 ; ; OUTPUTS: ; X_Work: truncated at 2^n length ; QMF: Quadrature Mirror Filter ; LD: Lowest resolution level ; ; SEE ALSO: ; wdosceg and many of the other ``do_" procedures ; (They use the output from this procedure.) ; ; MODIFICATION HISTORY: ; Written by: Amara Graps August/September, 1995 ;- TT = WSIGTYPE(x_work, len, error) CASE error OF 1: BEGIN ;Valid array or matrix CASE TT OF 'I': BEGIN ;Make sure x_work array is 2^n by 2^n long n_work = 2^(FIX(ALOG(len)/ALOG(2))) x_work=x_work(0:n_work-1, 0:n_work-1) END ;image 'S': BEGIN ;Make sure x_work array is 2^n long n_work = 2^(FIX(ALOG(N_ELEMENTS(x_work))/ALOG(2))) x_work=x_work(0:n_work-1) END ;signal/data array ENDCASE ;TT ;Generate a Quadrature Mirror Filter QMF = WMKOFILT(WType,Par) ;Find lowest resolution level CASE WType OF 'Haar': LD = 2 'Daubechies': LD = 2 'Coiflet': LD = 4 'Symmlet': LD = 4 ENDCASE END ;valid array or matrix ELSE: PRINT, 'Not valid data/signal array or matrix!' ENDCASE ;error ; Algorithm Source: WaveLab Version 0.600 ; WaveLab WWW site: http://playfair.stanford.edu/ ; WaveLab Questions? e-mail wavelab@playfair.stanford.edu END ;of procedure wintwave ;******************************************************************************