s2let_compute_wav - Compute a rotated wavelet Compute the j-th wavelet, rotated by rho=(alpha, beta, gamma) in harmonic space and reconstruct it on the sphere. Default usage : psi_j = s2let_compute_wav(j, alpha, beta, gamma, L, <options>) j is the order of the wavelet under consideration (depends on B) rho=(alpha, beta, gamma) is the rotation in SO(3) by which to rotate the wavelet wavelet L if harmonic band-limit for the reconstruction on the sphere psi_j is the reconstructed wavelet on the sphere, at resolution L Options consist of parameter type and value pairs. Valid options include: 'B' = { Dilation factor; B > 1 (default = 2) } 'N' = { Azimuthal band-limit; N > 0 (default = L) } 'Spin' = { Spin number; Spin >= 0 (default = 0) } S2LET package to perform Wavelet transform on the Sphere. Copyright (C) 2012-2015-2014 Boris Leistedt, Martin Büttner & Jason McEwen See LICENSE.txt for license details
0001 function psi_j = s2let_compute_wav(j, alpha, beta, gamma, L, varargin) 0002 % s2let_compute_wav - Compute a rotated wavelet 0003 % 0004 % Compute the j-th wavelet, rotated by rho=(alpha, beta, gamma) in 0005 % harmonic space and reconstruct it on the sphere. 0006 % 0007 % Default usage : 0008 % 0009 % psi_j = s2let_compute_wav(j, alpha, beta, gamma, L, <options>) 0010 % 0011 % j is the order of the wavelet under consideration (depends on B) 0012 % rho=(alpha, beta, gamma) is the rotation in SO(3) by which to rotate 0013 % the wavelet wavelet 0014 % L if harmonic band-limit for the reconstruction on the sphere 0015 % psi_j is the reconstructed wavelet on the sphere, at resolution L 0016 % 0017 % Options consist of parameter type and value pairs. 0018 % Valid options include: 0019 % 0020 % 'B' = { Dilation factor; B > 1 (default = 2) } 0021 % 'N' = { Azimuthal band-limit; N > 0 (default = L) } 0022 % 'Spin' = { Spin number; Spin >= 0 (default = 0) } 0023 % 0024 % S2LET package to perform Wavelet transform on the Sphere. 0025 % Copyright (C) 2012-2015-2014 Boris Leistedt, Martin Büttner & Jason McEwen 0026 % See LICENSE.txt for license details 0027 0028 % Parse arguments. 0029 p = inputParser; 0030 p.addRequired('j', @isnumeric); 0031 p.addRequired('alpha', @isnumeric); 0032 p.addRequired('beta', @isnumeric); 0033 p.addRequired('gamma', @isnumeric); 0034 p.addRequired('L', @isnumeric); 0035 p.addParamValue('B', 2, @isnumeric); 0036 p.addParamValue('N', -1, @isnumeric); 0037 p.addParamValue('Spin', 0, @isnumeric); 0038 0039 p.parse(j, alpha, beta, gamma, L, varargin{:}); 0040 0041 args = p.Results; 0042 0043 if args.N == -1 0044 args.N = L; 0045 end 0046 0047 B = args.B; 0048 N = args.N; 0049 Spin = args.Spin; 0050 0051 psi = s2let_wavelet_tiling(B, L, N, Spin, j); 0052 0053 % Precompute Wigner small-d functions 0054 d = zeros(L, 2*L-1, 2*L-1); 0055 d(1,:,:) = ssht_dl(squeeze(d(1,:,:)), L, 0, beta); 0056 for el = 1:L-1 0057 d(el+1,:,:) = ssht_dl(squeeze(d(el,:,:)), L, el, beta); 0058 end 0059 0060 % Rotate spherical harmonic 0061 psi_lm_rot = ssht_rotate_flm(psi(:,j+1), d, alpha, gamma); 0062 0063 psi_j = ssht_inverse(complex(real(psi_lm_rot), imag(psi_lm_rot)), L, 'Spin', Spin); 0064 0065 end