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