Home > src > main > matlab > flaglet_axisym_synthesis.m

flaglet_axisym_synthesis

PURPOSE ^

flaglet_axisym_synthesis

SYNOPSIS ^

function f = flaglet_axisym_synthesis(f_wav, f_scal, varargin)

DESCRIPTION ^

 flaglet_axisym_synthesis 
 Compute axisymmetric wavelet transform, output in pixel space.

 Default usage :

   f = s2let_axisym_synthesis(f_wav, f_scal, <options>)

 f_wav contains the input wavelet contributions -- MW sampling,
 f_scal contains the input scaling contributions -- MW sampling,
 f is the output field -- MW sampling,
 B_l is the wavelet parameter for angular space,
 B_p is the wavelet parameter for radial space,
 L is the angular band-limit,
 P is the radial band-limit,
 J_min_l the first angular wavelet scale to use,
 J_min_p the first radial wavelet scale to use,
 R is the radial boundary-limit.

 Options :
  'B_l'               = { Dilation factor; B_l > 1 (default=2) }
  'B_p'               = { Dilation factor; B_p > 1 (default=2) }
  'L'               = { Angular harmonic band-limit; L > 1 (default=guessed) }
  'P'               = { Radial harmonic band-limit; P > 1 (default=guessed) }
  'J_min_l'           = { Minimum needlet scale to consider;
                        0 <= J_min_l < log_B_l(L) (default=0) }
  'J_min_p'           = { Minimum needlet scale to consider;
                        0 <= J_min_p < log_B_p(P) (default=0) }
  'R'               = { Radial boundary; R > 0 (default=1.0) }
  'Downsample'      = { true        [multiresolution algorithm (default)],
                        false       [full resolution wavelets] }
  'Reality'         = { false        [do not assume f real (default)],
                        true         [assume f real (improves performance)] }

 flaglet package to perform Wavelets transform on the Solid Sphere.
 Copyright (C) 2012  Boris Leistedt & Jason McEwen
 See LICEPSE.txt for license details

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function f = flaglet_axisym_synthesis(f_wav, f_scal, varargin)
0002 
0003 % flaglet_axisym_synthesis
0004 % Compute axisymmetric wavelet transform, output in pixel space.
0005 %
0006 % Default usage :
0007 %
0008 %   f = s2let_axisym_synthesis(f_wav, f_scal, <options>)
0009 %
0010 % f_wav contains the input wavelet contributions -- MW sampling,
0011 % f_scal contains the input scaling contributions -- MW sampling,
0012 % f is the output field -- MW sampling,
0013 % B_l is the wavelet parameter for angular space,
0014 % B_p is the wavelet parameter for radial space,
0015 % L is the angular band-limit,
0016 % P is the radial band-limit,
0017 % J_min_l the first angular wavelet scale to use,
0018 % J_min_p the first radial wavelet scale to use,
0019 % R is the radial boundary-limit.
0020 %
0021 % Options :
0022 %  'B_l'               = { Dilation factor; B_l > 1 (default=2) }
0023 %  'B_p'               = { Dilation factor; B_p > 1 (default=2) }
0024 %  'L'               = { Angular harmonic band-limit; L > 1 (default=guessed) }
0025 %  'P'               = { Radial harmonic band-limit; P > 1 (default=guessed) }
0026 %  'J_min_l'           = { Minimum needlet scale to consider;
0027 %                        0 <= J_min_l < log_B_l(L) (default=0) }
0028 %  'J_min_p'           = { Minimum needlet scale to consider;
0029 %                        0 <= J_min_p < log_B_p(P) (default=0) }
0030 %  'R'               = { Radial boundary; R > 0 (default=1.0) }
0031 %  'Downsample'      = { true        [multiresolution algorithm (default)],
0032 %                        false       [full resolution wavelets] }
0033 %  'Reality'         = { false        [do not assume f real (default)],
0034 %                        true         [assume f real (improves performance)] }
0035 %
0036 % flaglet package to perform Wavelets transform on the Solid Sphere.
0037 % Copyright (C) 2012  Boris Leistedt & Jason McEwen
0038 % See LICEPSE.txt for license details
0039 
0040 sz = size(f_scal);
0041 Pguessed = sz(1);
0042 Lguessed = sz(2);
0043 
0044 p = inputParser;
0045 p.addRequired('f_wav'); 
0046 p.addRequired('f_scal', @isnumeric); 
0047 p.addParamValue('B_l', 2, @isnumeric);       
0048 p.addParamValue('B_p', 2, @isnumeric);          
0049 p.addParamValue('L', Lguessed, @isnumeric);   
0050 p.addParamValue('P', Pguessed, @isnumeric);    
0051 p.addParamValue('J_min_l', 0, @isnumeric);   
0052 p.addParamValue('J_min_p', 0, @isnumeric); 
0053 p.addParamValue('R', 1.0, @isnumeric); 
0054 p.addParamValue('Downsample', true, @islogical);
0055 p.addParamValue('Reality', false, @islogical);
0056 p.parse(f_wav, f_scal, varargin{:});
0057 args = p.Results;
0058 
0059 P = args.P;
0060 L = args.L;
0061 J_min_l = args.J_min_l;
0062 J_min_p = args.J_min_p;
0063 f_scal_vec = zeros(P, L*(2*L-1));
0064 for p = 1:P
0065     temp(:,:) = f_scal(p,:,:);
0066     f_scal_vec(p,:) = flag_mw_arr2vec( temp );
0067 end
0068 
0069 J_l = ceil(log(L) ./ log(args.B_l));
0070 J_p = ceil(log(P) ./ log(args.B_p));
0071 f_wav_vec = [];
0072 
0073 offset = 0;
0074 for jp = J_min_p:J_p
0075     if args.Downsample == true
0076         band_limit_p = min([ ceil(args.B_p^(jp+1)) P ]);
0077      else
0078         band_limit_p = P;
0079     end
0080     for jl = J_min_l:J_l
0081         if args.Downsample == true
0082             band_limit_l = min([ ceil(args.B_l^(jl+1)) L ]);
0083         else
0084             band_limit_l = L;
0085         end
0086         for r = 0:band_limit_p-1
0087             for t = 0:band_limit_l-1
0088                 for p = 0:2*band_limit_l-2
0089                     temp = f_wav{jl+1-J_min_l, jp+1-J_min_p};
0090                     ind = offset + r * band_limit_l *( 2 * band_limit_l - 1 ) + t * ( 2 * band_limit_l - 1) + p + 1;
0091                     f_wav_vec = [ f_wav_vec temp(r+1,t+1,p+1) ];
0092                 end
0093             end
0094         end
0095         offset = offset + band_limit_l * (2*band_limit_l-1) * band_limit_p;
0096     end
0097 end
0098 
0099 f_vec = flaglet_axisym_synthesis_mex(f_wav_vec, f_scal_vec, args.B_l, args.B_p, args.L, args.P, args.J_min_l, args.J_min_p, args.R, args.Reality, args.Downsample);
0100  
0101 f = zeros(P, L, (2*L-1));
0102 for n = 1:P
0103     temp = f_vec(n,:);
0104     f(n,:,:) = flag_mw_vec2arr( temp );
0105 end
0106 
0107 end

Generated on Mon 24-Sep-2012 12:26:33 by m2html © 2005