mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 03:23:34 +01:00
ZH: let view_beaconed_antenna use E_AxB
This commit is contained in:
parent
6bdaf5b574
commit
f88799dd95
1 changed files with 7 additions and 6 deletions
|
@ -4,11 +4,11 @@ import numpy as np
|
|||
import matplotlib.pyplot as plt
|
||||
import numpy.fft as ft
|
||||
|
||||
from earsim import Antenna
|
||||
|
||||
import aa_generate_beacon as beacon
|
||||
from view_orig_ant0 import plot_antenna_geometry
|
||||
import lib
|
||||
from earsim import Antenna
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import os.path as path
|
||||
|
@ -61,13 +61,13 @@ if __name__ == "__main__":
|
|||
if not True:
|
||||
mydict = dict(x=ant.Ex, y=ant.Ex, z=ant.Ez)
|
||||
else:
|
||||
mydict = dict(b=ant.beacon)
|
||||
mydict = dict(E=ant.E_AxB, b=ant.beacon)
|
||||
|
||||
for j, (direction, trace) in enumerate(mydict.items()):
|
||||
l = axs[0].plot(ant.t, trace, label=f"E{direction} {ant.name}")
|
||||
|
||||
if j == 0 and 't0' in ant.attrs:
|
||||
axs[0].axvline(ant.attrs['t0'], color=l[0].get_color(), alpha=0.5)
|
||||
#if False and j == 0 and 't0' in ant.attrs:
|
||||
# axs[0].axvline(ant.attrs['t0'], color=l[0].get_color(), alpha=0.5)
|
||||
|
||||
colorlist.append(l[0].get_color())
|
||||
|
||||
|
@ -98,7 +98,8 @@ if __name__ == "__main__":
|
|||
if plot_geometry:
|
||||
fig2, axs2 = plt.subplots(1)
|
||||
plot_antenna_geometry(antennas, ax=axs2, plot_max_values=False, color='grey', plot_names=False)
|
||||
plot_antenna_geometry([ antennas[i] for i in idx], ax=axs2, colors=colorlist, plot_max_values=False)
|
||||
for j, _ in enumerate(mydict):
|
||||
plot_antenna_geometry([ antennas[i] for i in idx], ax=axs2, colors=colorlist[j + len(colorlist)//len(mydict)], plot_max_values=False)
|
||||
axs2.plot(tx.x, tx.y, marker='X', color='k')
|
||||
axs2.set_title("Geometry with selected antennas")
|
||||
|
||||
|
|
Loading…
Reference in a new issue