pro WPLMSURF, wc,L,scal,qmf, st ;+ ; NAME: ; WPLMSURF ; ; PURPOSE: ; This procedure generates a Multi-Resolution Surface Display of ; a 1-d Wavelet Transform. ; ; CATEGORY: ; Wavelets ; ; CALLING SEQUENCE: ; WPLMSURF,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 Surface Display of 1-d Wavelet Transform ; ; SEE ALSO: ; wplmlres, wfwtpo, wiwtpo, wmkofilt ; ; MODIFICATION HISTORY: ; Amara Graps for Wavelet Workbench, September 1996. ;- ;Color of text strings IF !p.background EQ 0 THEN cl = 255 ELSE cl = 0 wavecoef = WSHASROW(wc) n = WDYADLNG(wavecoef,J) ;Handle autoscaling wavecoef = WSHASROW(wc) scal = 0 IF ( scal EQ 0) THEN BEGIN scal = 1. / MAX(ABS(wavecoef(2^L : n-1))) !C = 0 END nlevels = (J-1)-L + 1 ;number of resolution levels ll = 2^(J-1) ;length on a side ilev = REVERSE(INDGEN(nlevels)+L) ;integer array of levels slev=STRTRIM(STRING(ilev),2) ;string array of resolution levels for ticks sgmat = FLTARR(nlevels, ll) FOR i = L, (J-1) DO BEGIN wt = wc( WDYAD(i)-1 ) ;interpolate to length "ll" temp = INTERPOL(wt,ll) sgmat(J-i-1,*) = temp END ;sgmat = sgmat * scal ;This scale normalizes to [-1,+1] do we need it? ;use CONGRID to create square size for easier surface viewing sgmat = CONGRID(sgmat, 90,90) ;This will create a "blocky" surface ;SURFACE, sgmat, ztitle = 'Coefficient Value', xtitle='Scale', ytitle= 'Location',$ ;xtickname = slev, xticks = nlevels-1, title='Scalogram of '+st,charsize=2,$ ;skirt = 0, shades=bytscl(sgmat), ax=45, az = 20, xstyle = 1, ystyle = 1, zstyle = 1 ;"Smoother" output than using SURFACE SHADE_SURF, sgmat, ztitle = 'Coefficient Value', xtitle='Scale', ytitle= 'Location',$ charsize = 2, xtickname = slev, xticks = nlevels-1, title='Scalogram of '+st,$ xstyle = 1, ystyle = 1, zstyle = 1, ax=45, az = 20, color = cl END ;of WPLMSURF ;***************************************************