ZH: shift actual_antenna_phase to match calculated antenna phase

This introduces a global (arbitrary) phase that baseline differences are not sensitive to
This commit is contained in:
Eric Teunis de Boone 2022-12-22 18:12:04 +01:00
parent 61b5b8a8d6
commit 86f493bd1f

View file

@ -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() ] 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() ] 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): for i in range(2):
plot_residuals = i == 1 plot_residuals = i == 1
colors = ['blue', 'orange'] colors = ['blue', 'orange']
@ -180,11 +184,11 @@ if __name__ == "__main__":
if plot_residuals: if plot_residuals:
phase_residuals = lib.phase_mod(mean_sigma_phase - actual_antenna_phase_shifts) 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$") axs[-1].set_xlabel("Antenna Phase Residual $\\Delta_\\varphi$")
else: else:
fig.suptitle("Comparison Measured and Actual phases\n for Antenna $i$") fig.suptitle("Comparison Measured and Actual phases (minus global phase)\n for Antenna $i$")
axs[-1].set_xlabel("Antenna Phase $\\Delta_\\varphi$") axs[-1].set_xlabel("Antenna Phase $\\varphi$")
i=0 i=0