Skip to content

Clock corrections in every file

A scan of all 6,388 files for the jumps where the recorder re-synchronises a device's stamps. Each device type has its own correction signature; only SNUADC and BIS correct clearly enough to measure their drift.

Date 2026-10-11
Status current
Methods Reading the stamps, Does the waveform run on?
Techniques Coincident jumps, Junction scores, Null controls
Clocks SNUADC sample clock, BIS clock, CardioQ clock, Primus clock, Recorder PC clock
Devices SNUADC, BIS monitor, CardioQ, Primus anaesthesia machine, Vital Recorder
Variables ECG lead II (SNUADC), Arterial pressure (SNUADC), Plethysmogram (SNUADC), BIS EEG, Capnogram (Primus)

Background

Between corrections, a device's waveform stamps advance by exactly the number of samples each record holds. A correction shows as a jump at a record boundary. If the jump is a clock correction, its size divided by the time since the previous one is the device's drift against the recorder PC.

Data

All 6,388 original .vital files of the release (102.4 GB), read with the shared reader. 1.4 CPU-hours; only aggregates left the analysis machine.

Method

Each waveform track was split into runs of records that join to within half a sample. Runs shorter than 5 s were folded into the boundary between the long runs either side (they come in bursts), leaving 94,152 boundaries. A boundary counted as a correction candidate when its jump was at most 2 s, it was not a step back in time, and every other waveform track of the same device jumped by the same amount (within 2 ms) at the same moment. Drift came only from a candidate whose previous boundary was also a candidate, so a case's first interval was never used: drift = jump ÷ time since the previous correction, one duration-weighted median per case and device.

Around candidate boundaries, and at random joins inside long runs as controls, a few seconds of ECG, arterial pressure, plethysmogram, EEG and CO₂ were kept, to test the beat interval and the sample-to-sample step across each join.

Results

Device Candidates Usable for drift Typical jump Signature
SNUADC 3,878 818 −0.487 s A fixed pull-back of about 0.49 s, as one overlap or a burst of short records
BIS 7,655 1,974 +0.15 s (5–95%: +0.01 to +0.41 s) The run is cut every 8,192 s; the gap at the cut is the drift since the last cut
CardioQ 9,931 5 spread across ±2 s Irregular re-anchoring; not usable for drift
Primus 66 2 scattered Waveforms come in sessions separated by long gaps
  • A correction moves the whole device. 13,955 of 13,958 sub-second SNUADC overlaps hit every SNUADC track at the same moment by the same amount; for BIS, every one.
  • No time is lost at a SNUADC step, at this resolution. Butting the samples together keeps the beat-to-beat interval normal in 59% of ECG joins; inserting the jump as a real gap does so in only 17%.
  • The records inside the burst join badly. At their joins the sample-to-sample step is larger than 95% of normal steps in 60–96% of cases, against about 4% at ordinary joins. (Later explained: the records are written out of order; see Records out of order at SNUADC resets, and where the lost time goes.)
  • Small positive SNUADC gaps are real data loss, not corrections.
  • Two other SNUADC behaviours. 120 cases correct in small forward steps (about 11 ms in the median recording, 7–16 ms p10–p90 across the 26 whose steps were sized; a median of 1.1 an hour per recording, p10–p90 0.5–3.8; tools/frequent_steps_summary.py) and never by 0.49 s; their stamps follow the PC. Outside that mode, 1,066 cases of 2.5 h or longer have no 0.49 s correction: 988 have none at all and 78 a single small step.
Parameter Value Status From
SNUADC frequent-correction steps +7 to +16 ms between recordings (median +11), about one an hour (median 1.1 per hour per recording) measured Clock corrections in every file

Discussion

