Skip to main content

MIDAS

Documentation Status Tests PyPI Python License: MIT Discord

MIDAS is a Python framework for Bayesian and integrated data analysis. Some key features of MIDAS are:

Use diagnostic models from any source

MIDAS is designed to work with any diagnostic model which can by called from within Python, and does not require models to be implemented within a specific framework. Instead, MIDAS provides tools to create a lightweight wrapper around external forward-models which allows them to interface with MIDAS.

Efficient inference through analytic propagation of derivatives

Efficient MAP estimation and MCMC sampling in inference problems with ~20 or more free parameters relies heavily on the ability to calculate the derivative of the posterior log-probability with respect to those parameters.

Given the Jacobian of a diagnostic model (i.e. the derivatives of the model predictions with respect to the model inputs) MIDAS will automatically propagate those derivatives through the subsequent steps in calculating the posterior log-probability, so the gradient of the posterior log-probability can be calculated analytically.

This allows MIDAS tackle large-scale problems with hundreds or thousands of free parameters, or to solve smaller problems quickly and routinely.

Easy interfacing to the Python scientific software ecosystem

MIDAS is designed to be used easily with external libraries, for example using optimisers from scipy.optimize to maximise the posterior log-probability, or MCMC samplers from inference-tools to sample from the posterior.

Modularity to allow easy exchange of models

Analysis in MIDAS is built from three types of models:

  • Diagnostic forward-models which make predictions of diagnostic signals.
  • Likelihood functions which model the uncertainties on measured data.
  • Plasma field models which give a parametrised description of the plasma state.

Each of these model types have interfaces defined by an associated abstract base-class, which allows them to communicate with the framework. This abstraction means that models can be easily swapped in and out of the analysis without requiring code changes.

For example, a forward-model for a Thomson-scattering diagnostic is able to request the values of the electron temperature and density from their associated field models, but is completely independent of the specific choice of parametrisation for those fields.

Installation

MIDAS is available from PyPI, so can be easily installed using pip as follows:

pip install midas-fusion

Documentation

Package documentation is available at midas-fusion.readthedocs.io.

Jupyter notebook examples

This jupyter notebook example demonstrates how MIDAS can be used to infer multiple fields by analysing data from multiple diagnostics simultaneously.

Community discord server

We have a community discord server where you can connect wth other MIDAS users, ask questions and learn about the work other people are doing with MIDAS. Use this link to get an invitation to the server!

Release files for midas-fusion 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for midas-fusion 0.3.3
File Size Uploaded
midas_fusion-0.3.3.tar.gz 66.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for midas-fusion 0.3.3
File Interpreter ABI Platform
midas_fusion-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 139.6 kB

Release files / midas_fusion-0.3.3.tar.gz

Download URL midas_fusion-0.3.3.tar.gz
Size 66.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4455797524dc87e38502afd751126869a3cc04f05b8ae998b0c276d8952e6ab0
BLAKE2b-256 checksum
How to use checksums
2748075da41629ca199ef3398076d4e2fa8a6e1375cdb6bf0dc8338a987a6b84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / midas_fusion-0.3.3-py3-none-any.whl

Download URL midas_fusion-0.3.3-py3-none-any.whl
Size 73.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e18c2d458c4d06b8dc254f6a3c52393d0189ec67e703d1db3cc4a80bcdd65bab
BLAKE2b-256 checksum
How to use checksums
6091969e4038590145205395f75d16f0661698405145acc47e447ccca159881f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

0.4.1

2 release files

0.4.0

2 release files

This release

0.3.3 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page