Mercurial > hg > python-allan
diff allan.py @ 1:ebc4e1d7c32f
Add convenience functions to generate an integration times vector
author | Daniele Nicolodi <daniele@grinta.net> |
---|---|
date | Tue, 24 Mar 2015 18:10:10 +0100 |
parents | 3dcd4cfd8f82 |
children | ff2192f47448 |
line wrap: on
line diff
--- a/allan.py Fri Apr 18 18:44:54 2014 +0200 +++ b/allan.py Tue Mar 24 18:10:10 2015 +0100 @@ -4,7 +4,7 @@ import numexpr __all__ = ['outliers', 'detrend', 'fastdetrend', - 'adev', 'xadev', 'xmdev', 'xtdev', 'xavar', 'xmvar', ] + 'adev', 'xadev', 'xmdev', 'xtdev', 'xavar', 'xmvar', 'tau' ] def outliers(y, alpha=6, remove=False): @@ -50,6 +50,14 @@ return y +def tau(expmin=0, expmax=4): + return np.ravel(np.power(10, np.arange(expmin, expmax))[:,np.newaxis] * np.arange(0, 10)) + + +def tau124(expmin=0, expmax=4): + return np.ravel(np.power(10.0, np.arange(expmin, expmax))[:,np.newaxis] * np.array([1, 2, 4])) + + def adev(x, tau, sampl=1.0): """Allan deviation"""