Skip to content

profiles

Declarative import profiles for instrument exports and other column files.

Test equipment (time-interval counters, PTP/SyncE testers, frequency counters) exports CSV files whose layout differs per vendor and firmware. A profile describes one layout in a few TOML lines, so a new instrument needs no Python code:

.. code-block:: toml

name = "my-tic"
description = "53230A time interval, DUT 1PPS minus REF 1PPS, one reading per line"
value_column = 0          # index or header name
units = "ns"              # s, ms, us, ns, ps
quantity = "te"           # te: local - reference; offset: reference - local
tau0 = 1.0                # sample interval when there is no time column

# optional
time_column = "Time"      # index or header name
time_format = "unix"      # unix | iso | mjd | elapsed (seconds from start)
time_units = "s"          # for unix/elapsed
delimiter = ","           # default: auto (comma, semicolon, tab or spaces)
comment = "#"
skip_rows = 0             # lines to skip before the header or data
header = "auto"           # true | false | auto
extra_columns = ["MeanPathDelay"]

Use -f profile:NAME for a built-in profile or -f profile:path.toml for your own. Built-ins cover generic layouts only; vendor-specific profiles are added from sample exports that users contribute (issue #35).

load_profile(ref)

A built-in profile name, or the path of a TOML profile file.

parse_with_profile(lines, prof, name='data', tau0=None)

Parse lines with a profile; returns a series in ntpstats convention (reference - local).