make_figures_aes.m 3.2 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 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. %% select color or mono
  13. % if (! exist(col))
  14. % col = 0;
  15. % end
  16. % if (col == 1)
  17. %% color figures
  18. % cext = "_color";
  19. % copt = "epsc";
  20. % else
  21. %% mono figures
  22. cext = "_mono";
  23. copt = "eps";
  24. % end
  25. %% frequency response with just A2B matrices
  26. [F FE Fs A2BF] = sphear_a2b_all((1:16), 300, 20000, 3, 256, 32);
  27. FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 24000, copt);
  28. sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, copt);
  29. close all;
  30. system(["cp -p figures/sphear_bf_azimuth_000" cext ".eps " AESDIR "sphear_bf_azimuth_000_a2b_all.eps"]);
  31. system(["cp -p figures/sphear_bf_azimuth_045" cext ".eps " AESDIR "sphear_bf_azimuth_045_a2b_all.eps"]);
  32. %% frequency response with just the A2B matrices and limit frequency
  33. FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, copt);
  34. sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, copt);
  35. close all;
  36. system(["cp -p figures/sphear_bf_azimuth_000" cext ".eps " AESDIR "sphear_bf_azimuth_000_a2b.eps"]);
  37. system(["cp -p figures/sphear_bf_azimuth_045" cext ".eps " AESDIR "sphear_bf_azimuth_045_a2b.eps"]);
  38. system(["cp -p figures/wxyz_filter_lf" cext ".eps " AESDIR "wxyz_filter_lf_a2b.eps"]);
  39. %% and now design the full filter, on-axis averaging only
  40. FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, 0);
  41. sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, 0);
  42. [B] = sphear_a2b_fir_all(300, 20000, 3, 8192, 48000, 0);
  43. [W X Y Z] = sphear_fir_extract(B, 0, 1);
  44. FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, copt, W, X, Y);
  45. sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, copt);
  46. sphear_fir_render_directions(FIR, 300, 20000, 256, 32, 4096, copt);
  47. close all;
  48. system(["cp -p figures/sphear_bf_azimuth_000" cext ".eps " AESDIR "sphear_bf_azimuth_000.eps"]);
  49. system(["cp -p figures/sphear_bf_azimuth_045" cext ".eps " AESDIR "sphear_bf_azimuth_045.eps"]);
  50. system(["cp -p figures/wxyz_filter_ff" cext ".eps " AESDIR "wxyz_filter_ff.eps"]);
  51. system(["cp -p figures/sphear_directions.eps " AESDIR "sphear_directions_onaxis.eps"]);
  52. %% and again with all angles averaging
  53. FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, 0);
  54. sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, 0);
  55. [B] = sphear_a2b_fir_all(300, 20000, 3, 8192, 48000, 0);
  56. [W X Y Z] = sphear_fir_extract(B, 1, 1);
  57. FIR = sphear_fir_design(F, A2BF, 256, 20, Fs, 4000, copt, W, X, Y);
  58. sphear_fir_render(FIR, 300, 20000, 256, 32, 8192, copt);
  59. sphear_fir_render_directions(FIR, 300, 20000, 256, 32, 4096, copt);
  60. close all;
  61. system(["cp -p figures/sphear_bf_azimuth_000" cext ".eps " AESDIR "sphear_bf_azimuth_000_all.eps"]);
  62. system(["cp -p figures/sphear_bf_azimuth_045" cext ".eps " AESDIR "sphear_bf_azimuth_045_all.eps"]);
  63. system(["cp -p figures/wxyz_filter_ff" cext ".eps " AESDIR "wxyz_filter_ff_all.eps"]);
  64. system(["cp -p figures/sphear_directions.eps " AESDIR "sphear_directions_all.eps"]);
  65. end