pro WPLMLRES, wc,L,scal,qmf, st ;+ ; NAME: ; WPLMLRES ; ; PURPOSE: ; This procedure generates a Multi-Resolution Display of ; a 1-d Wavelet Transform. This multi-resolution depiction ; of the signal is the type referenced in S. Mallat's work. ; ; CATEGORY: ; Wavelets ; ; CALLING SEQUENCE: ; WPLMLRES,wc,L,scal,qmf, st ; ; INPUTS: ; wc: 1-d wavelet transform ; L: level of coarsest scale ; scal: scale factor [0 ==> autoscal] ; qmf: quadrature mirror filter used to make wc ; st: title of signal/dataset ; ; OUTPUTS: ; a Multi-Resolution Display of 1-d Wavelet Transform ; ; SEE ALSO: ; wplwcoef, wfwtpo, wiwtpo, wmkofilt ; ; MODIFICATION HISTORY: ; Written by: Amara Graps November, 1994 ;Translated from MatLab Wavelab routine: plotmultires.m ;- ;Color of text strings IF !p.background EQ 0 THEN cl = 255 ELSE cl = 0 ;Test this routine against WaveLab ALOT.. wavecoef = WSHASROW(wc) ;Handle autoscaling if ( scal eq 0) then begin scal = 1. / MAX(ABS(wavecoef)) !c = 0 end n = WDYADLNG(wavecoef,J) WLCKAXES, [ 0, 1, -(J+1), (-L+1)] ;use the IDL way to create an index array a = .5 & b = 1 & c = (n-.5) t = (WMKFARRY( a, b, c) )/n ;Set titles xlabel='t' ylabel='Dyad' title='Multi-Resolution Decomposition of '+ st FOR jj=(J-1), L, -1 do begin w = FLTARR(n) w(WDYAD(jj)-1) = wavecoef(WDYAD(jj)-1) x = WIWTPO(w,jj,qmf) CASE jj OF (J-1): PLOT,t, (-(jj)-1 + scal*x), $ XTITLE = xlabel, YTITLE = ylabel, TITLE = title, color = cl ELSE: OPLOT,t, (-(jj)-1 + scal*x), color = cl ENDCASE ;jj END ;FOR ; w = fltarr(n) w(0: 2^(L)-1) = wavecoef(0: 2^(L)-1) x = WIWTPO(w,L,qmf) OPLOT,t,(-(L) + scal*x), color = cl ; WULKAXES ; ; Algorithm Source: WaveLab Version 0.600 ; WaveLab WWW site: http://playfair.stanford.edu/ ; WaveLab Questions? e-mail wavelab@playfair.stanford.edu ; END ;***************************************************