Data / tutorials / q20-signal-lag
Tutorial Q-20: Find the lag between two signals
Tutorial
Find how many minutes a glucose sensor trails its reference by cross-correlation, then measure its error after aligning the clocks, on a synthetic record with a known answer.
Files for the tutorial Find the lag between two signals (https://apopt.com/course/tutorials/q20-signal-lag/). raw/ holds the inputs as the device or app wrote them; clean/ holds the cleaned copies the tutorial writes; expected/ holds what a correct run prints and saves, so you can check your own run.
Files
| File | Size | Rows | What it is |
|---|---|---|---|
| expected/printed-output.txt | 314 B | Everything the tutorial prints, cell by cell | |
| raw/glucose_pair_synthetic.csv | 3.6 KB | 271 rows | SYNTHETIC record, one row a minute: a reference blood glucose and a sensor built from it 7 minutes late, 0.4 mmol/L high, with noise (minute, reference_mmol, sensor_mmol) |
Every file has its own fixed address: copy a link and load it directly. preview.md shows the first rows of each table as text; datapackage.json lists columns, sizes and checksums.
Preview of raw/glucose_pair_synthetic.csv
| minute | reference_mmol | sensor_mmol |
|---|---|---|
| 0 | 6.85 | 6.99 |
| 1 | 6.79 | 7.27 |
| 2 | 6.72 | 7.16 |
| 3 | 6.64 | 7.19 |
| 4 | 6.56 | 7.64 |
| 5 | 6.47 | 7.14 |
| 6 | 6.38 | 7.3 |
| 7 | 6.28 | 7.47 |
First 8 of 271 rows.
Where it came from
- Source: Data-Driven Athletics tutorials (IRSRI, 2027)
- Removed: nothing; inputs are synthetic, published course data, or the instructor's own
- Permission: Published with the course under CC BY 4.0
- Prepared with:
dda/tutorials/build.py
Load it
import pandas as pd
df = pd.read_csv("https://apopt.com/data/tutorials/q20-signal-lag/raw/glucose_pair_synthetic.csv")const text = await (await fetch("https://apopt.com/data/tutorials/q20-signal-lag/raw/glucose_pair_synthetic.csv")).text();Or download load.py / load.js.
How to cite
Tutorial Q-20: Find the lag between two signals. IRSRI Sports Research Institute, 2026. Data-Driven Athletics data repository. https://apopt.com/data/tutorials/q20-signal-lag/