Reading the stamps¶
Fit drift and corrections from the record time stamps themselves, against the number of samples each record holds.
| Techniques | Sawtooth fit, Coincident jumps, Units from drift |
Studies¶
| Study | Date | Status | Summary |
|---|---|---|---|
| When each device's clock is corrected, in every recording | 2026-10-19 | draft | From the steps between records in all 6,388 recordings: the BIS is corrected every 8,192 s and the Primus every 7,230 s, on their own timers (the first correction comes at any time after the device starts); the SNUADC is reset when 0.49 s of drift has built up. With the full rerun of the correction fit, it gives each device's drift against the recorder PC in 4,728 BIS and 2,728 SNUADC recordings, and shows that the Primus's 20–23 s AWP pauses belong to its correction cycle. Every rate here is relative to the recorder PC, whose own clock drifts and is corrected. |
| Identifying the recording setup of every case | 2026-10-18 | open | Recognising which equipment made each recording, from its serial ports and, where those fall short, from clock fingerprints, so that per-setup values can be used for every case. |
| How often each device is corrected | 2026-10-17 | current | The devices re-synchronise in different ways: SNUADC when its drift reaches about half a second, BIS on a fixed 8,192 s timer, and the Primus by small steps about every two hours that do not keep up with its drift (+104 ppm, measured later by breath matching). |
| Recorder PC clock steps and recording pauses | 2026-10-17 | current | A step of the recorder PC clock would move every device's stamps at once. Searching all 6,388 files for such simultaneous jumps found none of 0.5 s or more; what moves everything together is recording pauses. |
| Records out of order at SNUADC resets, and where the lost time goes | 2026-10-17 | current | At every SNUADC reset the five records after it are written out of order: two continue the old timing and three start the new. Put back in order, the waveform runs on with no samples missing; the 18–20 ms lost at each reset goes missing inside the last old-timing record, and an extra zero sample follows. |
| SNUADC stamp arithmetic | 2026-10-17 | current | Between corrections the SNUADC block stamps run −0.95 ppm against the sample count: each 0.2 s increment is about 0.19 µs short. This, not clock drift, is the "about −1 ppm" seen in frequent-correction mode. |
| The vitaldb package's loading conventions | 2026-10-17 | current | The vitaldb Python package sets time zero from the tracks loaded, places waveform blocks by rounding their stamps up to a sample, and lets overlapping blocks overwrite each other. Each choice moves or loses samples. |
| Time zeros and loaded subsets | 2026-10-16 | current | A VitalDB time "from the start" depends on which tracks were loaded: loading a subset moves the zero to that subset's first record, seconds or hours later. The arrhythmia database's annotations count from the full file's zero. |
| The stamp sawtooth model for SNUADC and BIS | 2026-10-12 | current | Fitting each track's record stamps against its sample count as a drift with corrections (a sawtooth) puts SNUADC and BIS on one timeline without any artefact. Checked against shared bursts, the EEG–ECG timing error falls from about 790 ms on the recorded stamps to 33 ms with one constant per SNUADC mode in the pilot, and 42 ms over the whole release. |
| Clock corrections in every file | 2026-10-11 | current | 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. |
| Physical units, shared drift and time order | 2026-10-11 | current | Device drift rates cluster into units: about 8 SNUADC boards and 8–18 BIS monitors. Part of the drift is shared by both devices of a case and changes between cases: the recorder PC's own rate. Case order carries no time information. |
Observations from these studies¶
| Observation | Status | Summary |
|---|---|---|
| About 20 ms of signal lost at every SNUADC reset | established | At each step-mode reset the acquisition pauses for about 20 ms inside the last record before the new timing, and that time is never sampled: 17.7 ms on the sample count (Signal lost at a SNUADC step-mode correction), once the filler sample is counted. Every record still holds 100 samples, so nothing in the file shows it. |
| 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. |
| An extra zero sample after most resets | established | Most SNUADC resets (335 of 392) contain one sample that reads 0 in every channel at once, a little after the reset. It carries no time of its own: the signal either side runs on as if it were not there. |
| Case ids carry no time order | established | Dates are shifted and case ids are shuffled: neighbouring ids are no more alike in device drift or port than random pairs. |
| 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). |
| Every case starts at 2100-01-01 00:00 UTC | established | The release shifts each case to the same start, removing the date and the time of day. Within a case all times keep their spacing. |
| Every time is quantised, and fiducials inherit it | established | A time on a grid of step Δ carries an error of Δ/√12 (1 SD). In VitalDB that is 0.58 ms for a 500 Hz sample, 2.3 ms for BIS EEG, 0.8 ms for the arrhythmia annotations' 1/360 s grid, and up to ±17 ms for PPG fiducials taken on raw samples, which lock to the 33.3 ms frame. |
| 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. |
| Recording pauses of about 20 s | established | In 29% of files every device jumps forward together, by a median 19.6 s: the recorder paused. Data are missing there, and the stamps show it honestly. The pauses run on a 5-hour timer: consecutive pauses in a recording are 5 h apart (plus the pause) in 86% of cases, and the first comes at any time after the recording starts. |
| 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. |
| SNUADC stamps run −0.95 ppm against the sample count | established | Between corrections each 0.2 s record stamp increment is about 0.19 µs short: stamps run −0.95 ppm from the sample count in 88% of files (both SNUADC modes). It is arithmetic, not clock drift. The other 12% sit between −0.90 and −0.55 ppm. |
| 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. |
| The EEG–ECG offset is fixed by the SNUADC correction mode | established | After the stamp model, BIS EEG still lags the SNUADC ECG by a constant: −804 ms in step mode and −660 ms in frequent-correction mode over the whole release, tight within a port or unit. The mode, a property of the setup, sets the constant. |
| The Primus AWP stops for about 21 s every 7,230 s | established | In 5,502 recordings the Primus airway-pressure waveform has gaps of 19–23.5 s (whole messages of 0.48 s, mostly 21.12 s) that recur every 7,230 s, the Primus's correction interval; a clock correction follows about 21.6 s after. The CO₂ waveform carries on through 90% of them. The 21 s of AWP are lost, not merely re-stamped. |
| The SNUADC correction mode belongs to setups, not dates | established | The frequent-correction mode is confined to a few setups, can switch either way within a case, and marks a period in at most one setup. It is not a global software change. |
| The oximeter's frame clock is a fingerprint of the setup | established | The rate of the oximeter's 30 Hz frame clock against the SNUADC sample clock is fixed per recording setup (+7 to +92 ppm across setups) and repeats within about 2 ppm inside a recording, so it identifies the hardware a recording was made on. |
| Time zero depends on the tracks loaded | established | A file's time zero is its first record of any track. Loading only some tracks moves the zero to their first record: seconds later, and up to hours. |
| Stamp-based loaders lose samples at overlaps | likely | Loaders that place samples by their stamps onto a grid overwrite samples where stamps overlap: about 0.48 s at every SNUADC reset, and one sample about every 35 minutes from the stamp arithmetic. |
| In 34 files the SNUADC records overlap throughout | open | In 34 files the SNUADC records step back over their neighbours far more often than resets explain: in 20 of them 4–95% of all record junctions overlap, by up to about 100 ms. The reset-order rule matches there by coincidence. |
| 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). |
The approach¶
The idea. A recorder that receives blocks of samples stamps each block with a time. If the device sends no time of its own, the recorder's stamps are its model of the device's clock: between corrections they advance by exactly the number of samples received at the nominal rate, and where the model has drifted too far from the recorder's own clock, the recorder pulls it back. So the stamps, compared with the sample count, show the drift and every correction, with no signal content needed.
What it gives. For each device: its correction rule (a drift threshold, a fixed timer, re-anchoring at gaps), its drift between corrections, and the size and timing of each correction. Rates cluster into physical units, and a term shared by every device in a recording reveals the recorder's own clock. Jumps that hit every device at once are recorder events (pauses, clock steps).
How. Split each track into runs that join to within half a sample; classify the jumps between runs by their device's signature and by whether every track of the device jumps together; fit a line through each stretch, a sawtooth across corrections, one rate per recording from whole teeth (correction to correction).
Pitfalls. Stamps show only what the recorder knew. Time the device lost without telling the recorder (a sampling pause, a dropped sample) is invisible to them, and stamp arithmetic can masquerade as drift. A rate read from stamps is relative to the recorder, never absolute. Check the result against an event seen on both clocks (One event, two clocks) or a clock carried in the signal (Clocks carried in the signal).
Techniques¶
- Sawtooth fit: Model a clock as a straight drift that is pulled back at correction events, and fit the rate from whole teeth (the correction divided by the time since the previous one).
- Coincident jumps: Look for stamp jumps that appear in several independently clocked tracks at the same moment. A step of the common clock moves all of them; a device's own correction moves one.
- Units from drift: Infer physical units from their drift rates: fit Gaussian mixtures with a shared per-unit width and let a model-selection score choose how many units there are.