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

Deviation at sample rate #137

Closed cmarkus413 closed 1 year ago

cmarkus413 commented 1 year ago

Hello,

I am confused why the Allan deviation at the sample rate is not equal to the standard deviation of the data set. For example:

import numpy as np
import allantools

fake_data= np.random.normal(0, 1, 1000)
taus = np.arange(1, int(len(fake_data)/2))
taus, ad, ade, ns = allantools.oadev(fake_data, 1.0, taus=taus)

print(f'stdev: {np.std(fake_data)}')
print(f'adev(1): {ad[0]}')

> stdev: 1.024525966134758
> adev(1): 1.7235083188043996

Why is this the case? Calculating manually they should be equal.