From b8d41e37b7af4314b01a851fd16dbf7df41eb7da Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Fri, 25 Nov 2022 12:12:04 +0100 Subject: [PATCH] ZH: extra phase_mod in true_phases --- .../airshower_beacon_simulation/bb_beacon_true_phases.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/simulations/airshower_beacon_simulation/bb_beacon_true_phases.py b/simulations/airshower_beacon_simulation/bb_beacon_true_phases.py index 90d2699..394fb52 100755 --- a/simulations/airshower_beacon_simulation/bb_beacon_true_phases.py +++ b/simulations/airshower_beacon_simulation/bb_beacon_true_phases.py @@ -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()