-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confidence intervals for deviations #47
Comments
From the above I have forgot the noise-estimation completely. On the input side we need a noise-estimate from the user (e.g. alpha-parameter, noise-PSD exponent), or an indication of what noise-estimating function to use e.g. "B1" (see NIST SP1065). on the output side for each (tau, dev) pair the estimated noise-type shown as an integer alpha could also be output. With so many output parameters I am now leaning towards a ResultObject so that one doesn't have to remember positional output-arguments... |
I definitely like the idea of using a |
It looks like the latest Stable32 doesn't use the simple formulas of NIST SP1065 but instead an algorithm by Greenhall available over here: |
Hello, Trying to examine if it is really necessary to break the API again :
Not sure yet what to do with the output "estimated noise" integer value. Another possibility would be to write a wrapper object, leaving current functions as they are. |
I've started implementing a proof-of-concept results object here. It's not ready yet, but I have added an
Thoughts? I could make a pull request if it would make more sense to continue discussion there (I have not yet since this is nowhere near ready). |
Hi, Here is my take on this issue : fmeynadier/allantools@fab5bc9 I propose a simple front-end object (that could also use the results object proposed above...) that encapsulates the existing functions and gives room for adding other inputs/outputs/methods. You can test it simply by getting frontend.py and call it along those lines (it should be possible to get a fancier call, but you get the idea) :
|
@fmeynadier I'm personally not a fan of that style of giving inputs since it generally seems like it overuses objected oriented features to the point of being too verbose (it isn't in this simple case, but I would worry that it could become that way if more is added to it). Instead I prefer keyword arguments to functions which still allows for a lot of flexibility. That said, the nice thing about your proposal is that we can have both options, so whatever style the user prefers is viable. Some suggestions:
|
Thanks for the comments. I agree : I am no fan either of full OO style, and I confess not being very good at picking names... So, please have a look at fmeynadier/allantools@a77c07a , here are my answers :
|
Looks good. I think you make a good point with using the One final naming suggestion: maybe |
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?
The text was updated successfully, but these errors were encountered: