CoMPhy Lab · Open course

Think in Python.

Learn to turn a physical question into trustworthy computation and a reproducible scientific figure. Syntax is the tool. Reasoning is the course.

question represent transform verify evidence

One source, two speeds

Choose depth, not a different course.

The quick route selects seven lessons from the full route. There is no second nano repository to drift out of date.

6–8 hours

Quick route

For students who have already written some Python and need the CoMPhy habits: functions, arrays, debugging, schemas, tools, and the log lab.

See the seven lessons →
20–24 hours

Full route

For a first serious encounter with Python. Start with the short preflight, then add control flow, plotting, verification, collaboration, and the capstone.

See the complete route →

Equation → evidence

A scientific-computing spine.

Each lesson names the decision you are learning to make and the artefact you will leave behind.

Taste is teachable

What good code feels like.

Names carry physics.radius_m beats r; shape and units are part of the state.
Failure should be loud.Reject an invalid schema before it becomes a smooth, wrong curve.
I/O is not analysis.Keep reading, transforming, and plotting separate enough to test.
Tests are scientific claims.Use limits, invariants, benchmarks, and regression values.
A plot is an argument.Axes, normalisation, and omissions must serve the stated question.
Rebuild beats remember.A fresh clone should reproduce the result without folklore.

Start with the question

Trace one program before writing one.