0001
0002
0003
0004
0005
0006
0007 clear all;
0008 close all;
0009
0010
0011 R = 1.0;
0012 L = 16;
0013 P = 16;
0014 B_l = 3;
0015 B_p = 2;
0016 J_min_l = 0;
0017 J_min_p = 1;
0018
0019 J_l = ceil(log(L) ./ log(B_l))
0020 J_p = ceil(log(P) ./ log(B_p))
0021
0022
0023 [kappa kappa0] = flaglet_axisym_tiling(B_l, B_p, L, P, J_min_l, J_min_p);
0024 error_on_axisym_tiling = flaglet_check_axisym_tiling(kappa, kappa0, L, P, B_l, B_p)
0025
0026
0027 flmn = zeros(P, L^2);
0028 flmn = rand(size(flmn)) + sqrt(-1)*rand(size(flmn));
0029 flmn = 2.*(flmn - (1+sqrt(-1))./2);
0030
0031
0032 f = flag_synthesis(flmn);
0033
0034
0035 [f_wav, f_scal] = flaglet_axisym_analysis(f);
0036 f_rec = flaglet_axisym_synthesis(f_wav, f_scal);
0037 default = max(max(max(abs(f-f_rec))))
0038
0039
0040 [f_wav, f_scal] = flaglet_axisym_analysis(f, 'Downsample', false);
0041 f_rec = flaglet_axisym_synthesis(f_wav, f_scal, 'Downsample', false);
0042 default_fullresolution = max(max(max(abs(f-f_rec))))
0043
0044
0045 [f_wav, f_scal] = flaglet_axisym_analysis(f, 'Downsample', true);
0046 f_rec = flaglet_axisym_synthesis(f_wav, f_scal, 'Downsample', true);
0047 default_multiresolution = max(max(max(abs(f-f_rec))))
0048
0049
0050 [f_wav, f_scal] = flaglet_axisym_analysis(f, 'B_l', B_l, 'B_p', B_p, 'L', L, 'P', P, 'J_min_l', J_min_l, 'J_min_p', J_min_p, 'R', R);
0051 f_rec = flaglet_axisym_synthesis(f_wav, f_scal, 'B_l', B_l, 'B_p', B_p, 'L', L, 'P', P, 'J_min_l', J_min_l, 'J_min_p', J_min_p, 'R', R);
0052 custom = max(max(max(abs(f-f_rec))))
0053
0054
0055 for en = 1:P
0056 for el = 0:L-1
0057 ind = el*el + el + 1;
0058 flmn(en,ind) = real(flmn(en,ind));
0059 for m = 1:el
0060 ind_pm = el*el + el + m + 1;
0061 ind_nm = el*el + el - m + 1;
0062 flmn(en,ind_nm) = (-1)^m * conj(flmn(en,ind_pm));
0063 end
0064 end
0065 end
0066
0067
0068 f_real = flag_synthesis(flmn, 'reality', true);
0069
0070
0071 [f_wav_real, f_scal_real] = flaglet_axisym_analysis(f_real, 'reality', true);
0072 f_real_rec = flaglet_axisym_synthesis(f_wav_real, f_scal_real, 'reality', true);
0073 real_default = max(max(max(abs(f_real-f_real_rec))))
0074
0075
0076 [f_wav_real, f_scal_real] = flaglet_axisym_analysis(f_real, 'Downsample', false, 'reality', true);
0077 f_rec = flaglet_axisym_synthesis(f_wav_real, f_scal_real, 'Downsample', false, 'reality', true);
0078 real_default_fullresolution = max(max(max(abs(f_real-f_real_rec))))
0079
0080
0081 [f_wav_real, f_scal_real] = flaglet_axisym_analysis(f_real, 'Downsample', true, 'reality', true);
0082 f_rec = flaglet_axisym_synthesis(f_wav_real, f_scal_real, 'Downsample', true, 'reality', true);
0083 real_default_multiresolution = max(max(max(abs(f_real-f_real_rec))))
0084
0085
0086 [f_wav_real, f_scal_real] = flaglet_axisym_analysis(f_real, 'B_l', B_l, 'B_p', B_p, 'L', L, 'P', P, 'J_min_l', J_min_l, 'J_min_p', J_min_p, 'R', R, 'reality', true);
0087 f_real_rec = flaglet_axisym_synthesis(f_wav_real, f_scal_real, 'B_l', B_l, 'B_p', B_p, 'L', L, 'P', P, 'J_min_l', J_min_l, 'J_min_p', J_min_p, 'R', R, 'reality', true);
0088 real_custom = max(max(max(abs(f_real-f_real_rec))))