1
0

make_figures_aes.m 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. %%
  2. %% Make all figures for the AES paper
  3. %%
  4. %% Copyright Fernando Lopez-Lezcano 2016
  5. %% nando@ccrma.stanford.edu
  6. function [FIR] = make_figures_aes(col)
  7. %% start from scratch and load common functions
  8. close all;
  9. clear all;
  10. sphear_common;
  11. global AESDIR = "../papers/AES_SFCconf2016/AES_SFCconf2016_template_abstractOnly/";
  12. %% color figures
  13. cext = "_color";
  14. copt = "epsc";
  15. %% mono figures
  16. %% cext = "_mono";
  17. %% copt = "eps";
  18. %% frequency response with just A2B matrices
  19. [F FE Fs A2BF] = sphear_a2b_all((1:16), 300, 20000, 3, 256, 32);
  20. %% deliberately use nyquist to extend this to high frequencies
  21. FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 24000, copt);
  22. sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, copt);
  23. close all;
  24. system(["cp -p figures/sphear_bf_azimuth_000" cext ".eps " AESDIR "sphear_bf_azimuth_000_a2b_all.eps"]);
  25. system(["cp -p figures/sphear_bf_azimuth_045" cext ".eps " AESDIR "sphear_bf_azimuth_045_a2b_all.eps"]);
  26. system(["cp -p figures/wxyz_filter_lf" cext ".eps " AESDIR "wxyz_filter_a2b_only.eps"]);
  27. %% frequency response with just the A2B matrices and limit frequency
  28. FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, copt);
  29. sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, copt);
  30. close all;
  31. system(["cp -p figures/sphear_bf_azimuth_000" cext ".eps " AESDIR "sphear_bf_azimuth_000_a2b.eps"]);
  32. system(["cp -p figures/sphear_bf_azimuth_045" cext ".eps " AESDIR "sphear_bf_azimuth_045_a2b.eps"]);
  33. system(["cp -p figures/wxyz_filter_lf" cext ".eps " AESDIR "wxyz_filter_lf_a2b.eps"]);
  34. %% and now design the full filter, on-axis averaging only
  35. FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, 0);
  36. sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, 0);
  37. [B] = sphear_a2b_fir_all(300, 20000, 3, 8192, 48000, 0);
  38. [W X Y Z] = sphear_fir_extract(B, 0, 1);
  39. FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, copt, W, X, Y);
  40. sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, copt);
  41. sphear_fir_render_directions(FIR, 3000, 20000, 256, 32, 4096, copt);
  42. close all;
  43. system(["cp -p figures/sphear_bf_azimuth_000" cext ".eps " AESDIR "sphear_bf_azimuth_000.eps"]);
  44. system(["cp -p figures/sphear_bf_azimuth_045" cext ".eps " AESDIR "sphear_bf_azimuth_045.eps"]);
  45. system(["cp -p figures/wxyz_filter_ff" cext ".eps " AESDIR "wxyz_filter_ff.eps"]);
  46. system(["cp -p figures/sphear_directions.eps " AESDIR "sphear_directions_onaxis.eps"]);
  47. %% and again with all angles averaging
  48. FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, 0);
  49. sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, 0);
  50. [B] = sphear_a2b_fir_all(300, 20000, 3, 8192, 48000, 0);
  51. [W X Y Z] = sphear_fir_extract(B, 1, 1);
  52. FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, copt, W, X, Y);
  53. sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, copt);
  54. sphear_fir_render_directions(FIR, 3000, 20000, 256, 32, 4096, copt);
  55. [B] = sphear_a2b_fir_all(300, 20000, 3, 8192, 48000, 1);
  56. close all;
  57. system(["cp -p figures/sphear_bf_azimuth_000" cext ".eps " AESDIR "sphear_bf_azimuth_000_all.eps"]);
  58. system(["cp -p figures/sphear_bf_azimuth_045" cext ".eps " AESDIR "sphear_bf_azimuth_045_all.eps"]);
  59. system(["cp -p figures/wxyz_filter_ff" cext ".eps " AESDIR "wxyz_filter_ff_all.eps"]);
  60. system(["cp -p figures/sphear_directions.eps " AESDIR "sphear_directions_all.eps"]);
  61. system(["cp -p figures/sphear_polar_multi_00604_00762_color.eps " AESDIR "sphear_polar_multi_600.eps"]);
  62. system(["cp -p figures/sphear_polar_multi_01216_01536_color.eps " AESDIR "sphear_polar_multi_1200.eps"]);
  63. system(["cp -p figures/sphear_polar_multi_04932_06228_color.eps " AESDIR "sphear_polar_multi_5000.eps"]);
  64. system(["cp -p figures/sphear_polar_multi_09932_12542_color.eps " AESDIR "sphear_polar_multi_10000.eps"]);
  65. end