Home > src > main > matlab > flaglet_demo2.m

flaglet_demo2

PURPOSE ^

flaglet_demo2

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 flaglet_demo2
 Plot one wavelet and its radially translated version

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % flaglet_demo2
0002 % Plot one wavelet and its radially translated version
0003 
0004 R = 1.0 ;
0005 Rplot1 = 0.49 ;
0006 Rplot2 = 0.49 ;
0007 Rplot3 = 0.49 ;
0008 limit1 = 0.00008;
0009 limit2 = 0.00004 ;
0010 limit3 = 0.000018 ;
0011 
0012 s1 = 0.2 ;
0013 s2 = 0.29 ;
0014 s3 = 0.38 ;
0015 
0016 L = 92 ;
0017 N = 64 ;
0018 P = 256 ;
0019 
0020 B_l = 2 ;
0021 B_n = 2 ;
0022 J_min_l = 0 ;
0023 J_min_n = 0 ;
0024 
0025 tau = flag_get_tau(N, R);
0026 
0027 [kappa kappa0] = flaglet_axisym_tiling(B_l, B_n, L, N, J_min_l, J_min_n);
0028 
0029 % Original
0030 kappa_ln = kappa{5,5};
0031 row = 15;
0032 
0033 % First translation
0034 kappa_ln_translated1 = kappa_ln  ;
0035 birs = [ s1, R ];
0036 for n = 1:N
0037     fn = zeros(1,N) ;
0038     fn(n) = 1.0 ;
0039     [K_n_s, ~] = slag_synthesis(fn, 'Nodes', birs) ;
0040     kappa_ln_translated1(n,:) = kappa_ln(n,:) * K_n_s(1) ;
0041 end
0042 
0043 % Second translation
0044 kappa_ln_translated2 = kappa_ln ;
0045 birs = [ s2, R ];
0046 for n = 1:N
0047     fn = zeros(1,N) ;
0048     fn(n) = 1.0 ;
0049     [K_n_s, ~] = slag_synthesis(fn, 'Nodes', birs) ;
0050     kappa_ln_translated2(n,:) = kappa_ln(n,:) * K_n_s(1) ;
0051 end
0052 
0053 % Third translation
0054 kappa_ln_translated3 = kappa_ln ;
0055 birs = [ s3, R ];
0056 for n = 1:N
0057     fn = zeros(1,N) ;
0058     fn(n) = 1.0 ;
0059     [K_n_s, ~] = slag_synthesis(fn, 'Nodes', birs) ;
0060     kappa_ln_translated3(n,:) = kappa_ln(n,:) * K_n_s(1) ;
0061 end
0062 
0063 figure('Position',[100 100 300 1100])
0064 
0065 h = (R/P);
0066 nodes = (0:h:R) ;
0067 %nodes = slag_sampling(N, R) ;
0068 %fn_orig = transpose(kappa_ln(:,row)) ;
0069 %[f ~] = slag_synthesis(fn_orig, 'Nodes', nodes);
0070 %subplot(3,2,2)
0071 %plot(nodes, f, 'black')
0072 %xlabel('Radius')
0073 %ylabel('Amplitude')
0074 %title('Radial profile')
0075 %axis([0.01 Rplot1 -limit1 limit1])
0076 %[ min(f) max(f) mean(f) ]
0077 
0078 fn_transl1 = transpose(kappa_ln_translated1(:,row)) ;
0079 [f_transl1 ~] = slag_synthesis(fn_transl1, 'Nodes', nodes);
0080 subplot(3,1,1)
0081 plot(nodes, f_transl1, 'black')
0082 xlabel('x01')
0083 ylabel('y01')
0084 axis([0.01 Rplot1 -limit1 limit1])
0085 %[ min(f_transl1) max(f_transl1) mean(f_transl1) ]
0086 
0087 
0088 fn_transl2 = transpose(kappa_ln_translated2(:,row)) ;
0089 [f_transl2 ~] = slag_synthesis(fn_transl2, 'Nodes', nodes);
0090 subplot(3,1,2)
0091 plot(nodes, f_transl2, 'black')
0092 xlabel('x02')
0093 ylabel('y02')
0094 axis([0.01 Rplot2 -limit2 limit2])
0095 %[ min(f_transl2) max(f_transl2) mean(f_transl2) ]
0096 
0097 fn_transl3 = transpose(kappa_ln_translated3(:,row)) ;
0098 [f_transl3 ~] = slag_synthesis(fn_transl3, 'Nodes', nodes);
0099 subplot(3,1,3)
0100 plot(nodes, f_transl3, 'black')
0101 xlabel('x03')
0102 ylabel('y03')
0103 axis([0.01 Rplot3 -limit3 limit3])
0104 %[ min(f_transl2) max(f_transl2) mean(f_transl2) ]
0105 
0106 colormap(hot(256))
0107 
0108 %subplot(3,2,1)
0109 %flaglet_plot_axisym_wavelet_kernel(kappa_ln, R, Rplot1, P)
0110 %title('Original wavelet')
0111 
0112 figure('Position',[100 100 300 1100])
0113 
0114 subplot(3,1,1)
0115 flaglet_plot_axisym_wavelet_kernel(kappa_ln_translated1, R, Rplot1, P)
0116 %title(['Wavelet translated by ',num2str(s1)])
0117 
0118 subplot(3,1,2)
0119 flaglet_plot_axisym_wavelet_kernel(kappa_ln_translated2, R, Rplot2, P)
0120 %title(['Wavelet translated by ',num2str(s2)])
0121 
0122 subplot(3,1,3)
0123 flaglet_plot_axisym_wavelet_kernel(kappa_ln_translated3, R, Rplot3, P)
0124 %title(['Wavelet translated by ',num2str(s3)])
0125 
0126 %colormap(CubeHelix(256,0.5,-1.5,1.2,1.0))
0127 colormap(hot(256))

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