mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m.internship-documentation.git
synced 2024-11-22 07:03:30 +01:00
figure: antenna_setup optional annotate t_d
This commit is contained in:
parent
6d0a59c7b6
commit
cbf17ca830
1 changed files with 12 additions and 1 deletions
|
@ -63,7 +63,7 @@ def antenna_baselines(antennas):
|
|||
return combinations(antennas, 2)
|
||||
|
||||
|
||||
def plot_four_antenna_geometry(tx, ants, extra_ant=None, ax=None, line_kwargs={}, scatter_kwargs={}, scatter_zorder=5):
|
||||
def plot_four_antenna_geometry(tx, ants, extra_ant=None, ax=None, line_kwargs={}, scatter_kwargs={}, scatter_zorder=5, annotate_td=True):
|
||||
|
||||
default_line_kwargs = dict( color='grey', lw=3, alpha=0.7)
|
||||
default_scatter_kwargs = dict( color='grey', s=200)
|
||||
|
@ -88,9 +88,19 @@ def plot_four_antenna_geometry(tx, ants, extra_ant=None, ax=None, line_kwargs={}
|
|||
|
||||
# Lines connecting Tx and ants
|
||||
tmp_line_kwargs = line_kwargs
|
||||
tmp_line_kwargs['linestyle'] = '--'
|
||||
for ant in ants:
|
||||
ax.plot([tx.x, ant.x], [tx.y, ant.y], **tmp_line_kwargs)
|
||||
|
||||
if annotate_td:
|
||||
annot_kwargs = dict(va='bottom', ha='center')
|
||||
dx, dy = 0, 0.1
|
||||
x = (tx.x + ant.x)/2 + dx
|
||||
y = (tx.y + ant.y)/2 + dy
|
||||
|
||||
|
||||
ax.annotate(f'$t_{{d{ant.name}}}$', (x,y), **annot_kwargs)
|
||||
|
||||
# Lines due to all Antennas (including extra_ant)
|
||||
if extra_ant is not None:
|
||||
line_offset = 0.08*np.array([1,1])
|
||||
|
@ -111,6 +121,7 @@ def plot_four_antenna_geometry(tx, ants, extra_ant=None, ax=None, line_kwargs={}
|
|||
# Lines internal to ants triangle
|
||||
tmp_line_kwargs = line_kwargs
|
||||
tmp_line_kwargs['color'] = 'green'
|
||||
tmp_line_kwargs['linestyle'] = '-'
|
||||
tmp_line_kwargs['alpha'] = 0.7
|
||||
for j, ant_pair in enumerate(combinations(ants,2)):
|
||||
a, b = ant_pair[0], ant_pair[1]
|
||||
|
|
Loading…
Reference in a new issue