mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 11:33:32 +01:00
ZH: phase sigma plot tweak
This commit is contained in:
parent
31392f4fa0
commit
2c1fb0976b
1 changed files with 8 additions and 5 deletions
|
@ -56,7 +56,7 @@ if __name__ == "__main__":
|
|||
# Get phase difference per baseline
|
||||
phase_diffs = np.empty( (len(baselines), 2) )
|
||||
for i, base in enumerate(baselines):
|
||||
if i%100==0:
|
||||
if i%1000==0:
|
||||
print(i, "out of", len(baselines))
|
||||
|
||||
# read f_beacon from the first antenna
|
||||
|
@ -65,7 +65,7 @@ if __name__ == "__main__":
|
|||
# Get true phase diffs
|
||||
try:
|
||||
|
||||
true_phases = np.array([ant.beacon_info[freq_name]['phase'] for ant in base])
|
||||
true_phases = np.array([ant.beacon_info[freq_name]['true_phase'] for ant in base])
|
||||
true_phases_diff = lib.phase_mod(lib.phase_mod(true_phases[1]) - lib.phase_mod(true_phases[0]))
|
||||
except IndexError:
|
||||
# true_phase not determined yet
|
||||
|
@ -99,20 +99,22 @@ if __name__ == "__main__":
|
|||
|
||||
fig, axs = plt.subplots(2, 1, sharex=True)
|
||||
axs[0].set_title("Measured phase difference - Actual phase difference")
|
||||
axs[0].set_xlabel("Phase residuals $\\varphi$")
|
||||
axs[0].set_xlabel("Phase $\\Delta\\varphi = \\varphi_{meas} - \\varphi_{true}$")
|
||||
axs[0].tick_params(bottom=True, labelbottom=True)
|
||||
#axs[1].tick_params(top=True, labeltop=True, bottom=False, labelbottom=False)
|
||||
|
||||
if True:
|
||||
forward = lambda x: x/(2*np.pi*f_beacon)
|
||||
inverse = lambda x: 2*np.pi*x*f_beacon
|
||||
secax = axs[0].secondary_xaxis('top', functions=(forward, inverse))
|
||||
secax.set_xlabel('$\\varphi/(2\\pi f_{beacon})$ [ns]')
|
||||
secax.set_xlabel('Time $\\Delta\\varphi/(2\\pi f_{beac})$ [ns]')
|
||||
|
||||
i=0
|
||||
axs[i].set_ylabel("#")
|
||||
axs[i].hist(phase_residuals, bins='sqrt', density=False)
|
||||
|
||||
i=1
|
||||
axs[i].set_ylabel("Baseline combination #")
|
||||
axs[i].set_ylabel("Baseline\n combination #")
|
||||
if not True:
|
||||
axs[i].plot(my_phase_diffs, np.arange(N_base), ls='none', marker='+', label='actual time shifts')
|
||||
l = axs[i].plot(phase_diffs[:,1], np.arange(N_base), ls='none', marker='x', label='calculated')
|
||||
|
@ -121,6 +123,7 @@ if __name__ == "__main__":
|
|||
|
||||
else:
|
||||
axs[i].plot(phase_residuals, np.arange(N_base), ls='none', marker='x')
|
||||
fig.tight_layout()
|
||||
|
||||
if fig_dir:
|
||||
fig.savefig(path.join(fig_dir, __file__ + f".F{freq_name}.pdf"))
|
||||
|
|
Loading…
Reference in a new issue