Shared bursts between the ECG and the EEG¶
Electrocautery and muscle bursts appear in both the SNUADC ECG and the BIS EEG. Cross-correlating their envelopes gives the offset between the two devices' stamps every 10 minutes: about −0.8 s, in a sawtooth that follows both clocks' corrections.
| Date | 2026-11-11 |
| Status | current |
| Methods | One event, two clocks |
| Techniques | Windowed cross-correlation, Null controls |
| Clocks | SNUADC sample clock, BIS clock |
| Devices | SNUADC, BIS monitor |
| Variables | ECG lead II (SNUADC), BIS EEG |
Background¶
Two devices on separate clocks need an event both of them record. Broadband bursts (electrocautery, muscle activity) reach the ECG electrodes and the EEG electrodes at the same instant.
Data¶
A first probe on 30 benchmark cases with BIS EEG, then all 191 benchmark cases with BIS.
Method¶
The envelope is the log power of the ECG at 30–60 Hz and of the EEG at 30–55 Hz, median-filtered over 0.55 s to remove the QRS, with a 10 s running median subtracted. Each 10-minute window (stepped by 5 minutes) is cross-correlated over ±20 s, and counts as good when r ≥ 0.3 and the peak beats any lag more than 1 s away by at least 0.15. The EEG's two channels give two independent estimates per window; EEG1 against EEG2 is the control. Other candidate shared signals were tried: bursts within SNUADC, mains hum, and ventilation.
Ramps and jumps on the whole release: python tools/shared_bursts_slopes.py --bursts $W/burst_validation_stamps
--units $W/results/sync_full/units.csv --root $R --out $W/shared_bursts_slopes (the recorded-stamp burst lags of
tools/sa_corrected.py; rerun until summary.json says complete). The benchmark's per-case files were not kept.
Example figure: python tools/burst_figures.py examples --stamps $W/burst_validation_stamps --drift
$W/results/sync_full/full.drift.csv --out $W/burst_figures (the same eight cases; histograms over the whole release).
Results¶
- Coverage: 167 of 191 cases have at least one good window, 145 at least 5; 3,663 good windows in all.
- Offset: median −792 ms (5th–95th percentile −1,053 to −533 ms), EEG minus ECG stamp for the same burst.
- Precision: EEG1 and EEG2 agree to 11 ms (median; p90 36 ms); the control sits at 0 ± 7 ms.
- A sawtooth, not a constant. The offset ramps for 30–90 minutes and jumps back. The ramp slope matches the difference of the two devices' drifts from their stamps: over the whole release, 252 of the 335 recordings with drifts from the correction scan lie within 25 ppm (r = 0.83 among them; median difference +5 ppm). The benchmark gave 108 of 145 and r = 0.88.
- The direct rate over the release. From the stamp-model burst check of the whole release (10-minute windows), the
BIS runs −85.5 ppm against the SNUADC (median of 1,792 recordings; IQR −94.1 to −77.5 ppm),
−87.9 ppm where both clocks have whole sawtooth teeth (339). The 191 cases above gave −72 ppm. Against the two
devices' drifts from their correction steps the direct rate closes to −2.3 ppm (median; IQR −12.6 to +0.3; 358
recordings). (Model5 burst check, v4 rates, 11 November,
$W/direct_rate_m5; on model3, 19 October: −84.8 ppm in 1,805, closure −2.1.) - The jumps are stamp steps: over the whole release, 74% of 1,872 lag jumps (1,039 recordings) have a SNUADC or BIS record-stamp step in the same window, against 9% for the same interval 40 minutes later (benchmark: 79% of 216, against 12%).
- Other shared signals fail. Bursts within SNUADC are rare and point to interference entering after the monitor's processing; mains hum was not seen in SNUADC at 60 Hz (its harmonics carry it in 39% of recordings, Mains hum as an outside clock, and the recording PCs against the grid); ventilation is too regular to give a unique lag.
| Parameter | Value | Status | From |
|---|---|---|---|
| BIS EEG raw stamps against the SNUADC ECG | −0.787 s (p5–p95 −0.97 to −0.601; n = 2702; 36,788 burst windows; bis_numbers/bis_numbers_m5.json (raw)) | measured | Shared bursts between the ECG and the EEG |
| BIS EEG stamps against the release median, between | 0.1129 s (n = 2702; 36,788 windows; bis_numbers/bis_numbers_m5.json (fixed_shift)) | measured | Shared bursts between the ECG and the EEG |
| BIS EEG stamps against the release median, total | 0.1707 s (n = 2702; 36,788 windows; bis_numbers/bis_numbers_m5.json (fixed_shift)) | measured | Shared bursts between the ECG and the EEG |
| BIS EEG stamps against the release median, within | 0.1143 s (n = 2702; 36,788 windows; bis_numbers/bis_numbers_m5.json (fixed_shift)) | measured | Shared bursts between the ECG and the EEG |
| BIS drift against SNUADC | −85.5 ppm (p10–p90 −101.8 to −69.4; IQR −94.1 to −77.5; n = 1792; −87.9 ppm where both clocks have whole teeth (339); the 191-case pilot gave −72; on model3 (19 October) −84.8 ppm in 1,805) | measured | Shared bursts between the ECG and the EEG |
Discussion¶
The first direct, artefact-based confirmation of the clock drifts, and the only measure of the absolute offset between SNUADC and BIS. Because the ramps and steps are visible in the stamps themselves, they can be corrected without any artefact (The stamp sawtooth model for SNUADC and BIS); the bursts then check the correction and give the constant left over. These numbers are from the 191-case pilot; over the whole release the constant is −805 ms in step mode and −665 ms in frequent-correction mode (EEG–ECG constant after the stamp model, The EEG–ECG offset is fixed by the SNUADC correction mode).
Limitations¶
Needs bursts; about one case in eight with BIS has none.
Open questions¶
- Burst times as a derived variable (next step). The electrocautery and muscle bursts found here in the SNUADC ECG and the BIS EEG are not a published label family, so they are not an atlas variable. Published with a version, they would be derived from ECG lead II (SNUADC) and BIS EEG.
Code¶
- vitaldb-bench:
tools/shared_artifacts.py,tools/direct_rate_from_bursts.py,tools/shared_bursts_slopes.py,tools/burst_figures.py
Figures¶