Formalize the API.

Use sortable set of measurements, infer y0, etc.