Hands-on Jupyter notebooks for applied signal processing and time-series classification in human–computer interaction and ubiquitous computing — covering sampling and quantization, comparing signals in the time domain, frequency analysis (DFT/FFT/STFT), and two complete accelerometer projects (step tracking and gesture recognition).
These notebooks are the source of truth for the Signals module of the
Physical Computing interactive textbook.
The textbook links to and renders them; this repository is where they are maintained,
mirroring how the textbook treats makeabilitylab/arduino.
They were developed for, and refined across several offerings of, a graduate
ubiquitous-computing course at the University of Washington.
Run the notebooks in this order — each builds on the previous one. Launch in the cloud (no install) with the badges, or run locally (see Setup).
| # | Lesson | Notebook | Cloud |
|---|---|---|---|
| 1 | Intro to Python | Tutorials/IntroToPython.ipynb |
|
| 2 | Intro to NumPy | Tutorials/IntroToNumPy.ipynb |
|
| 3 | Intro to Matplotlib | Tutorials/IntroToMatplotlib.ipynb |
|
| 4 | Quantization & Sampling | Tutorials/Signals - Quantization and Sampling.ipynb |
|
| 5 | Comparing Signals (time domain) | Tutorials/Signals - Comparing Signals.ipynb |
|
| 6 | Frequency Analysis (DFT/FFT/STFT) | Tutorials/Signals - Frequency Analysis.ipynb |
|
| 7 | Step Tracker | Projects/StepTracker/StepTracker-Exercises.ipynb |
|
| 8 | Gesture Recognition: Shape-Based | Projects/GestureRecognizer/GestureRecognizer-ShapeBased.ipynb |
|
| 9 | Gesture Recognition: Feature-Based | Projects/GestureRecognizer/GestureRecognizer-FeatureBased.ipynb |
|
| 10 | Feature Selection & Hyperparameter Tuning | Projects/GestureRecognizer/Feature Selection and Hyperparameter Tuning.ipynb |
Note: the Colab badges load a notebook directly from GitHub but do not clone the repo's data or helper packages. A small "Colab setup" bootstrap cell (added per notebook in the lesson-modernization pass) handles that. Binder builds a full environment from
environment.yml/requirements.txtand checks out the whole repo, so data and imports work there without extra steps.
Requires Python 3.12. Two supported paths — pick one.
git clone https://github.com/makeabilitylab/signals.git
cd signals
python -m venv .venv
.venv/Scripts/activate # Windows
# source .venv/bin/activate # macOS / Linux
pip install -r requirements.txt
jupyter labgit clone https://github.com/makeabilitylab/signals.git
cd signals
conda env create -f environment.yml
conda activate signals
jupyter labBoth paths also install the local helper packages (makelab, gesturerec) in
editable mode via pip install -e ., so the notebooks import them from anywhere
with no sys.path hacks:
import makelab.signal # used by the Tutorials notebooks
import gesturerec.data # used by the GestureRecognizer notebooksThe helper packages have unit tests and the notebooks have headless "does it still execute" smoke tests. None of this lives inside the notebooks. Install the test extras and run:
pip install -e ".[test]"
pytest tests/ # fast unit tests for makelab + gesturerec
pytest --nbmake Tutorials/ Projects/StepTracker/ # execute the fast notebooks
pytest --nbmake Projects/GestureRecognizer/ # execute the (slow) gesture notebooksnbmake executes each notebook in its own directory and fails on any uncaught error
(intentional teaching errors are tagged raises-exception and allowed). CI runs the
unit tests + fast notebooks on every push/PR, and the slow gesture notebooks only when
a change touches them (plus a monthly canary and on-demand) —
see .github/workflows/.
.
├── Tutorials/ # Lessons 1–6 (Python/NumPy/Matplotlib + signals)
│ ├── makelab/ # shared signal + audio helpers (importable package)
│ └── data/audio/ # audio clips used by Quantization & Sampling
├── Projects/
│ ├── StepTracker/ # Lesson 7 (+ Logs/ accelerometer step data)
│ └── GestureRecognizer/ # Lessons 8–10
│ ├── gesturerec/ # data structures + experiment scaffolding (package)
│ ├── GestureLogs/ # per-participant gesture training data
│ └── ADXL335GestureLogs/ # alternate-sensor gesture data
├── tests/ # pytest unit tests for makelab + gesturerec
├── .github/workflows/ # CI: unit + notebook smoke tests
├── pyproject.toml # packaging for makelab + gesturerec
├── requirements.txt # pinned pip environment
└── environment.yml # pinned conda environment
Some notebooks ship as an exercise/solution pair (*-Exercises.ipynb for students,
*-WithExampleSolution.ipynb as the answer key). Instructor-only solution keys
(*-Private.ipynb) are intentionally not published.
See LICENSE.