Tutorials

Tutorials#

Lessons that take you through building something with unxt, one step at a time. Start here if you have not used unxt before: these pages assume no prior knowledge and every step is checked to work.

If you already know what you want to accomplish, the How-to guides will get you there faster.

Work through them in order.

  1. Your first calculation with units โ€” build a unit-aware projectile calculator, then compile, differentiate and vectorise it. Start here.

  2. Land on Mars in your own units โ€” build your own unit system, fly a descent simulation in it, and reproduce the unit mistake that destroyed the Mars Climate Orbiter.

  3. Check a formula before you run it โ€” catch errors in a formula, and derive a result, without computing anything.

  4. Carry units through a whole analysis โ€” carry units through a whole analysis: load a dataset with xarray, compute a derived quantity, and plot it with matplotlib.

  5. Write a function others can call โ€” write a function other people call, that cannot be called wrong by accident.

Every unxts.* package has its own tutorial too, listed under Packages in the sidebar.