In this demo we'll look at making sensor models, which allow you to calculate quantities of interest in fusion from raw sensor readings. In fusion, often the quantity measured by a sensor is not the same as the quantity we want to infer from that measurement.
For example, Thomson scattering measures spectra of scattered laser light. But the quantities we infer from thomson scattering include plasma density and temperature.
In this demo we'll look specifically at equilibrium reconstruction using an array of magnetic sensors (shown in the figure below). Rather than use a physics-based aproach, we use a data-driven aproach, creating a model that can relate magnetic properties of a plasma to sensor readings by training on historical data from MAST.
This demo will be split into three parts:
- Getting setup
- Loading in our data
- Training a simple model
- Adding more sensors
- Functional Predicitons
And then, we'll end with an open challenge!
Copy the env template and fill in your Uncertainty Engine credentials:
cp ".env copy" .envThen edit .env:
UE_USERNAME = "your@email.com"
UE_PASSWORD = "your_password"
.envis gitignored — never commit it.
Requires Python ≥ 3.10, < 3.13.
Option A — Poetry (recommended)
poetry install # creates the virtual environment
poetry shell # activates it
jupyter notebookIf you have multiple Python versions installed, point Poetry at the right one first:
poetry env use python3.11 poetry install
Option B — pip
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
jupyter notebooknotebooks/01_data_investigations.ipynbnotebooks/02_gp_sklearn.ipynbnotebooks/03_gp_UncertaintyEngine.ipynb
