mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-11-14 02:23:32 +01:00
ZH: improve final time comparison plot
This commit is contained in:
parent
1968814e06
commit
317f73b60d
1 changed files with 13 additions and 4 deletions
|
@ -249,17 +249,26 @@ if __name__ == "__main__":
|
|||
if True: # indicate single beacon period span
|
||||
ax.plot((-1, -1), (-1/(2*f_beacon), 1/(2*f_beacon)), marker='3', ms=10, label='1/f_beacon')
|
||||
if i == 0:
|
||||
ax.plot(np.arange(N_base), actual_baseline_time_shifts, marker='+', label='actual time shifts')
|
||||
ax.plot(np.arange(N_base), actual_baseline_time_shifts, ls='none', marker='h', alpha=0.8, label='actual time shifts')
|
||||
else:
|
||||
ax.plot(np.arange(N_base), (actual_baseline_time_shifts+1/(2*f_beacon))%(1/f_beacon) - 1/(2*f_beacon), marker='+', label='actual time shifts')
|
||||
ax.plot(np.arange(N_base), measured_baseline_time_diffs, marker='x', label='calculated')
|
||||
ax.plot(np.arange(N_base), (actual_baseline_time_shifts+1/(2*f_beacon))%(1/f_beacon) - 1/(2*f_beacon), ls='none', marker='h', label='actual time shifts', alpha=0.8)
|
||||
ax.plot(np.arange(N_base), measured_baseline_time_diffs, ls='none', alpha=0.8, marker='x', label='calculated')
|
||||
|
||||
ax.legend()
|
||||
if fig_dir:
|
||||
extra_name = ''
|
||||
if i == 1:
|
||||
extra_name = '.wrapped'
|
||||
|
||||
old_lims = (ax.get_xlim(), ax.get_ylim())
|
||||
for j in range(2):
|
||||
if j == 1:
|
||||
ax.set_xlim(-5, 50)
|
||||
extra_name += '.n50'
|
||||
fig.savefig(path.join(fig_dir, path.basename(__file__) + f".time_comparison{extra_name}.pdf"))
|
||||
|
||||
ax.set_xlim(*old_lims[0])
|
||||
ax.set_ylim(*old_lims[1])
|
||||
|
||||
if show_plots:
|
||||
plt.show()
|
||||
|
|
Loading…
Reference in a new issue