Clocks carried in the signal¶
Use a regular rhythm inside the recorded signal (a pacemaker, a monitor's frame clock, an output or mains line) as a third clock, independent of the clocks being tested.
| Techniques | Template beat timing, Phase-step detection |
Studies¶
| Study | Date | Status | Summary |
|---|---|---|---|
| The rebuilt PPG slip finder and its correction | 2026-11-13 | current | Fourth of the sawtooth series (Finding and placing each PPG frame slip finds the slips, The PPG sawtooth's period, its phase jumps, and the reversed sawtooth their grid, Where the PPG sawtooth stops where it stops). The slip finder is rebuilt around one rule: correct a step only when the evidence that it is a frame slip is strong, because a wrong correction puts a false step into real physiology. It judges each candidate on the shape of the pulse and, where there is one, on the arterial line, and corrects only one-frame steps. Checked against 172 blinded manual labels, a review of 174 corrections and sawtooths injected into real recordings, it called no held-out slip-free event a slip and 98% of the corrections reviewed were judged right. Its correction was then tested end to end against the arterial line in 2,976 recordings, which showed the first version made a third of them worse; rebuilt so each tooth closes exactly, it brings finger PAT closer to arterial PAT than the earlier method (median spread 9.46 against 11.17 ms in sawtooth recordings, 13.95 uncorrected), though it leaves more recordings worse than uncorrected (7.3% against 2.9%). physiosync 0.3.2, fit_ecg_ppg_delay(method="rebuilt"). |
| Where the PPG sawtooth stops | 2026-11-13 | current | Third of the sawtooth series (Finding and placing each PPG frame slip, The PPG sawtooth's period, its phase jumps, and the reversed sawtooth), rebuilt on 2 November and run on the full release on 3 November. With the new slip detector and the slip grid, stretches of 1.5 teeth or more without a slip are fewer than first reported: 1,072 stretches, 469 hours, in 796 of 5,714 recordings. Most of those inside a recording are two teeth long, and where the slips on either side lie on one grid, the step the grid predicts is usually there, missed because a ramp or a disturbance coincided with it. Where the phase moves across a stretch, it moves by quarter teeth. Some stretches look flat; the frame clock keeps its rate and phase through them; and the 586 recordings without any one-frame step show no hidden sawtooth, though many drift slowly. |
| The PPG sawtooth's period, its phase jumps, and the reversed sawtooth | 2026-11-13 | current | Second of the sawtooth series (Finding and placing each PPG frame slip finds the slips). Within a recording the slips fall on a grid of one tooth length, piecewise: the grid holds for long runs and then jumps. On all 5,714 recordings the jumps move the phase by a whole number of quarter teeth far more often than by chance (375 of 548 without a break in the signal, against 132; 79 of 146 across one, against 35), and sharp steps of a fraction of a frame in the PPG chain lock to quarter frames too: the slips appear to be made in units of a quarter frame, 1/120 s. Within a run the grid is not exact: slips scatter by about 2 s around it, mostly anchored to it. Two setups run the sawtooth backwards. Cuff inflations do not explain the jumps. |
| Finding and placing each PPG frame slip | 2026-11-13 | current | First of a series characterising the ECG–PPG sawtooth in detail (with The PPG sawtooth and its correction as the overview, The PPG sawtooth's period, its phase jumps, and the reversed sawtooth and Where the PPG sawtooth stops next). A new detector tests every point of a series of three fiducials per pulse for a sharp, persistent step of exactly one frame, confirms it against arterial pressure, uses the grid of the other slips and the earlier fit's slips as priors, and places each slip between two fiducials. Built on a benchmark of 273 recordings and run on all 5,714 with ECG lead II and PLETH. On held-out injected ground truth in 219 recordings it finds 88% of slips (the earlier fit 89%) with 3 false slips (the earlier fit 38) and places them two and a half times as closely. It also finds slips that lose a frame instead of gaining one. A blinded manual labelling of 172 real events, weighted to the whole release, puts its precision at 0.95 against 0.72 for the earlier fit, and its recall at 0.88 against 0.94. The final slip finder and correction, built on this detector, are in The rebuilt PPG slip finder and its correction. |
| The SNUADC rate from the mains hum, where the stamps cannot give it | 2026-11-11 | current | 57% of recordings carry no SNUADC stamp correction, so the working reference runs on a borrowed rate. Checked against the BIS through a second, independent path, the stamp model's rate (model5, capped by the recorder's 0.5 s rule) drifts by 9.5 ppm (23 ms/h, median). The mains hum gives each such recording its own rate, 12.0 ppm (29 ms/h): it cut the drift from 31 ppm on the earlier model (model3), but on model5 it only trims the tail. |
| Mains hum as an outside clock, and the recording PCs against the grid | 2026-11-09 | current | The SNUADC waveforms carry the mains hum at 120 and 360 Hz in 39% of recordings. The grid is regulated to its nominal frequency, so the hum is a clock outside the recording, and through it the recorder PC's rate against the grid can be measured where the SNUADC's own rate is known, from the recording's whole teeth or its setup's: the PCs run slow, about 13 ppm, and two stations stand apart (−57 and +7 ppm). One-correction "rates", line fits through one step, were dropped (9 November). |
| Monitor clocks in the waveforms' spectral lines | 2026-11-02 | current | Differences of the raw converter counts carry lines from the monitor's analogue outputs: a 240 Hz line in arterial pressure and plethysmogram (an output clock running 23–56 ppm slow against the SNUADC, the same in both), and a 30 Hz family in the plethysmogram on the oximeter's frame clock, whose 120 Hz member also reaches ECG and arterial pressure. Arterial pressure's 240 Hz pattern comes 0.37 ms before the plethysmogram's. First seen in six files; rebuilt on 273 recordings with public code. |
| Paced ECG as an independent clock | 2026-11-01 | current | Fixed-rate pacing gives a clock the recording chain cannot touch. Timing paced beats on three timelines shows that each SNUADC step-mode correction loses about 19 ms of signal, and that nothing else breaks the sample stream. |
| Arterial pressure against the monitor's 240 Hz cycle | 2026-10-28 | current | The arterial pressure's steps follow a 240 Hz output cycle that runs 23–55 ppm off the SNUADC clock. If its timing followed that cycle it would slide against the ECG by 4.17 ms each turn, or drift by up to 200 ms an hour. Neither happens: arterial pressure keeps time with the ECG to within about 1 ms. |
| The BIS EEG's 60 Hz line is not mains hum | 2026-10-28 | current | The BIS EEG carries a strong line near 60 Hz in about half of the recordings, but it does not follow the grid: it wanders by about 150 ppm from minute to minute, unrelated to the grid seen through SNUADC. It cannot check the BIS clock. |
| Recorder PC time adjustments from the mains hum (negative result) | 2026-10-28 | current | Comparing PC time (from SNUADC stamp corrections) with grid time (from the hum phase) could in principle show when the recorder PC's clock is adjusted. In VitalDB it cannot: the recordings that correct often enough have hum too weak to track. |
| How the Primus airway pressure is written at 62.5 Hz | 2026-10-28 | current | About one stored airway-pressure sample in nine repeats the previous one, in a fixed pattern of lines that is the same in every recording and does not drift. It is made before the data reach the file, by a scheme tied to the Primus clock but separate from CO₂'s, and not a plain hold, cascade or queue. A stored value is at most about one sample old. |
| The Primus CO₂ update grid | 2026-10-28 | current | The stored CO₂ changes about every 40 ms: a 24.974 Hz update grid that is not locked to the 62.5 Hz samples and slides through a full update every 40 s or so. Each stored value describes a 40 ms interval that closed 0–40 ms before its stamp. |
| What the stored waveform values say about the recording chain | 2026-10-28 | current | Successive differences of every stored waveform, over the whole release, show how each one was converted: no slew bound or coarse lattice, a 240 Hz output cycle in the arterial pressure and plethysmogram but not the ECG, the BIS EEG on an exact 0.05 µV grid, and the Primus waveforms resampled from slower internal rates. |
| One device delay for the PLETH across the release | 2026-10-18 | current | The stored ECG-to-PLETH delay was measured in 5,536 recordings, to the foot and to the steepest upstroke of each pulse. It has one peak (655.0 ms to the foot, 715 ms to the upstroke, in the median recording), no clusters by recording setup or SNUADC port, and no shift along the case order: one global device delay, 385 ms with an adopted R-to-foot finger PAT of 270 ms, fits the whole release, as Ruffolo et al. found in their own data. |
| 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. |
| The SNUADC firmware | 2026-10-13 | current | The public SNUADC firmware explains the board's timing: it sends no time stamps, samples on its 16 MHz crystal, loses time rather than bunching samples after a stall, reads its channels one after another, and truncates its values. The predicted fault at the wrap of its microsecond counter is real but intermittent: over the whole release, the PPG and arterial timelines step together 4,295 s apart about five times as often as at other spacings, at roughly one wrap in four, and not at all on some ports. |
| Arterial pressure as a check on the PPG correction | 2026-10-11 | current | Arterial pressure is sampled by the same converter but has no frame and no sawtooth, so every PPG slip leaves ECG→ABP unchanged. Against it, detected slips are 97–100% real and tier A leaves about 2 ms of drift mid-tooth. |
| The PPG's 30 Hz frame clock | 2026-10-10 | current | ECG and PPG fiducials resolve to one 2 ms sample, but PPG fiducials taken on raw samples lock to a hidden 33.3 ms frame grid. Scanning for it finds the oximeter's frame clock to about 1 ppm, a fixed fingerprint of each recording setup. |
| The PPG sawtooth and its correction | 2026-10-10 | current | The ECG→PPG delay creeps at 18–52 ppm and jumps up by one 33.3 ms frame at each slip, every 11–31 minutes. First of the sawtooth series. Its first correction, a tooth-by-tooth fit (physiosync's detect method), was essentially exact where confident on injected test data; it has been replaced as the atlas default by the rebuilt correction of The rebuilt PPG slip finder and its correction, which brings finger PAT closer to arterial PAT, and is kept here as history. |
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: about 19 ms on the sample count (17.3–20.3 ms; Signal lost at a SNUADC step-mode correction), about 2 ms more once the filler sample is counted. Every record still holds 100 samples, so nothing in the file shows it. |
| 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 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. |
| 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 above it, mostly between −0.90 and −0.72 ppm. |
| SNUADC values are 10-bit codes, though the recorder's device list gives 12 bits | established | Every SNUADC channel in the release stores codes 0–1023 and nothing above, so 10 bits with a step of 0.0098746 V. The Vital Recorder paper describes the SNUADC as a 10-bit converter, and the public firmware reads a 10-bit converter, but the recorder's current device list gives 12 bits. |
| The ECG→PPG delay is a sawtooth | established | Inside the oximeter the PPG content creeps 18–52 ppm against its 30 Hz frames; every 11–31 minutes the delay steps up by one 33 ms frame (no repeated frame shows in the waveform). The rate is fixed per recording setup. |
| The PLETH arrives about 0.4 s late | established | Raw R-to-PPG-foot pulse arrival time in VitalDB has a median of 0.64–0.71 s, about 0.4 s more than physiology: the monitor's buffering and filtering. One delay fits the whole release: no clusters by setup, SNUADC port or case order (One device delay for the PLETH across the release). |
| 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. |
| The plethysmogram is built in 30 Hz frames | established | The SNUADC PLETH waveform comes from the oximeter in 33.3 ms frames, smoothed to 500 Hz. Its content changes once per frame, on the oximeter's own clock, about 0.4 s after the finger. |
| SNUADC channels are read one after another | likely | The SNUADC firmware reads its 8 channels in turn, about 0.1 ms each, so within one sample the last channel is read up to about 0.8 ms after the first. The channel order is not known. |
| SNUADC values are truncated to the count below | likely | The SNUADC firmware truncates each calibrated value instead of rounding it, so every value sits half a count low on average (about 0.5 mmHg for arterial pressure). Values clamp at counts 0 and 1023. |
| SNUADC has two event inputs | open | The firmware sends two event-jack flags with every sample. If any case used them, they would be markers on the SNUADC's own clock. |
| The PPG sawtooth sometimes stops | open | In some stretches, and some whole recordings, no frame slip comes although one or more were due. Many such stretches inside a recording are a single missed slip (two teeth long, on one slip grid); in the rest the delay is flat and the frame clock keeps its rate and phase; what stops the content's drift is not known. |
The approach¶
The idea. Two clocks measured against each other give only a relative rate. A third clock that sits inside the signal breaks the tie: it is sampled by one clock, stamped by another, and corrected by neither. A pacemaker at a fixed rate, the frame clock of a pulse oximeter, a line at a fixed frequency from a monitor's output stage: each keeps its own time whatever the recorder does.
What it gives. Breaks in a timeline that no other method sees (time lost without a gap in the count), a device's rate against a clock outside the recording chain, and fingerprints of the hardware (frame and line rates fixed per setup).
How. Time each event of the rhythm as precisely as possible (template matching, phase-locked fiducials, complex demodulation of a line), place the times on each timeline in turn (sample count, record stamps, corrected line), and look for steps in phase between stretches where the rhythm should run on.
Pitfalls. The rhythm must truly be fixed: a demand pacemaker resets at every intrinsic beat, and a "regular" sinus rhythm wanders by milliseconds. Frame clocks show only where a fiducial locks to them. Such clocks are rare: seven of 6,388 cases are paced at a fixed rate.
Techniques¶
- Template beat timing: Time each beat by fitting a template of the case's own beats, for sub-millisecond precision that does not depend on one fiducial point.
- Phase-step detection: Fit a regular train before and after a candidate break and test for a step in its phase, accepting only steps without an intervening beat that could explain them.