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

avoiding numerical issues in tau generation #144

Closed zpillio closed 1 year ago

zpillio commented 1 year ago

In taus='all' case 'taus' are calculated from integer window sizes, and calculating back the window sizes and using 'floor' can produce duplication which is filterred later out.

To avoid it, 'floor' is replaced with 'round'.

The original tau validation was not compatible with using 'floor', which can cause rounding up leading to larger than maximum window size. To solve it, windows size is calculated first and used for validation.