mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-11-13 01:53:31 +01:00
ZH: extra phase_mod in true_phases
This commit is contained in:
parent
616a23ef2b
commit
b8d41e37b7
1 changed files with 4 additions and 5 deletions
|
@ -28,7 +28,7 @@ def antenna_true_phases(tx, antennas, freq_name, c_light=3e8):
|
||||||
geom_time = lib.geometry_time(tx, ant, c_light=c_light)
|
geom_time = lib.geometry_time(tx, ant, c_light=c_light)
|
||||||
geom_phase = geom_time * 2*np.pi*f_beacon
|
geom_phase = geom_time * 2*np.pi*f_beacon
|
||||||
|
|
||||||
true_phases[i] = lib.phase_mod(measured_phase) - lib.phase_mod(geom_phase)
|
true_phases[i] = lib.phase_mod(lib.phase_mod(measured_phase) - lib.phase_mod(geom_phase))
|
||||||
|
|
||||||
return true_phases
|
return true_phases
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ if __name__ == "__main__":
|
||||||
# Remove the phase from one antenna
|
# Remove the phase from one antenna
|
||||||
# this is a free parameter
|
# this is a free parameter
|
||||||
# (only required for absolute timing)
|
# (only required for absolute timing)
|
||||||
if True:
|
if False:
|
||||||
if True: # just take the first phase
|
if True: # just take the first phase
|
||||||
minimum_phase = -1*true_phases[0]
|
minimum_phase = -1*true_phases[0]
|
||||||
else: # take the minimum
|
else: # take the minimum
|
||||||
|
@ -90,7 +90,7 @@ if __name__ == "__main__":
|
||||||
if show_plots:
|
if show_plots:
|
||||||
fig, ax = plt.subplots()
|
fig, ax = plt.subplots()
|
||||||
spatial_unit=None
|
spatial_unit=None
|
||||||
fig.suptitle('f= {:2.0f}MHz'.format(f_beacon*1e3))
|
fig.suptitle('True phases\nf_beacon= {:2.0f}MHz'.format(f_beacon*1e3))
|
||||||
|
|
||||||
antenna_locs = list(zip(*[(ant.x, ant.y) for ant in antennas]))
|
antenna_locs = list(zip(*[(ant.x, ant.y) for ant in antennas]))
|
||||||
ax.set_xlabel('x' if spatial_unit is None else 'x [{}]'.format(spatial_unit))
|
ax.set_xlabel('x' if spatial_unit is None else 'x [{}]'.format(spatial_unit))
|
||||||
|
@ -103,6 +103,5 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
sc = ax.scatter(*antenna_locs, c=true_phases, **scatter_kwargs)
|
sc = ax.scatter(*antenna_locs, c=true_phases, **scatter_kwargs)
|
||||||
fig.colorbar(sc, ax=ax, label=color_label)
|
fig.colorbar(sc, ax=ax, label=color_label)
|
||||||
plt.show()
|
|
||||||
|
|
||||||
|
|
||||||
|
plt.show()
|
||||||
|
|
Loading…
Reference in a new issue