; 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 dangle_jk_xL, H, d, xh, j, k, xL psihatL=dangle_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 dangle_jk_xL_test H = 32. d = 1. j=3 k=1 xh=0. psirefrL = refr_jk_xL(H, d, xh, 0, 0, xL) psirefrjkL = refr_jk_xL(H, d, xh, j, k, xL) psiphaseL = dangle_jk_xL(H, d, xh, 0, 0, xL) psiphasejkL = dangle_jk_xL(H, d, xh, j, k, xL) window, 0, xs=1000,ys=500 !p.multi=[0,2,0] plot, xL/H, psirefrjkL, xr=xh + [-5,5], /xs,/ys oplot, xL/H, psirefrL, li=2 plot, xL/H, psiphasejkL, xr=xh + [-5,5], /xs,/ys oplot, xL/H, psiphaseL, li=2 end pro dangle_jk_xL_test2, j, k H = 32. d = 1. xh=32000. ; xh=0 ; j=2 ; k=7 psirefrL = refr_jk_xL(H, d, xh, j,k, xL) zL = (xL-xH)/H c = 0.5 / max(psirefrL) * 2.^(-j) refrL = exp(-zL) * (1 + c * psirefrL) psiangleL = angle_jk_xL(H, d, xh, j,k, xL) angleL = H * exp(-zL) * (1 + c * psiangleL) yL = xL - angleL psidangleL = dangle_jk_xL(H, d, xh, j,k, xL) dangleL = exp(-zL) * (1 + c * psidangleL) fluxL = 1./abs((1. + dangleL)) window, 0, xs=1000,ys=500 !p.multi=[0,2,0] plot, zL, psirefrL plot, (yL-xh)/H, fluxL, xr=[-20,10], ps=3 end