s2let_transform_curvelet_analysis_px2cur Compute (spin) curvelet transform, input in pixel space, output in curvelet space. Default usage : [f_cur, f_scal] = s2let_transform_curvelet_analysis_px2cur(f_init, <options>) f_init is the input field in pixel space, f_cur contains the output curvelet contributions, f_scal contains the output scaling contributions. 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) 2015 Boris Leistedt, Martin Büttner, Jennifer Chan & Jason McEwen See LICENSE.txt for license details -----------------------------------------------------------
0001 function [f_cur, f_scal] = s2let_transform_curvelet_analysis_px2cur(f_init, varargin) 0002 0003 % s2let_transform_curvelet_analysis_px2cur 0004 % Compute (spin) curvelet transform, 0005 % input in pixel space, 0006 % output in curvelet space. 0007 % 0008 % Default usage : 0009 % 0010 % [f_cur, f_scal] = s2let_transform_curvelet_analysis_px2cur(f_init, <options>) 0011 % 0012 % f_init is the input field in pixel space, 0013 % f_cur contains the output curvelet contributions, 0014 % f_scal contains the output scaling contributions. 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) 2015 Boris Leistedt, Martin Büttner, 0038 % Jennifer Chan & Jason McEwen 0039 % See LICENSE.txt for license details 0040 % ----------------------------------------------------------- 0041 0042 sz = size(f_init); 0043 if sz(1) == 2*sz(2)-1 || sz(2) == 2*sz(1)-1 0044 Lguessed = min([sz(1) sz(2)]); 0045 else 0046 Lguessed = min([sz(1) sz(2)])-1; 0047 end 0048 0049 p = inputParser; 0050 p.addRequired('flm_init', @isnumeric); 0051 p.addParamValue('B', 2, @isnumeric); 0052 p.addParamValue('L', Lguessed, @isnumeric); 0053 p.addParamValue('J_min', 0, @isnumeric); 0054 p.addParamValue('Spin', 0, @isnumeric); 0055 p.addParamValue('Reality', false, @islogical); 0056 p.addParamValue('Upsample', false, @islogical); 0057 p.addParamValue('SpinLowered', false, @islogical); 0058 p.addParamValue('SpinLoweredFrom', 0, @isnumeric); 0059 p.addParamValue('Sampling', 'MW', @ischar); 0060 p.parse(f_init, varargin{:}); 0061 args = p.Results; 0062 0063 % For curvelets, azimuthal band-limit N always equals to L 0064 N = args.L ; 0065 J = s2let_jmax(args.L, args.B); 0066 0067 % --------------- 0068 % Construct signals in harmonic space: 0069 % --------------- 0070 flm_init= ssht_forward(f_init, args.L, 'Spin', args.Spin, 'Reality', args.Reality, 'Method', args.Sampling); 0071 0072 % --------------- 0073 % Signal analysis (from harmonic to curvelet space): 0074 % --------------- 0075 [f_cur, f_scal] = s2let_transform_curvelet_analysis_lm2cur(flm_init, ... 0076 'B',args.B, 'L', args.L, 'J_min', args.J_min, ... 0077 'Spin', args.Spin,'Reality', args.Reality,... 0078 'Upsample', args.Upsample, ... 0079 'SpinLowered', args.SpinLowered, ... 0080 'SpinLoweredFrom', args.SpinLoweredFrom, ... 0081 'Sampling', args.Sampling); 0082 0083 % Clear arrary memory: 0084 flm_init = 0; 0085 0086 end