ソースを参照

latest changes to the script that generates the figures for the AES paper

Fernando Pablo Lopez-Lezcano 10 年 前
親
コミット
91ad0b6d75
1 ファイル変更、18 行追加、14 行削除
  1. 18 14
      make_figures_aes.m

+ 18 - 14
make_figures_aes.m

@@ -21,10 +21,10 @@ function [FIR] = make_figures_aes(col)
   %% copt = "eps";
     
   %% frequency response with just A2B matrices
-  [F FE Fs A2BF] = sphear_a2b_all((1:16), 300, 20000, 3, 256, 32);
+  [F FE Fs A2BF] = sphear_a2b_all((1:16), 300, 20000, 8, 256, 32);
   %% deliberately use nyquist to extend this to high frequencies
   FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 24000, copt);
-  sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, copt);
+  sphear_fir_render(FIR, 300, 20000, -45, 12, 256, 32, 8192, copt);
   close all;
 
   system(["cp -p figures/sphear_bf_azimuth_000" cext ".eps " AESDIR "sphear_bf_azimuth_000_a2b_all.eps"]);
@@ -33,7 +33,7 @@ function [FIR] = make_figures_aes(col)
 
   %% frequency response with just the A2B matrices and limit frequency
   FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, copt);
-  sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, copt);
+  sphear_fir_render(FIR, 300, 20000, -45, 12, 256, 32, 8192, copt);
   close all;
 
   system(["cp -p figures/sphear_bf_azimuth_000" cext ".eps " AESDIR "sphear_bf_azimuth_000_a2b.eps"]);
@@ -42,37 +42,41 @@ function [FIR] = make_figures_aes(col)
 
   %% and now design the full filter, on-axis averaging only
   FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, 0);
-  sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, 0);
-  [B] = sphear_a2b_fir_all(300, 20000, 3, 8192, 48000, 0);
+  sphear_fir_render(FIR, 300, 20000, -45, 0, 256, 32, 8192, 0);
+  [B] = sphear_a2b_fir_all(300, 20000, 8, 8192, 48000, 0);
   [W X Y Z] = sphear_fir_extract(B, 0, 1);
   FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, copt, W, X, Y);
-  sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, copt);
+  sphear_fir_render(FIR, 300, 20000, -45, 0, 256, 32, 8192, copt);
   sphear_fir_render_directions(FIR, 3000, 20000, 256, 32, 4096, copt);
+  [B] = sphear_a2b_fir_all(300, 20000, 8, 8192, 48000, 1);
   close all;
 
+  %% recovered cardioid versus frequency
+  sphear_cardioid_plot_all([500, 2000, 5000, 7000, 10000, 14000], 300, 20000, 8, 8192, 48000, "epsc");
+  
   system(["cp -p figures/sphear_bf_azimuth_000" cext ".eps " AESDIR "sphear_bf_azimuth_000.eps"]);
   system(["cp -p figures/sphear_bf_azimuth_045" cext ".eps " AESDIR "sphear_bf_azimuth_045.eps"]);
   system(["cp -p figures/wxyz_filter_ff" cext ".eps " AESDIR "wxyz_filter_ff.eps"]);
   system(["cp -p figures/sphear_directions.eps " AESDIR "sphear_directions_onaxis.eps"]);
+  system(["cp -p figures/sphear_polar_multi_00604_00659_color.eps " AESDIR "sphear_polar_multi_600.eps"]);
+  system(["cp -p figures/sphear_polar_multi_01216_01327_color.eps " AESDIR "sphear_polar_multi_1200.eps"]);
+  system(["cp -p figures/sphear_polar_multi_05383_05875_color.eps " AESDIR "sphear_polar_multi_5000.eps"]);
+  system(["cp -p figures/sphear_polar_multi_10840_11831_color.eps " AESDIR "sphear_polar_multi_10000.eps"]);
+  system(["cp -p figures/sphear_cardioid_polar.eps " AESDIR "sphear_cardioid_polar.eps"]);
 
   %% and again with all angles averaging
   FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, 0);
-  sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, 0);
-  [B] = sphear_a2b_fir_all(300, 20000, 3, 8192, 48000, 0);
+  sphear_fir_render(FIR, 300, 20000, -45, 0, 256, 32, 8192, 0);
+  [B] = sphear_a2b_fir_all(300, 20000, 8, 8192, 48000, 0);
   [W X Y Z] = sphear_fir_extract(B, 1, 1);
   FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, copt, W, X, Y);
-  sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, copt);
+  sphear_fir_render(FIR, 300, 20000, -45, 0, 256, 32, 8192, copt);
   sphear_fir_render_directions(FIR, 3000, 20000, 256, 32, 4096, copt);
-  [B] = sphear_a2b_fir_all(300, 20000, 3, 8192, 48000, 1);
   close all;
 
   system(["cp -p figures/sphear_bf_azimuth_000" cext ".eps " AESDIR "sphear_bf_azimuth_000_all.eps"]);
   system(["cp -p figures/sphear_bf_azimuth_045" cext ".eps " AESDIR "sphear_bf_azimuth_045_all.eps"]);
   system(["cp -p figures/wxyz_filter_ff" cext ".eps " AESDIR "wxyz_filter_ff_all.eps"]);
   system(["cp -p figures/sphear_directions.eps " AESDIR "sphear_directions_all.eps"]);
-  system(["cp -p figures/sphear_polar_multi_00604_00762_color.eps " AESDIR "sphear_polar_multi_600.eps"]);
-  system(["cp -p figures/sphear_polar_multi_01216_01536_color.eps " AESDIR "sphear_polar_multi_1200.eps"]);
-  system(["cp -p figures/sphear_polar_multi_04932_06228_color.eps " AESDIR "sphear_polar_multi_5000.eps"]);
-  system(["cp -p figures/sphear_polar_multi_09932_12542_color.eps " AESDIR "sphear_polar_multi_10000.eps"]);
   
 end