Преглед изворни кода

remove old color/mono plotting options, add second order Z/S/T plots

Fernando Pablo Lopez-Lezcano пре 7 година
родитељ
комит
ed703d1f91
1 измењених фајлова са 20 додато и 26 уклоњено
  1. 20 26
      calibration/src/sphear_bf_plot_filters.m

+ 20 - 26
calibration/src/sphear_bf_plot_filters.m

@@ -30,41 +30,35 @@
 function sphear_bf_plot_filters(FC, W, X, Y, Z, S, T, U, V)
 function sphear_bf_plot_filters(FC, W, X, Y, Z, S, T, U, V)
   fig = figure;
   fig = figure;
   %% color plot
   %% color plot
-  popts = 'k.';
-  wopts = 'k';
-  xopts = 'r.-';
-  yopts = 'b.-';
-  zopts = 'g.-';
-  copt = '-color';
-  cext = "_color";
   grid on;
   grid on;
-  axis([400, 20000]);
+  axis([300, 20000]);
   xticks = [300, 500, 1000, 2000, 3000, 5000, 7000, 10000, 20000];
   xticks = [300, 500, 1000, 2000, 3000, 5000, 7000, 10000, 20000];
   set(gca, 'XTick', xticks);
   set(gca, 'XTick', xticks);
   set(gca, 'XTickLabel', sprintf('%d|', xticks));
   set(gca, 'XTickLabel', sprintf('%d|', xticks));
   ca=get (gcf, "currentaxes");
   ca=get (gcf, "currentaxes");
-  set(ca,"fontweight","bold","linewidth",1.5)
+  set(ca,"fontweight","bold","linewidth",1.0)
   pbaspect([16, 9, 1])
   pbaspect([16, 9, 1])
   hold on;
   hold on;
+  %% default: WXY, first order horizontal
   %% W
   %% W
-  wh = semilogx(FC, 10*log10(abs(W)), wopts, "linewidth", 1.5);
+  wh = semilogx(FC, 20*log10(abs(W)), 'k-', "linewidth", 1.25);
   %% XY
   %% XY
-  xh = semilogx(FC, 10*log10(abs(X)), xopts, "linewidth", 1.5);
-  yh = semilogx(FC, 10*log10(abs(Y)), yopts, "linewidth", 1.5);
-  if (exist("Z"))
+  xh = semilogx(FC, 20*log10(abs(X)), 'r-', "linewidth", 1.25);
+  yh = semilogx(FC, 20*log10(abs(Y)), 'b-', "linewidth", 1.25);
+  l = legend([wh, xh, yh], {'W', 'X', 'Y'});
+  %% second case: WXYUV (second order horizontal)
+  if (numel(U) > 0)
+    uh = semilogx(FC, 20*log10(abs(U)), 'r--', "linewidth", 1.25);
+    vh = semilogx(FC, 20*log10(abs(V)), 'b--', "linewidth", 1.25);
+    l = legend([wh, xh, yh, uh, vh], {'W', 'X', 'Y', 'U', 'V'});
+  end
+  if (numel(Z) > 0)
+    %% third case: WXYZSTUV (second order full sphere)
     %% Z
     %% Z
-    zh = semilogx(FC, 10*log10(abs(Z)), zopts, "linewidth", 1.5);
-    l = legend([wh, xh, yh, zh], {'W', 'X', 'Y', 'Z'});
-    if (exist("U"))
-      sh = semilogx(FC, 10*log10(abs(S)), 'r:', "linewidth", 1.5);
-      th = semilogx(FC, 10*log10(abs(T)), 'b:', "linewidth", 1.5);
-      uh = semilogx(FC, 10*log10(abs(U)), 'r--', "linewidth", 1.5);
-      vh = semilogx(FC, 10*log10(abs(V)), 'b--', "linewidth", 1.5);
-      l = legend([wh, xh, yh, zh, sh, th, uh, vh], {'W', 'X', 'Y', 'Z', 'S', 'T', 'U', 'V'});
-    end
-  else
-    l = legend([wh, xh, yh], {'W', 'X', 'Y'});
+    zh = semilogx(FC, 20*log10(abs(Z)), 'g-', "linewidth", 1.25);
+    sh = semilogx(FC, 20*log10(abs(S)), 'r:', "linewidth", 1.25);
+    th = semilogx(FC, 20*log10(abs(T)), 'b:', "linewidth", 1.25);
+    l = legend([wh, xh, yh, zh, sh, th, uh, vh], {'W', 'X', 'Y', 'Z', 'S', 'T', 'U', 'V'});
   end
   end
-  legend(l, 'location', 'south');
-  print(fig, '-deps','-tight',copt,["../data/current/figures/wxyz_simple_filter" cext ".eps"]);
+  legend(l, 'location', 'west');
 end
 end