Skip to content
github-actions[bot] edited this page Sep 30, 2026 · 8 revisions

Python API

from ntpstats import load, load_one
from ntpstats.stability import series_stability
from ntpstats.analysis import summary, compare

s = load_one("/var/log/chrony/measurements.log", peer="192.0.2.10")
print(summary(s)["range_90"])
for r in series_stability(s, kinds=("oadev", "tdev"), ci=0.95):
    print(r.kind, r.taus, r.dev, r.lo, r.hi, r.alpha)

A TimeSeries has t (POSIX seconds), offset (seconds, reference − local), extra (per-sample columns such as delay) and meta.

Module Contents
ntpstats.series TimeSeries
ntpstats.parsers load, load_one, per-format parsers
ntpstats.stability estimators, confidence intervals, noise ID, dynamic
ntpstats.edf equivalent degrees of freedom
ntpstats.analysis summary, detrending, outliers, compare
ntpstats.network delay floor, wedge, FPP, min-delay filter
ntpstats.filters Kalman filter and RTS smoother
ntpstats.estimators estimator API and reference algorithms
ntpstats.simulate clocks, paths, scenarios with ground truth
ntpstats.bench benchmark runner
ntpstats.sntp, ntpstats.nts measurement clients (NTPv4, RFC 9769 interleaved, NTPv5, NTS, NTS pools)
ntpstats.roughtime Roughtime client, chained measurements, malfeasance reports
ntpstats.spectrum, ntpstats.noisefit PSDs, L(f); power-law noise fit h_α
ntpstats.hat, ntpstats.holdover N-cornered hat / Groslambert covariance; holdover prediction
ntpstats.research CGGTTS, RINEX clock, Circular T, RIPE Atlas, NTP Pool
ntpstats.masks, ntpstats.report masks, HTML reports

Clone this wiki locally