Tutorials
Five short walkthroughs cover each workflow in neuroresp, rendered with executed code and inline figures directly on GitHub alongside runnable Quarto (.qmd) sources. Tutorials that include synthetic ground truth use the sister package phrenic alongside open-access human recordings downloaded without logins or data use agreements.
| Tutorial | Workflows covered | Open-access data used | Typical runtime |
|---|---|---|---|
| 1. Belts, dual-band RIP, and direct airflow (.qmd) | belt, belt --states, airflow |
PhysioNet CPAP spirometry and dual-band RIP (Subject_11, normal and deep; Guy et al., 2023) |
~12 s |
| 2. Recovering breathing from fMRI and repairing clipped belts (.qmd) | extract, belt, fuse |
OpenNeuro ds003974 (sub-01, TR 2.0 s single-band EPI, 56 MB, + 50 Hz clipped belt) |
~35 s |
| 3. Denoising fMRI and decensoring head motion (.qmd) | extract (multiband Echo 1), denoise, tedana orthogonalisation, motion decensor |
OpenNeuro ds004662 (sub-01, TR 2.0 s MB 4 Echo 1, 175 MB, + 20 Hz nasal CO2) |
~3 min first run (cached after) |
| 4. Recovering breathing from ECG and MEG head coils (.qmd) | meg (ECG morphology, RSA polarity, modulation QC, cHPI / HLC) |
Schumann & Bär (2022) older-adult 1 kHz ECG + physical chest belt (04_1, 12_1, Figshare) |
~15 s |
| 5. Waveform rescue and cross-sensor replay (.qmd) | fuse_waveforms + phrenic replay & two-pool CO₂ |
PhysioNet CPAP (Subject_11) and Schumann & Bär (2022) ECG + chest belt (04_1, Figshare) |
~15 s |
For the dedicated lung-mechanics simulation walkthrough, see phrenic.
Running the tutorials locally
Install neuroresp alongside phrenic and jupyter (and Quarto if you want to render HTML pages), then render any .qmd file from a clone of the repository:
python -m pip install neuroresp phrenic jupyter
quarto render docs/tutorials/breathing-signals-walkthrough.qmd
Each tutorial downloads its open-access sample recording into /tmp/ on first run and reuses the cached copy on subsequent runs.