A correction can be recognised by its pattern (SNUADC's 0.484–0.492 s step, BIS's cut at 8,192 s), by every track of the device jumping together, and by an implied rate that fits the case. Other jumps on these devices are gaps or dropouts. Within a case the rate holds to about 0.2 ppm for the SNUADC and 0.6 ppm for the BIS (interquartile range), so one rate per device per case is enough. The drift values from this scan are wrong for some cases; the stamp sawtooth model (The stamp sawtooth model for SNUADC and BIS) replaced them. The SNUADC jump here (−0.487 s median) is measured from the start of the run before it, so it includes the −0.954 ppm stamp arithmetic built up over that run (SNUADC stamp arithmetic): over the median run of 6,198 s that is 5.9 ms, and −0.4804 − 0.0059 = −0.4863 s, against the −0.487 s median (about 0.5 ms left). The reset itself steps the stamps by −0.4804 s (SD 0.7 ms, all 3,417 resets in the release; When each device's clock is corrected, in every recording), and the true correction is about 0.500 s once the 17.7 ms of signal lost at the reset is counted (SNUADC step-mode correction size). The Primus row is a miss, not an absence: the Primus does correct, every 7,230 s by whole 16 ms samples, but its AWP pauses at the same moments while CO₂ carries on, so the same-jump test rejected nearly all of them (When each device's clock is corrected, in every recording).

Observations it supports

Observation Status Summary
All SNUADC channels share one clock established Every SNUADC waveform track of a case (ECG leads, ART, PLETH, CVP) has the same first stamp, the same record timing and the same corrections. They are stamped together.
Device clock drift depends on the setup established The drift of the SNUADC's and the BIS's timestamps against the recorder PC is largely set by the setup: knowing a recording's PC key (the serial ports of its four core devices) puts the SNUADC's drift within 3 ppm of its setup's median in 97% of cases and the BIS's in 83%, against 34% and 17% for the release's median. On the whole release's correction intervals the same test gives 71% and 60% (Identifying the recording setup of every case).
Five records out of order at every SNUADC reset established At each step-mode reset the five records after it are written in the wrong order: two continue the old timing and three start the new, interleaved. Read in file order, or sorted by stamp, one second of signal is scrambled.
Long SNUADC recordings with no correction at all established 1,066 cases of 2.5 h or longer, outside the frequent-correction mode, show no 0.49 s SNUADC correction (988 none at all, 78 a single small step), although at the step-mode median of −63 ppm a 0.49 s step falls due within about 2.2 h. Explained by the Vital Recorder's rules: a fast converter is reset only once its count is 0.5 s ahead of the PC, and a new segment restarts the count, so a slower fast unit, or one whose segments are short, never reaches it. 81.8% of the 1,238 with a hum rate sit inside the window the rules allow, and 98.5% within the hum's noise (How the Vital Recorder stamps SNUADC records, tested against the release). There is no third mode.
SNUADC sends no time; the recorder stamps by count established The SNUADC board streams samples with no time stamps. Every SNUADC time in VitalDB is the recorder's model of the board's clock: the sample count at the nominal rate, pulled back when it drifts too far.
Small positive SNUADC gaps are real data loss established Forward jumps of under a second in SNUADC stamps are missing data, not clock corrections: the beat interval across them fits the gap better than the samples butted together.

Limitations

The 2 s limit and the same-jump test can miss corrections during gaps. The cases with no correction at all are fast units that never get half a second ahead within a segment (How the Vital Recorder stamps SNUADC records, tested against the release, Long SNUADC recordings with no correction at all). The join-test shares (59% and 17%; 60–96% against about 4%) come from per-boundary rows kept only on the analysis machine; the saved summary (results/sync_full/full.json) holds their quantiles, which agree but do not give the shares.

Code

Figures

Five step-histogram panels comparing controls, correction candidates and other boundaries.
Continuity of the signal across corrections and other record boundaries, against boundaries with no correction.
Three stacked histograms of jump size in seconds, one per device.
Size of the stamp jump at each clock correction: SNUADC steps back about 0.48 s or makes millisecond corrections; BIS jumps forward 0–0.5 s; CardioQ is broad.