Home > src > main > matlab > s2let_radon_inverse.m

s2let_radon_inverse

PURPOSE ^

s2let_radon_inverse

SYNOPSIS ^

function [f_lm] = s2let_radon_inverse(f_radon_lm, varargin)

DESCRIPTION ^

 s2let_radon_inverse
 Compute inverse radon transform in harmonic space.

 Default usage:

   f_lm = s2let_radon_analysis(f_radon_lm, <options>)

 where f_lm is the vector of L^2 harmonic coefficients and f_random_lm
 is the vector of harmonic coefficients of the spherical radon transform
 of f.

 Note that the inverse random transform recovers the antipodal part
 of the original signal f only.

 Option :
  'Reality'         = { false        [do not assume f real (default)],
                        true         [assume f real (improves performance)] }
  'Spin'            = { Spin; (default=0) }
  'L'               = { Harmonic band-limit; L > 1 (default=guessed from input) }

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [f_lm] = s2let_radon_inverse(f_radon_lm, varargin)
0002 
0003 % s2let_radon_inverse
0004 % Compute inverse radon transform in harmonic space.
0005 %
0006 % Default usage:
0007 %
0008 %   f_lm = s2let_radon_analysis(f_radon_lm, <options>)
0009 %
0010 % where f_lm is the vector of L^2 harmonic coefficients and f_random_lm
0011 % is the vector of harmonic coefficients of the spherical radon transform
0012 % of f.
0013 %
0014 % Note that the inverse random transform recovers the antipodal part
0015 % of the original signal f only.
0016 %
0017 % Option :
0018 %  'Reality'         = { false        [do not assume f real (default)],
0019 %                        true         [assume f real (improves performance)] }
0020 %  'Spin'            = { Spin; (default=0) }
0021 %  'L'               = { Harmonic band-limit; L > 1 (default=guessed from input) }
0022 
0023 % S2LET package to perform Wavelets transform on the Sphere.
0024 % Copyright (C) 2015  Boris Leistedt & Jason McEwen
0025 % See LICENSE.txt for license details
0026 
0027 L_guess = sqrt(length(f_radon_lm));
0028 
0029 p = inputParser;
0030 p.addRequired('f_lm', @isnumeric);
0031 p.addParamValue('L', L_guess, @isnumeric);
0032 p.addParamValue('Reality', false, @islogical);
0033 p.addParamValue('Spin', 0, @isnumeric);
0034 p.parse(f_radon_lm, varargin{:});
0035 args = p.Results;
0036 
0037 s = args.Spin; 
0038 
0039 ring_lm = zeros(args.L^2,1);
0040 f_lm = zeros(args.L^2,1);
0041 for el = max([0 abs(args.Spin)]):args.L-1
0042           
0043    logp2 = gammaln(el+s+1) - el * log(2) - gammaln((el+s)./2+1) - gammaln((el-s)./2+1);
0044    p0 = real((-1).^((el+s)./2)) .* exp(logp2);    
0045    ind = ssht_elm2ind(el, 0);
0046    ring_lm(ind) = 2*pi * sqrt((2*el+1)/(4*pi)) * p0;
0047    ring_lm(ind) = ring_lm(ind) .* ...
0048       (-1).^s .* sqrt(exp(gammaln(el-s+1) - gammaln(el+s+1)));      
0049          
0050    if args.Reality
0051       m_min = 0;
0052    else
0053       m_min = -el;
0054    end
0055 
0056    for m = m_min:el
0057       ind_lm = ssht_elm2ind(el, m);
0058       
0059       if mod(el, 2) == 1
0060          f_lm(ind_lm) = 0.0;
0061       else         
0062          f_lm(ind_lm) = f_radon_lm(ind_lm) ...
0063             ./ sqrt(4 * pi ./ (2*el+1)) ./ ring_lm(ind);
0064       end
0065    
0066    end
0067    
0068 end

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