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 power the Signals module of the Physical Computing interactive textbook. Read the rendered lessons in the textbook β textbook home Β· textbook source. This repository is the source of truth where the notebooks are maintained, mirroring how the textbook treats
makeabilitylab/arduino.
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.
Students / self-learners. Work through the lessons in order (cloud badges above, or
run locally). Each notebook keeps its exercise prompts and "your turn" cells
and shows a worked ### Example solution right below them β so you can attempt
each exercise first, then check your approach against a model answer.
Instructors. The notebooks are complete, runnable teaching artifacts you can lecture
from directly. The original student-template TODOs are now answered inline (see
#6); planning fresh graded work is
tracked in #28. Instructor-only
answer keys (*-Private.ipynb) remain unpublished (gitignored).
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
The notebooks are complete teaching artifacts: each keeps its exercise prompts and
"your turn" cells and adds a labeled ### Example solution with worked code right below
(see #6). Instructor-only answer
keys (*-Private.ipynb) are intentionally not published.
Bug reports, fixes, and improvements are welcome β please open an issue or pull request. Run the tests before submitting. These notebooks are written to be read by students, so favor clear, well-commented, explanatory code over terse cleverness.
If you use these materials in teaching or research, please cite the textbook:
Jon E. Froehlich and the Makeability Lab. "Signals: Applied Signal Processing & ML."
Physical Computing interactive textbook, University of Washington.
https://makeabilitylab.github.io/physcomp/signals/
Created by Jon E. Froehlich and the Makeability Lab at the University of Washington, with contributions from course staff and students.
MIT Β© 2020 UW Makeability Lab.