figure: fix beacon_field for phase

This commit is contained in:
Eric Teunis de Boone 2022-10-05 18:59:35 +02:00
parent 500e9fb323
commit fdae3fd665

View file

@ -53,6 +53,9 @@ def grid_plot(grid, ax=None, **plot_kwargs):
if ax is None: if ax is None:
ax = plt.gca() ax = plt.gca()
if not grid:
return
x = [a.x for a in grid] x = [a.x for a in grid]
y = [a.y for a in grid] y = [a.y for a in grid]
l = [a.name for a in grid] l = [a.name for a in grid]
@ -127,7 +130,9 @@ def plot_field(
scatter_kwargs = {**default_scatter_kwargs, **scatter_kwargs} scatter_kwargs = {**default_scatter_kwargs, **scatter_kwargs}
if tx or ants:
grid_plot([tx] + ants, ax=ax) grid_plot([tx] + ants, ax=ax)
if ref_ant is not None: if ref_ant is not None:
ax.set_title("Single baseline\n reference antenna={}, f={}MHz".format(ref_ant.name, f_beacon/1e6)) ax.set_title("Single baseline\n reference antenna={}, f={}MHz".format(ref_ant.name, f_beacon/1e6))
else: else: