We should add confidence intervals (errorbars) for the computed deviations.
For most common deviations the equivalent degrees of freedom are already computed in uncertainty_estimate()
However it looks like this will require a change in the API, both for the calling signalture which is now:
mdev(data, rate=1.0, data_type="phase", taus=None)
to something like:
mdev(data, rate=1.0, data_type="phase", taus=None, ci=None)
where the ci parameter would be used to select between simple 1/sqrt(N) errorbars and the more complicated calculation based on edf. In theory one could allow asymmetric confidence intervals, but perhaps this is not required? For example ci=0.683 would give standard error (1-sigma) confidence intervals.
Also on the output-side we need an API change since the return values are now:
(taus, devs, deverrs, ns)
A straightforward change would be to add the lower and upper confidence intervals:
(taus, devs, devs_lo, devs_hi, ns)
But I wonder if this starts to be too many variables to remember when calling the function.
An alternative would be a DevResult object where the outputs would have names:
myresult = allantools.adev(...)
myresult.taus
myresult.devs
myresult.devs_lo
..and so on...
any other ideas or comments on this?
We should add confidence intervals (errorbars) for the computed deviations.
For most common deviations the equivalent degrees of freedom are already computed in uncertainty_estimate()
However it looks like this will require a change in the API, both for the calling signalture which is now:
mdev(data, rate=1.0, data_type="phase", taus=None)
to something like:
mdev(data, rate=1.0, data_type="phase", taus=None, ci=None)
where the ci parameter would be used to select between simple 1/sqrt(N) errorbars and the more complicated calculation based on edf. In theory one could allow asymmetric confidence intervals, but perhaps this is not required? For example ci=0.683 would give standard error (1-sigma) confidence intervals.
Also on the output-side we need an API change since the return values are now:
(taus, devs, deverrs, ns)
A straightforward change would be to add the lower and upper confidence intervals:
(taus, devs, devs_lo, devs_hi, ns)
But I wonder if this starts to be too many variables to remember when calling the function.
An alternative would be a DevResult object where the outputs would have names:
myresult = allantools.adev(...)
myresult.taus
myresult.devs
myresult.devs_lo
..and so on...
any other ideas or comments on this?