# Tutorial Q-19: Interpolate a threshold from four points

Find where a step test's lactate curve crosses a level by straight-line interpolation, apply a fixed and an individual threshold rule, and check the arithmetic against a smooth fit.

Address: https://apopt.com/data/tutorials/q19-interpolate-threshold/  
License: CC BY 4.0  
Prepared: 2026-12-03

## Description

Files for the tutorial *Interpolate a threshold from four points* (https://apopt.com/course/tutorials/q19-interpolate-threshold/). `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 | description |
|---|---|---|---|
| [expected/printed-output.txt](https://apopt.com/data/tutorials/q19-interpolate-threshold/expected/printed-output.txt) | 488 B |  | Everything the tutorial prints, cell by cell |
| [raw/lactate_step_illustrative.csv](https://apopt.com/data/tutorials/q19-interpolate-threshold/raw/lactate_step_illustrative.csv) | 96 B | 6 rows | ILLUSTRATIVE step test, not a real athlete: lactate and heart rate at six stages from 10 to 15 km/h (speed_kmh, lactate_mmol, hr_bpm) |

Large files are stated with their size. A `preview.md` in this folder shows the first rows of each table.

## Provenance

- Source: Data-Driven Athletics tutorials (IRSRI, 2027)
- Removed: nothing; inputs are synthetic, published course data, or the instructor's own
- Permission basis: Published with the course under CC BY 4.0
- Prepared with: dda/tutorials/build.py

## Used in

- Book: [Chapter 7: Glucose, Lactate and Emerging Sensors](https://apopt.com/book/ch07-emerging/)
- Course: [Week 7 lesson](https://apopt.com/course/week/7/)

## How to cite

Tutorial Q-19: Interpolate a threshold from four points. IRSRI Sports Research Institute, 2026. Data-Driven Athletics data repository. https://apopt.com/data/tutorials/q19-interpolate-threshold/

## Load it

```python
import pandas as pd
df = pd.read_csv("https://apopt.com/data/tutorials/q19-interpolate-threshold/raw/lactate_step_illustrative.csv")
```
