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!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

midas_fusion-0.3.2.tar.gz (65.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

midas_fusion-0.3.2-py3-none-any.whl (72.6 kB view details)

Uploaded Python 3

File details

Details for the file midas_fusion-0.3.2.tar.gz.

File metadata

  • Download URL: midas_fusion-0.3.2.tar.gz
  • Upload date:
  • Size: 65.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for midas_fusion-0.3.2.tar.gz
Algorithm Hash digest
SHA256 b7d4c12e83e45e0702b15cf7965b738b801b1e7ab86daa9cd018f341545edb4f
MD5 c8dcaaa080767f210c556aa8eae38e5a
BLAKE2b-256 af555c97d54943b91c35c0855a5f286ffb8e5a88eebaae3d8c72c94896e6f9fa

See more details on using hashes here.

File details

Details for the file midas_fusion-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: midas_fusion-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 72.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for midas_fusion-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d1014f48fd956929f0fab9e70ce7d81b4efb82f49a6ef9cfa0bd9a55c4682c6d
MD5 1f716922ab31cfa402aad10fca74af84
BLAKE2b-256 e13a277bd3219f1aab5fcbf1fc34c04bb823c6082c14765a951497f54d6abc8b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 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