mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 03:23:34 +01:00
Pulse: SNR vs Time accuracy: optional errorbar
This commit is contained in:
parent
f7a68ef68a
commit
01237a7386
1 changed files with 10 additions and 1 deletions
|
@ -703,8 +703,12 @@ if __name__ == "__main__":
|
|||
mean_residual = np.mean(time_residuals[valid_mask])
|
||||
time_accuracy = np.std(time_residuals[valid_mask])
|
||||
|
||||
# calculate absolute deviation from the mean
|
||||
residual_mean_deviation = np.sqrt( (time_residuals - mean_residual)**2 )
|
||||
|
||||
snr_std = np.std(snrs)
|
||||
time_accuracy_std = np.std(residual_mean_deviation)
|
||||
|
||||
scatter_kwargs = dict(
|
||||
ls='none',
|
||||
marker='.',
|
||||
|
@ -743,7 +747,12 @@ if __name__ == "__main__":
|
|||
)
|
||||
|
||||
#l = ax.plot(snr_sigma_factor, np.sqrt(np.mean(y_values[valid_mask])**2), **{**kwargs, **dict(ms=50)})
|
||||
l = ax.plot(snr_sigma_factor, np.std(time_residuals[valid_mask]), **kwargs)
|
||||
|
||||
if False:
|
||||
l = ax.errorbar(snr_sigma_factor, time_accuracy, yerr=time_accuracy_std, xerr=snr_std, **kwargs)
|
||||
else:
|
||||
l = ax.plot(snr_sigma_factor, time_accuracy, **kwargs)
|
||||
|
||||
|
||||
# set color if not yet set
|
||||
template_dt_colors[a] = l[0].get_color()
|
||||
|
|
Loading…
Reference in a new issue