; Given a number of points and a spacing, return an ; array of the wavelet fourier series and the ; array of frequencies (2 pi/wavelength) for the ; j, k wavelet as defined by Sato. function refr_jk_xL, H, d, xh, j, k, xL psihatL=refr_jk_wL(H, d, xh, j, k, wL) n = n_elements(wL) dn = d * n xL=[findgen(n/2)-n/2,findgen(n/2)] * d + (xh-H) psiL=shift(float(fft( shift(psihatL,n/2)/dn, /inverse)),n/2) return, psiL end pro refr_jk_xL_test H = 32. d = 1. j=1 k=1 xh=0. psihatL = refr_jk_wL(H, d, xh, 0, 0, wL) psijkhatL = refr_jk_wL(H, d, xh, j, k, wL) psiL = refr_jk_xL(H, d, xh, 0, 0, xL) psijkL = refr_jk_xL(H, d, xh, j, k, xL) window, 0, xs=1000,ys=500 !p.multi=[0,2,0] plot, xL, psiL, xr=xh + [-19*H,13*H], /xs,/ys oplot, xL, psijkL, li=2 plot, wL, abs(psihatL), xr=[-20,20]/(4.*H) oplot, wL, abs(psijkhatL), /li, ps=-4 end pro refr_jk_xL_test2 H = 32. d = 1. k=0 xh=0. for j=0, 4 do begin psijkL = refr_jk_xL(H, d, xh, j, k, xL) print, j, max(psijkL) * 2.^(-j/2.) end end