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
- Identifiability knob: project ε to mean-zero per grain (default, recommended) or per-voxel-lattice over-parameterized (toggle).
- Smoothness regularizer: off by default (λ_smooth = 0).
- Synthetic source: torch-native simulator inside this package.
- Outlier voxels: soft-mask by held-out R² in the loss.
- Multi-grain parallelism: one grain × one GPU each via parsl (deferred until workflow integration).
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file midas_pf_odf-0.1.0.tar.gz.
File metadata
- Download URL: midas_pf_odf-0.1.0.tar.gz
- Upload date:
- Size: 75.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0cec622aa2b420347bdf5493a31da84466cae214a07beea0ee8a98f2d5244ce
|
|
| MD5 |
a33aa8ee15d5a4e5d50a365ed799b4d7
|
|
| BLAKE2b-256 |
8c3eb77dbe88f23199f29df2d49a525c74c853966f13fd7c3bb7cea12631b13f
|
Provenance
The following attestation bundles were made for midas_pf_odf-0.1.0.tar.gz:
Publisher:
python-packages.yml on marinerhemant/MIDAS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
midas_pf_odf-0.1.0.tar.gz -
Subject digest:
c0cec622aa2b420347bdf5493a31da84466cae214a07beea0ee8a98f2d5244ce - Sigstore transparency entry: 2281829655
- Sigstore integration time:
-
Permalink:
marinerhemant/MIDAS@39dcce1352a4159dfa4d808587ce28eba6de5b35 -
Branch / Tag:
refs/tags/midas-pf-odf-v0.1.0 - Owner: https://github.com/marinerhemant
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-packages.yml@39dcce1352a4159dfa4d808587ce28eba6de5b35 -
Trigger Event:
release
-
Statement type:
File details
Details for the file midas_pf_odf-0.1.0-py3-none-any.whl.
File metadata
- Download URL: midas_pf_odf-0.1.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a6f2b248889bad9ac7af77af9f03003314373c2d7ae96c5eb705c7b6ac43f62
|
|
| MD5 |
c583e2ed5e77309cd698a0238f786053
|
|
| BLAKE2b-256 |
b65cfc3b9e86724bca5e1dd6fdb75bde928e7f3e034508802dc62123e4728eb0
|
Provenance
The following attestation bundles were made for midas_pf_odf-0.1.0-py3-none-any.whl:
Publisher:
python-packages.yml on marinerhemant/MIDAS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
midas_pf_odf-0.1.0-py3-none-any.whl -
Subject digest:
9a6f2b248889bad9ac7af77af9f03003314373c2d7ae96c5eb705c7b6ac43f62 - Sigstore transparency entry: 2281829675
- Sigstore integration time:
-
Permalink:
marinerhemant/MIDAS@39dcce1352a4159dfa4d808587ce28eba6de5b35 -
Branch / Tag:
refs/tags/midas-pf-odf-v0.1.0 - Owner: https://github.com/marinerhemant
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-packages.yml@39dcce1352a4159dfa4d808587ce28eba6de5b35 -
Trigger Event:
release
-
Statement type: