apopt.com

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

FileSizeRowsWhat it is
expected/printed-output.txt314 BEverything the tutorial prints, cell by cell
raw/glucose_pair_synthetic.csv3.6 KB271 rowsSYNTHETIC 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

minutereference_mmolsensor_mmol
06.856.99
16.797.27
26.727.16
36.647.19
46.567.64
56.477.14
66.387.3
76.287.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/