Home > src > main > matlab > s2let_curvelet_tiling.m

s2let_curvelet_tiling

PURPOSE ^

s2let_spin_curvelet_tiling - Tile scaling functions and curvelets in harmonic space.

SYNOPSIS ^

function [cur_lm scal_l] = s2let_spin_curvelet_tiling(B, L, J_min, varargin)

DESCRIPTION ^

 s2let_spin_curvelet_tiling - Tile scaling functions and curvelets in harmonic space.

 Default usage :

   [cur_lm scal_l] = s2let_spin_curvelet_tiling(B, L, J_min, <options>)

 cur_lm is an array containing the unrotated curvelets spherical harmonic coefficients.
 scal_l is an array containing the scaling function spherical harmonic coefficients (l only).
 B is the wavelet parameter,
 L is the harmonic band-limit;
 J_min the first wavelet to be used.
  
 % Valid options include:

  'Spin'        = { Spin; (default=0) }
  'SpinLowered' = { true  [Apply normalisation factors for spin-lowered
                           wavelets and scaling function.],
                    false [Apply the usual normalisation factors such
                           that the wavelets fulfil the admissibility
                           condition (default)]}
  'SpinLoweredFrom' = [integer; if the SpinLowered option is used, this
                       option indicates which spin number the wavelets
                       should be lowered from (default = 0)]

 -----------------------------------------------------------
 S2LET package to perform wavelets transform on the Sphere.
 Copyright (C) 2012-2016  Boris Leistedt, Jennifer Chan & Jason McEwen
 See LICENSE.txt for license details
 -----------------------------------------------------------

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function  [cur_lm scal_l] = s2let_spin_curvelet_tiling(B, L, J_min, varargin)
0002 % s2let_spin_curvelet_tiling - Tile scaling functions and curvelets in harmonic space.
0003 %
0004 % Default usage :
0005 %
0006 %   [cur_lm scal_l] = s2let_spin_curvelet_tiling(B, L, J_min, <options>)
0007 %
0008 % cur_lm is an array containing the unrotated curvelets spherical harmonic coefficients.
0009 % scal_l is an array containing the scaling function spherical harmonic coefficients (l only).
0010 % B is the wavelet parameter,
0011 % L is the harmonic band-limit;
0012 % J_min the first wavelet to be used.
0013 %
0014 % % Valid options include:
0015 %
0016 %  'Spin'        = { Spin; (default=0) }
0017 %  'SpinLowered' = { true  [Apply normalisation factors for spin-lowered
0018 %                           wavelets and scaling function.],
0019 %                    false [Apply the usual normalisation factors such
0020 %                           that the wavelets fulfil the admissibility
0021 %                           condition (default)]}
0022 %  'SpinLoweredFrom' = [integer; if the SpinLowered option is used, this
0023 %                       option indicates which spin number the wavelets
0024 %                       should be lowered from (default = 0)]
0025 %
0026 % -----------------------------------------------------------
0027 % S2LET package to perform wavelets transform on the Sphere.
0028 % Copyright (C) 2012-2016  Boris Leistedt, Jennifer Chan & Jason McEwen
0029 % See LICENSE.txt for license details
0030 % -----------------------------------------------------------
0031 
0032 p = inputParser;
0033 p.addRequired('B', @isnumeric);
0034 p.addRequired('L',  @isnumeric);
0035 p.addRequired('J_min', @isnumeric);
0036 p.addParamValue('Spin', 0, @isnumeric);
0037 p.addParamValue('SpinLowered', false, @islogical);
0038 p.addParamValue('SpinLoweredFrom', 0, @isnumeric);
0039 p.parse(B, L, J_min, varargin{:});
0040 args = p.Results;
0041 
0042 J = s2let_jmax(L, B);
0043 Spin = args.Spin; 
0044 if (args.SpinLowered ~= 0) 
0045     original_spin= args.SpinLoweredFrom;  % For spin-lowered curvelet: (i.e. use scalar curvelets for the transform : spin =0, SpinLoweredFrom = e.g. 2)
0046 else 
0047     original_spin = 0 ;  % (default - not to use spin-lowered wavelets).
0048 end 
0049 
0050 % ----------
0051 % Curvelet directional component s_lm
0052 % ----------
0053 signs = zeros(L,1); 
0054 s_lm = zeros(L^2,1); 
0055 % Perform precomputation.
0056 for (m=1:2:L-1) 
0057     signs(m)   = -1.0;
0058     signs(m+1) = 1.0;
0059 end 
0060 % Skip the s_00 component as it is zero
0061 for el = 1:L-1 
0062     % N.B. for curvelets, m = el;
0063     % N.B. the condition : m < L is satisfied;
0064     m = el; 
0065     % for positive m
0066     ind_pm = ssht_elm2ind(el, m);
0067     s_lm(ind_pm)= sqrt(1./2.);
0068     % for negative m
0069     ind_nm = ssht_elm2ind(el, -m);
0070     s_lm(ind_nm)= signs(m)*conj(s_lm(ind_pm));
0071 end
0072 
0073 
0074 % ----------
0075 % Curvelet angular components:
0076 % ----------
0077 [kappa kappa0] =  s2let_transform_axisym_tiling(B, L, J_min);
0078 el_min = max(abs(Spin), abs(original_spin));
0079 for j = J_min:J
0080  for el = el_min:L-1  
0081      m = el; 
0082      % positive m
0083      ind_pm = ssht_elm2ind(el, m); 
0084      cur_lm{j-J_min+1}(ind_pm) = s_lm(ind_pm) * sqrt((2*el+1)/(8.0*pi*pi))* kappa(j+1,el+1) ; 
0085      % negative m
0086      ind_nm = ssht_elm2ind(el, -m); 
0087      cur_lm{j-J_min+1}(ind_nm) =((-1)^m)* conj(cur_lm{j-J_min+1}(ind_pm)) ; 
0088      % if SpinLowered == true
0089      if (args.SpinLowered ~= 0)  
0090       s2let_spin_lowered_norm_factor = s2let_spin_lowered_normalization(el, 'original_spin',original_spin);
0091       cur_lm{j-J_min+1}(ind_pm) = cur_lm{j-J_min+1}(ind_pm)*s2let_spin_lowered_norm_factor ;
0092       cur_lm{j-J_min+1}(ind_nm) = cur_lm{j-J_min+1}(ind_nm)*s2let_spin_lowered_norm_factor ;
0093      end 
0094  end
0095 end
0096 
0097 % ----------
0098 % Scaling Function
0099 % ----------
0100 scal_l = zeros(L^2,1);
0101 for el = el_min:L-1 
0102     scal_l(el^2+el+1,1) = sqrt((2*el+1)/(4.0*pi)) *kappa0(el+1); 
0103     % if SpinLowered == true
0104     if (args.SpinLowered ~= 0)  
0105      s2let_spin_lowered_norm_factor = s2let_spin_lowered_normalization(el, 'original_spin',original_spin);
0106      scal_l(el^2+el+1,1) = scal_l(el^2+el+1,1) *s2let_spin_lowered_norm_factor ;
0107     end 
0108 end
0109 
0110 
0111 end

Generated on Fri 11-Nov-2016 11:50:36 by m2html © 2005