s2let_transform_curvelet_synthesis_cur2px Compute (spin) curvelet transform, input curvelet space output in pixel space. Default usage : f_rec = s2let_transform_curvelet_synthesis_cur2px(f_cur, f_scal, flm_init, <options>) f_cur contains the input curvelet contributions -- MW sampling, f_scal contains the input scaling contributions -- MW sampling, flm_rec is the output field = flm_cur_syn+ flm_scal_syn Option : 'B' = { Dilation factor; B > 1 (default=2) } 'L' = { Harmonic band-limit; L > 1 (default=guessed from input) } 'J_min' = { Minimum curvelet scale to consider; 'Spin' = { Spin; (default=0) } 0 <= J_min < log_B(L) (default=0) } 'Reality' = { false [do not assume corresponding signal f real (default)], true [assume f real (improves performance)] } 'Upsample' = { false [multiresolution algorithm (default)], true [full resolution curvelets] } 'SpinLowered' = { true [Apply normalisation factors for spin-lowered curvelets and scaling function.], false [Apply the usual normalisation factors such that the curvelets fulfil the admissibility condition (default)]} 'SpinLoweredFrom' = [integer; if the SpinLowered option is used, this option indicates which spin number the curvelets should be lowered from (default = 0)] ----------------------------------------------------------- S2LET package to perform Wavelet Transform on the Sphere. Copyright (C) 2012-2016 Boris Leistedt, Jennifer Chan & Jason McEwen See LICENSE.txt for license details -----------------------------------------------------------
0001 function f_rec = s2let_transform_curvelet_synthesis_cur2px(f_cur, f_scal, varargin) 0002 0003 % s2let_transform_curvelet_synthesis_cur2px 0004 % Compute (spin) curvelet transform, 0005 % input curvelet space 0006 % output in pixel space. 0007 % 0008 % Default usage : 0009 % 0010 % f_rec = s2let_transform_curvelet_synthesis_cur2px(f_cur, f_scal, flm_init, <options>) 0011 % 0012 % f_cur contains the input curvelet contributions -- MW sampling, 0013 % f_scal contains the input scaling contributions -- MW sampling, 0014 % flm_rec is the output field = flm_cur_syn+ flm_scal_syn 0015 % 0016 % Option : 0017 % 'B' = { Dilation factor; B > 1 (default=2) } 0018 % 'L' = { Harmonic band-limit; L > 1 (default=guessed from input) } 0019 % 'J_min' = { Minimum curvelet scale to consider; 0020 % 'Spin' = { Spin; (default=0) } 0021 % 0 <= J_min < log_B(L) (default=0) } 0022 % 'Reality' = { false [do not assume corresponding signal f real (default)], 0023 % true [assume f real (improves performance)] } 0024 % 'Upsample' = { false [multiresolution algorithm (default)], 0025 % true [full resolution curvelets] } 0026 % 'SpinLowered' = { true [Apply normalisation factors for spin-lowered 0027 % curvelets and scaling function.], 0028 % false [Apply the usual normalisation factors such 0029 % that the curvelets fulfil the admissibility 0030 % condition (default)]} 0031 % 'SpinLoweredFrom' = [integer; if the SpinLowered option is used, this 0032 % option indicates which spin number the curvelets 0033 % should be lowered from (default = 0)] 0034 % 0035 % ----------------------------------------------------------- 0036 % S2LET package to perform Wavelet Transform on the Sphere. 0037 % Copyright (C) 2012-2016 Boris Leistedt, Jennifer Chan & Jason McEwen 0038 % See LICENSE.txt for license details 0039 % ----------------------------------------------------------- 0040 0041 len = length(f_cur); % i.e. f_cur(Nj-1 Nj, 2L-1) 0042 temp = f_cur{len}; 0043 sz = size(temp); 0044 if sz(1) == 2*sz(2)-1 || sz(1) == sz(3) 0045 Lguessed = sz(2); 0046 else 0047 Lguessed = (sz(3)+1)/2 ; 0048 end 0049 0050 p = inputParser; 0051 p.addRequired('f_cur'); 0052 p.addRequired('f_scal', @isnumeric); 0053 p.addParamValue('B', 2, @isnumeric); 0054 p.addParamValue('L', Lguessed, @isnumeric); 0055 p.addParamValue('J_min', 0, @isnumeric); 0056 p.addParamValue('Spin', 0, @isnumeric); 0057 p.addParamValue('Upsample', false, @islogical); 0058 p.addParamValue('Reality', false, @islogical); 0059 p.addParamValue('SpinLowered', false, @islogical); 0060 p.addParamValue('SpinLoweredFrom', 0, @isnumeric); 0061 p.addParamValue('Sampling', 'MW', @ischar); 0062 p.parse(f_cur, f_scal, varargin{:}); 0063 args = p.Results; 0064 0065 J = s2let_jmax(args.L, args.B); 0066 0067 % ----------------- 0068 % Signal synthesis: 0069 % ----------------- 0070 % Reconstruct the signals in harmonic space: 0071 flm_rec = s2let_transform_curvelet_synthesis_cur2lm(f_cur, f_scal, ... 0072 'B', args.B, 'L', args.L, ... 0073 'Spin', args.Spin, ... 0074 'J_min', args.J_min, ... 0075 'Upsample', args.Upsample,... 0076 'Reality', args.Reality,... 0077 'SpinLowered', args.SpinLowered, ... 0078 'SpinLoweredFrom', args.SpinLoweredFrom,... 0079 'Sampling', args.Sampling ); 0080 0081 % Reconstruct the signals in pxiel space: 0082 f_rec = ssht_inverse(flm_rec, args.L, ... 0083 'Spin', args.Spin, ... 0084 'Method', 'MW', ... 0085 'Reality', args.Reality); 0086 0087 % Clear array memory: 0088 flm_rec = 0; 0089 0090 end