allantools icon indicating copy to clipboard operation
allantools copied to clipboard

next.release

Open aewallin opened this issue 5 years ago • 12 comments

This is a list of to-do features/issues that will not make it into 2019.07

Algorithms:

  • [ ] make lag-1 autocorrelation the default noise-ID algorithm and compute confidence intervals (#47) from this
  • [ ] gap-filling algorithm(s) for frequency data (#56 and #60)
  • [x] GCOV (Vernotte/Rubiola et al) could be interesting - for three-cornered-hat analysis
  • [x] PVAR/PDEV (Danielson et al) ?
  • [ ] relation between time-series, xDEV, phase-noise (dBc/Hz, dBrad/Hz), rms jitter

Test and Build:

  • [ ] #75 test noise-generators for expected xDEV (this is already done in test_noise_kasdin.py, but could be documented better)
  • [x] improve test coverage on coveralls
  • [x] add new python-versions (?) or OSs (?) for travis-testing. Travis should be able to test on Mac OSX and Win also now.
  • [x] conda seems to be gaining in popularity - consider a conda package? #109

Dependencies:

  • [ ] maybe revisit #44 (again!) - can/should we get rid of the scipy dependence?

aewallin avatar Jul 27 '19 17:07 aewallin

C-code for PVAR is available in SigmaTheta: https://sourcesup.renater.fr/scm/browser.php?group_id=4224&scm_plugin=scmgit&path=/anonscm/gitweb?p=sigmatheta/sigmatheta.git;a=blob;f=source/pdev.c;h=2a1e2aca1ed5944fc8938a30674a9934ec8a3105;hb=HEAD

aewallin avatar Jul 28 '19 10:07 aewallin

Anders, I have some Matlab/Scilab code for several things discussed here:

  1. psd2allan: Compute oadev or mdev (and, in principle, other types as well) from a given S_y(f) PSD (I have almost finished porting it to allantools and will send a merge request in the near future)
  2. several approaches to estimate the mdev if there are gaps: This is an extensive field with many pitfalls... I don't want to publish all this in this issue, but if you are interested, just contact me at my PTB email address.

EBenkler avatar Sep 19 '19 21:09 EBenkler

I would welcome a conda package. Actually, we already build it from the PiPy package for our PTB-internal conda repo.

EBenkler avatar Sep 19 '19 21:09 EBenkler

Thanks for the comments.

  • For psd2allan, could you think about tests for the algorithm also.
  • If there is consensus and publications on gap-filling algorithms then I think they can be included. Without a publication/reference maybe not.
  • the conda package should not be that difficult to automate - I'll try it soon.

aewallin avatar Sep 20 '19 06:09 aewallin

if you can, please test the conda package and report any issues: https://anaconda.org/conda-forge/allantools

aewallin avatar Sep 22 '19 15:09 aewallin

tested installation of the conda package, works. No issues found so far, thanks!

EBenkler avatar Sep 22 '19 15:09 EBenkler

Hi @aewallin !

I have been working in the past couple of weeks on an updated version of allantools, with some of the features which were missing so far. It's still under development, but it should generally work as expected. I will keep working on it in the upcoming weeks and add new features, but I wanted to know what you thought of the concept first :)

I don't really use GitHub anymore, so it's unofficially forked on GitLab: https://gitlab.com/amv213/allantoolkit When it reaches a mature enough stage of development I would be more than happy to merge it here.

As far as I have tested, the code exactly replicates Stable32 results (v1.61). The only difference is on the confidence intervals: for some reason the Chi-squared confidence intervals calculated by Stable32 are slightly different than what I get with Scipy's chi-squared function ... even if the equivalent degrees of freedom I get are the same ...

Don't hesitate to let me know what you think!

Changelog:

  • new API (based on NamedTuple)
  • Auto noise ID for all deviation types (Lag1 ACF, B1, R(n))
  • Bias correction for all deviation types
  • Non-naive EDF / confidence interval calculation for all deviation types
  • Fast Theo1 algorithm
  • Many-tau tau generation
  • Streamlined code architecture
  • Support for tables and constant mappings from .yaml file
  • Updated documentation and docstrings
  • Type hinting
  • Streamlined pytests
  • Additional tests
  • New demo test dataset based on optical lattice clock data
  • General gap resistance for most deviation types (to be tested)
  • Logging

Next steps (?):

  • Development of the Dataset and Plot API to offer more functionalities (maybe replicating Stable32 tools?) and better plots
  • New deviation types
  • New utility functions
  • Port and write new markdown documentation (+ jupyter notebooks support), add tutorials, examples, etc...
  • ...

Merry Christmas to all!

amv213 avatar Dec 25 '20 11:12 amv213

Wow, that seems like a lot of work - good job!

I would encourage you to submit pull-requests in smaller pieces that allow myself or others to review code/tests/results in much more manageable pieces.

I don't see a lot of discussion on the low level API in the issues or the mailing list. I suggest keeping the low-level API and perhaps adding a higher level one, if needed.

How large differences in confidence intervals to Stable32 do you see? If the differences are in the 2nd or more digit, this could be because an approximating function to the (inverse) cumulative chi-squared distribution. I can try to dig out the approximation used in Stable32 - if you are interested in exploring this further?

aewallin avatar Dec 27 '20 13:12 aewallin

Perfect, thanks!

Yes, the confidence interval differences I'm seeing are generally at the 3rd decimal digit for most deviation types. If you have time to find the approximation that Stable32 uses that would be amazing!! I'm more than happy to then try see if we can match results completely.

The low-level API change was just to handle the increased amount of dev outputs, because for every stability run I am now also returning averaging factors, identified noise type, and lower and higher confidence intervals. Now you could just do out = adev(...) and then get the individual fields with out.taus, out.devs, out.alphas, out.devs_lo, ... instead of having to unpack the tuple from the start and having to remember in which order everything comes out.

Of course, this is all quite flexible. Once the code is all ready I will certainly get in touch again to get help on how to best go about integrating changes, and to see which changes you would like and which are not necessary :)

amv213 avatar Dec 27 '20 16:12 amv213

@amv213 : my current understanding of how Stable32 approximates the inverse chi-squared cumulative distribution and how this leads to differences in computed confidence intervals compared to allantools is now posted in my blog: http://www.anderswallin.net/2020/12/fun-with-chi-squared/ There is a link to some preliminary code at the end.

It probably makes sense to split the confidence-interval discussion into a separate issue - if others feel that comparison of confidence intervals with Stable32 is useful now and in the future for the allantools codebase.

aewallin avatar Dec 29 '20 10:12 aewallin

Groslambert covariance now (2021 June) included. Documentation and tests to be added.

aewallin avatar Jun 05 '21 07:06 aewallin

this workflow should now run test coverage analysis and upload the results to coveralls: https://github.com/aewallin/allantools/actions/workflows/coverage.yml

aewallin avatar Nov 26 '23 18:11 aewallin