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.4.1

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.4.1
File Size Uploaded
midas_fusion-0.4.1.tar.gz 74.9 kB Details

Built distribution (wheel)

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

Total release size: 152.7 kB

Release files / midas_fusion-0.4.1.tar.gz

Download URL midas_fusion-0.4.1.tar.gz
Size 74.9 kB
Tags Source
SHA-256 checksum
How to use checksums
317eed9b88c8691cb057208977754d5ecb28ec24186d8fc262f88a0204aeed92
BLAKE2b-256 checksum
How to use checksums
fd8e7dc23028030a226c712151b3886052493e144df48bb3299a52c0222164fd
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.4.1-py3-none-any.whl

Download URL midas_fusion-0.4.1-py3-none-any.whl
Size 77.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f82860b8378b57b54f9cfa9fa991573917a51b4e6565ac78271c1ce7d65dbf3
BLAKE2b-256 checksum
How to use checksums
cc1ef0cd7918dd763cd9865861c4c0c129b4c4add0952548b1f7f2a1e76ed250
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

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.3

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