Pulse: SNR vs Time accuracy: optional errorbar

This commit is contained in:
Eric Teunis de Boone 2023-05-19 00:56:59 +02:00
parent f7a68ef68a
commit 01237a7386
1 changed files with 10 additions and 1 deletions

View File

@ -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()