diff --git a/simulations/11_pulsed_timing.py b/simulations/11_pulsed_timing.py index a7aedde..c2699e1 100755 --- a/simulations/11_pulsed_timing.py +++ b/simulations/11_pulsed_timing.py @@ -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()