Skip to main content

midas-invert

Domain-agnostic differentiable-inversion primitives for MIDAS, shared across HEDM, Laue microdiffraction, pf-/grain-ODF, and 2D/ultrafast diffraction. None of it knows about diffraction — you supply the forward model and the loss closure.

  • optimize — fit (Adam / L-BFGS), relative_l2_loss (scale-robust), cosine_loss (scale-invariant shape loss; avoids the argmax kink of peak-normalisation — right for rocking curves, fringe profiles, spectra).
  • uq — laplace_uncertainty (Hessian-at-optimum covariance & std-devs).
  • design — fisher_information, rank_measurements, next_best_measurement (which delay / reflection / energy best constrains a target — experiment design).
  • mixture — mixture_deconvolution (recover non-negative softmax weights over a component grid: thickness/grain-size distributions, ODF on a grid, a spectrum over an energy grid).
  • surrogate — ParameterMLP, train_surrogate (amortised inference; the differentiable forward is the data generator).

All torch-differentiable, CPU / CUDA / MPS. Extracted from midas_2d so HEDM, Laue, and 2D draw on one implementation (see ../HEDM_LAUE_TRANSFER_PLAN.md).

pip install -e . --no-deps
KMP_DUPLICATE_LIB_OK=TRUE pytest

Metadata

Release files for midas-invert 0.2.0

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-invert 0.2.0
File Size Uploaded
midas_invert-0.2.0.tar.gz 24.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for midas-invert 0.2.0
File Interpreter ABI Platform
midas_invert-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.1 kB

Release files / midas_invert-0.2.0.tar.gz

Download URL midas_invert-0.2.0.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0fa656c47bf02d6af7819e1f0e870b35cf6da6594b3b308849a7f38d585179d6
BLAKE2b-256 checksum
How to use checksums
7a5c43de2d1303535113d4927c2f35e2271db2cb4646ea471e3475fd7388f135
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / midas_invert-0.2.0-py3-none-any.whl

Download URL midas_invert-0.2.0-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e26819706492a087566d3e37dbce8d420512ef31a2933cf6d15423732c05b16c
BLAKE2b-256 checksum
How to use checksums
ba9c3a494eecf8d73475d6582b2b7a74abdffd8ff41ad7d06bb36cfe36ce0ce2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

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