Detect Clock Jitter from Timestamps
Given a list of edge timestamps from a logic analyser, compute period jitter statistics: mean period, peak-to-peak jitter and RMS jitter.
Constraints
- Input is a sorted list of timestamps in nanoseconds.
- Fewer than 3 timestamps must raise ValueError.
- Return a dict with mean_period, pp_jitter and rms_jitter.
- RMS jitter is the standard deviation of the periods.
- No pandas.
1def jitter_stats(timestamps):2 # TODO3 return {}