Skip to main content

Domain-agnostic differentiable-inversion primitives for MIDAS: gradient fitting, scale-invariant losses, Laplace uncertainty, Fisher-information experiment design, mixture deconvolution, and amortised-inference surrogates.

Project description

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.

  • optimizefit (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).
  • uqlaplace_uncertainty (Hessian-at-optimum covariance & std-devs).
  • designfisher_information, rank_measurements, next_best_measurement (which delay / reflection / energy best constrains a target — experiment design).
  • mixturemixture_deconvolution (recover non-negative softmax weights over a component grid: thickness/grain-size distributions, ODF on a grid, a spectrum over an energy grid).
  • surrogateParameterMLP, 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

Project details


Download files

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

Source Distribution

midas_invert-0.1.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

midas_invert-0.1.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file midas_invert-0.1.0.tar.gz.

File metadata

  • Download URL: midas_invert-0.1.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for midas_invert-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8c368d8547066c2f66378a193b19b78409a3de558350180fe97e57a79a506b40
MD5 36e7cb7db911e4d2d56a37265a027a45
BLAKE2b-256 a6ec33cbbeb3694e80cccdf0b12203a37e3bd725803b00669f743dd7e4c9d26f

See more details on using hashes here.

Provenance

The following attestation bundles were made for midas_invert-0.1.0.tar.gz:

Publisher: python-packages.yml on marinerhemant/MIDAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file midas_invert-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: midas_invert-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for midas_invert-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dffd947aa7ab24139d447327f3a0e622a5807ff5b40d43d60c9905f0ef159e34
MD5 91b6964b1add97388743b90f2a16156c
BLAKE2b-256 8036dd0f854b0696dde1513ae586a4d71671d5cc4d7896282423b9908cb9186c

See more details on using hashes here.

Provenance

The following attestation bundles were made for midas_invert-0.1.0-py3-none-any.whl:

Publisher: python-packages.yml on marinerhemant/MIDAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page