ZH: extra phase_mod in true_phases

This commit is contained in:
Eric Teunis de Boone 2022-11-25 12:12:04 +01:00
parent 616a23ef2b
commit b8d41e37b7

View file

@ -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_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
@ -67,7 +67,7 @@ if __name__ == "__main__":
# Remove the phase from one antenna
# this is a free parameter
# (only required for absolute timing)
if True:
if False:
if True: # just take the first phase
minimum_phase = -1*true_phases[0]
else: # take the minimum
@ -90,7 +90,7 @@ if __name__ == "__main__":
if show_plots:
fig, ax = plt.subplots()
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]))
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)
fig.colorbar(sc, ax=ax, label=color_label)
plt.show()
plt.show()