Skip to main content

midas-pf-odf

Joint per-grain peak-shape inversion of pf-HEDM (point-focused HEDM, also known as scanning 3DXRD) data.

Phase 1 (current): for each grain, fit all of its voxels' (R_V, ε_V) jointly to image-MSE on measured 3D peak patches, given voxel→grain assignment as input. Differentiable PyTorch forward; voxel-summed splat per (spot, scan); closed-form per-spot intensity scale c_s*.

Phase 2 (later): per-voxel ODF (sub-grain mosaic / GND density) on the same forward.

Notebooks

Worked-example Jupyter notebooks live in notebooks/. They are not shipped with pip install — get them by cloning the MIDAS repository.

Status

Pre-alpha; private. See dev/RESTART.md for the active worklog and resume point.

Where this sits relative to the literature

Henningsson et al. 2020 (J. Appl. Cryst.) introduced PCR / ASR — joint multi-voxel intragranular strain reconstruction from scanning 3DXRD, using peak centroids only. They explicitly call out peak-shape inversion as the next direction (untapped at time of writing). This package takes that step:

  • Centroid → peak-shape (image-MSE on (F, P, P) patches).
  • Hand-derived Jacobian → autograd / PyTorch.
  • Single (R_V, ε_V) per voxel → per-voxel ODF (Phase 2).

The forward model is midas_diffract.HEDMForwardModel; reusable infrastructure (sparse splatter, ODF parameterizations, held-out CV selector, sparse-tile chunking) comes from midas_grain_odf.

Quickstart

cd packages/midas_pf_odf
pip install -e .[dev]
python -m pytest tests/ -xvs

Layout

midas_pf_odf/        — public library
    simulate.py       — synthetic plant (orientation+strain gradients, multi-grain, noise)
    forward.py        — joint per-grain forward (soft beam gate, voxel-summed splat)
    inversion.py      — joint inversion driver (Adam / L-BFGS, identifiability knobs)
    validation.py     — per-voxel RMSE vs plant, held-out R²
    io.py             — I/O for real data (deferred)
dev/                  — implementation plan, paper, notebooks, worklog
tests/                — synthetic round-trip tests

Decisions locked

  1. Identifiability knob: project ε to mean-zero per grain (default, recommended) or per-voxel-lattice over-parameterized (toggle).
  2. Smoothness regularizer: off by default (λ_smooth = 0).
  3. Synthetic source: torch-native simulator inside this package.
  4. Outlier voxels: soft-mask by held-out R² in the loss.
  5. Multi-grain parallelism: one grain × one GPU each via parsl (deferred until workflow integration).
  6. Output schema: parallel HDF5; centroid path untouched (deferred).

Download files

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

Source Distribution

midas_pf_odf-0.1.1.tar.gz (75.6 kB view details)

Uploaded Source

Built Distribution

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

midas_pf_odf-0.1.1-py3-none-any.whl (64.1 kB view details)

Uploaded Python 3

File details

Details for the file midas_pf_odf-0.1.1.tar.gz.

File metadata

  • Download URL: midas_pf_odf-0.1.1.tar.gz
  • Upload date:
  • Size: 75.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for midas_pf_odf-0.1.1.tar.gz
Algorithm Hash digest
SHA256 56d0430a1f5d6d305ee1d088a92eb4b60a3c0039ac0180eb5851f9df2db2d5a4
MD5 bfc85deb37c7421057998ab73b2871f2
BLAKE2b-256 ba97291bc65f52119da0542961f6dcf7d56bf905be9d649985e249a3305845ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for midas_pf_odf-0.1.1.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_pf_odf-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: midas_pf_odf-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 64.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for midas_pf_odf-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56adf3f2970052ab3ccfed698256551ebd21895cb328043a830f637324b3858a
MD5 0c505add4ee2fa9c3997f4225d053c58
BLAKE2b-256 644356abe85574e6192363664e9b06d32b105ff18582c79465adafe8b2014dda

See more details on using hashes here.

Provenance

The following attestation bundles were made for midas_pf_odf-0.1.1-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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

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