Skip to content

digiLab-ai/WM_digiLab_demo

Repository files navigation

AI Summerschool: Probabalistic Sensor Models

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:

  1. Getting setup
  2. Loading in our data
  3. Training a simple model
  4. Adding more sensors
  5. Functional Predicitons

And then, we'll end with an open challenge!

Sensors

Setup

1. Configure credentials

Copy the env template and fill in your Uncertainty Engine credentials:

cp ".env copy" .env

Then edit .env:

UE_USERNAME = "your@email.com"
UE_PASSWORD = "your_password"

.env is gitignored — never commit it.

2. Install dependencies

Requires Python ≥ 3.10, < 3.13.

Option A — Poetry (recommended)

poetry install   # creates the virtual environment
poetry shell     # activates it
jupyter notebook

If 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 notebook

Navigation

  1. notebooks/01_data_investigations.ipynb
  2. notebooks/02_gp_sklearn.ipynb
  3. notebooks/03_gp_UncertaintyEngine.ipynb

About

Demo for the William & Mary 2025 AI for Fusion Summerschool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors