aewallin / allantools

Allan deviation and related time & frequency statistics library in Python
GNU Lesser General Public License v3.0
226 stars 77 forks source link

Validate magnitude of noise against ADev plot #75

Open jondoesntgit opened 6 years ago

jondoesntgit commented 6 years ago

Hello,

Are there any tests in the test suite that validate the stochastically generated noise against the Adev plots?

For example (half-pseudocode):

samples = int(1e6)
data = noise.white(samples) * noise_magnitude
tau, dev, _, _ = 

# fit a line of slope -1/2 to log(tau), log(dev)
# todo...

assert line.y_intercept == noise_magnitude
aewallin commented 6 years ago

IIRC all current tests are with fixed datasets and against xDEV values from Stable32 or another program.

Testing with random data against theoretical predictions is a good idea, but note that:

The confidence interval work is unfinished. I worked on the noise-ID algorithms in January, but didn't settle on how (in what order etc) the noise-ID should be done: http://www.anderswallin.net/2018/01/power-law-noise-identification-for-allantools/ In principle the Stable32 source is now available if one wanted the same behavior as this "golden" code..