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 steps (−0.002 to +0.017 s every 15–50 min) and never by 0.49 s; their stamps follow the PC. 1,066 cases of 2.5 h or longer have no correction at all.
| Parameter | Value | Status | From |
|---|---|---|---|
| SNUADC frequent-correction steps | +5 to +15 ms (median +10), 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, 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.480 − 0.006 = −0.486 s. 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.498 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. |
| 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. |
| Long SNUADC recordings with no correction at all | open | 1,066 cases of 2.5 h or longer show no SNUADC correction, although at the step-mode median of −63 ppm a 0.49 s step falls due within about 2.2 h. Slower units, a third recorder mode, or both; shared bursts point to slower units (about −36 ppm where the BIS rate is known, The stamp sawtooth model for SNUADC and BIS, due only after about 3.8 h). The Solar8000 route cannot settle it: its rates shrink toward zero in recordings under about 4 h (The SNUADC clock through the Solar8000 numerics, whole release). |
Limitations¶
The 2 s limit and the same-jump test can miss corrections during gaps. The cases with no correction at all are not yet explained (slower units, a third recorder mode, or both); the shared bursts point to slower units (Long SNUADC recordings with no correction at all).
Open questions¶
- Recordings that never correct their clocks (unexplained phenomenon). Some recordings never correct their clocks within the 2 s test. Slower units, a third recorder mode, or both, could explain it. The shared bursts point to slower units (about −36 ppm where the BIS rate is known; Long SNUADC recordings with no correction at all); their drift units have not been compared with the rest. Followed up on The stamp sawtooth model for SNUADC and BIS.
Code¶
Figures¶