diff --git a/simulations/airshower_beacon_simulation/bd_antenna_phase_deltas.py b/simulations/airshower_beacon_simulation/bd_antenna_phase_deltas.py index 9b54ae0..91bb818 100755 --- a/simulations/airshower_beacon_simulation/bd_antenna_phase_deltas.py +++ b/simulations/airshower_beacon_simulation/bd_antenna_phase_deltas.py @@ -166,6 +166,10 @@ if __name__ == "__main__": actual_antenna_phase_shifts = [ -1*lib.phase_mod(2*np.pi*f_beacon*v) for k,v in actual_antenna_time_shifts.items() ] antenna_names = [int(k)-1 for k,v in actual_antenna_time_shifts.items() ] + # Make sure to shift all antennas by a global phase + global_phase_shift = actual_antenna_phase_shifts[0] - mean_sigma_phase[0] + actual_antenna_phase_shifts = lib.phase_mod(actual_antenna_phase_shifts - global_phase_shift ) + for i in range(2): plot_residuals = i == 1 colors = ['blue', 'orange'] @@ -180,11 +184,11 @@ if __name__ == "__main__": if plot_residuals: phase_residuals = lib.phase_mod(mean_sigma_phase - actual_antenna_phase_shifts) - fig.suptitle("Difference between Measured and Actual phases\n for Antenna $i$") + fig.suptitle("Difference between Measured and Actual phases (minus global phase)\n for Antenna $i$") axs[-1].set_xlabel("Antenna Phase Residual $\\Delta_\\varphi$") else: - fig.suptitle("Comparison Measured and Actual phases\n for Antenna $i$") - axs[-1].set_xlabel("Antenna Phase $\\Delta_\\varphi$") + fig.suptitle("Comparison Measured and Actual phases (minus global phase)\n for Antenna $i$") + axs[-1].set_xlabel("Antenna Phase $\\varphi$") i=0