; 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 angle_jk_xL, H, d, xh, j, k, xL psihatL=angle_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 angle_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 = angle_jk_xL(H, d, xh, 0, 0, xL) psiphasejkL = angle_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