Skip to content

interop

Data exchange with other frequency-stability tools.

Stable32 (W. Riley; free from IEEE UFFC) reads and writes plain ASCII data files: one or more comma- or space-delimited numeric columns, optional timetags (usually MJD) in the first column, and non-numeric header or comment lines, which it skips. :func:read_stable32 and :func:write_stable32 use that layout, so a dataset can be analysed in both tools and the results compared.

Phase data are time deviations in seconds; frequency data are fractional (dimensionless). Frequency data are integrated to phase on input (x[0] = 0, x[i+1] = x[i] + y[i] * tau0), as Stable32 does for its phase-based statistics.

TimeLab (J. Miles, KE5FX): its native .tim format is not publicly documented, so it is not read yet. Plain phase or frequency columns, which :func:write_stable32 writes with timetags=False, are the usual way to move data into it. Sample .tim files are welcome in issue #33.

read_stable32(source, data_type='phase', tau0=None, column=-1, name=None)

Read a Stable32-style ASCII data file.

column selects the data column (default: the last). With two or more columns, a first column that looks like MJD is used as the timetag; otherwise samples are spaced tau0 apart (required then). A tau0 derived from timetags is rounded to 6 significant digits; pass it explicitly when more precision matters. Frequency data (data_type="freq") are integrated to phase; zero or missing frequency values are gaps, as in Stable32.

write_stable32(series, dest, data_type='phase', timetags=True, tau0=None, max_gap=3.0)

Write series as a Stable32 data file; returns the number of rows.

The series is first put on a uniform grid (:meth:TimeSeries.to_uniform). Gaps are written as 0 frequency values (Stable32's gap marker) or, for phase with timetags, as missing timetags; phase without timetags cannot mark a gap and is refused if it has one. Values carry 15 significant digits.