Skip to main content

Unified MIDAS HEDM orchestrator. FF is the single-scan degeneracy of PF; one orchestrator, --scan-mode {ff,pf}.

Project description

midas-pipeline

End-to-end MIDAS HEDM orchestrator. FF is the single-scan degeneracy of PF. One package, one CLI, two scan modes.

Status

0.1.0 — end-to-end PF and FF paths live. The scanning indexer matches the C IndexerScanningOMP reference on its 1-voxel C-parity gate (seed identity, solution counts, voxel-center positions exact; orientation matrices within mrad-scale, the refiner closes the gap downstream). Real-data validation: Wenxi CP-Ti consolidation_pf reproduces the legacy pf_MIDAS.py grain count (770 == 770, all common). Park22 P5c parity gate now runs in ~6.7s vs the original 790s after the scanning-indexer position-grid fix.

Stages call in-process Python kernels via midas-index / midas-fit-grain / midas-transforms / midas-stress. FF mode shells out to python -m midas_index and python -m midas_fit_grain (same kernels, subprocess for the FF parity-preserving pattern). No CUDA C; GPU is torch-only.

Install

pip install -e packages/midas_pipeline

Notebooks

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

CLI

midas-pipeline run --scan-mode {ff,pf,auto} --params Parameters.txt --result rundir/
midas-pipeline status rundir/
midas-pipeline resume rundir/ --from <stage>
midas-pipeline reprocess rundir/
midas-pipeline inspect rundir/LayerNr_1/
midas-pipeline simulate --out simdir/ --params Parameters.txt
midas-pipeline seed --params ... --output UniqueOrientations.csv

When --scan-mode is omitted (default auto), the CLI sniffs the parameter file: nScans > 1 or presence of BeamSize / scanning keys → pf, otherwise ff. For PF mode, --n-scans, --scan-step, --beam-size, and --scan-pos-tol default to values in the params file (CLI flags override).

Indexer backend

midas-pipeline run --indexer-backend {python,c-omp} ...

python (default) — in-process numba/torch indexer. Portable (CPU/CUDA/MPS), differentiable, slower on large PF datasets.

c-omp — bundled unified C binary (midas_indexer) from midas-index. Requires midas-index installed with a working OpenMP toolchain (macOS: brew install libomp). ~290× faster than the Python path on real PF datasets (per the Wenxi CP-Ti benchmark in packages/midas_index/dev/). Output is bit-identical to the Python path on the PF parity gate.

Coexistence with midas-ff-pipeline

The legacy midas-ff-pipeline console-script is preserved as an independent FF orchestrator (its own kernels, its own CLI). It is not deprecated by midas-pipeline run --scan-mode ff — both paths invoke the same midas-index / midas-fit-grain kernels under the hood, and both stay green on the FF parity gate. Pick whichever is more convenient for your workflow.

Architecture

  • One orchestrator with a mode-dependent STAGE_ORDER.
  • Shared kernel packages (midas-index, midas-fit-grain, midas-transforms, etc.) extended in place; FF behavior preserved by parity gates.
  • PF-only modules live inside midas_pipeline (find_grains/, sinogen, recon/, fuse, potts, em_refine, seeding/).
  • Differentiability + multi-device mandatory on every new compute path (CPU / CUDA / MPS via torch).

Constraints

  • No CUDA C; GPU support is torch-only.
  • No deletions of legacy code in this effort.
  • midas-process-grains is FF-only; PF consolidation is fresh pure-Python.
  • utils/calcMiso.py is not imported by this package; all orientation math comes from midas-stress.
  • TOMO/midas_tomo_python.py is imported in place, not relocated.

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_pipeline-0.4.5.tar.gz (143.4 kB view details)

Uploaded Source

Built Distribution

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

midas_pipeline-0.4.5-py3-none-any.whl (176.4 kB view details)

Uploaded Python 3

File details

Details for the file midas_pipeline-0.4.5.tar.gz.

File metadata

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

File hashes

Hashes for midas_pipeline-0.4.5.tar.gz
Algorithm Hash digest
SHA256 93fe60786dc78c09d82f4adebe9c9ccdd172b7a8f2036ac8d6f177cd2383d79d
MD5 55c4b6afc090a0850525851a35fb8211
BLAKE2b-256 4f84e4ad1d2cac7dbc5fa80f28993494f8e4753446617ad38f423d63d5bbe135

See more details on using hashes here.

Provenance

The following attestation bundles were made for midas_pipeline-0.4.5.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_pipeline-0.4.5-py3-none-any.whl.

File metadata

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

File hashes

Hashes for midas_pipeline-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5881006e6f62d8d4c2f33bda4cbc7e743e25132d5c835ade1af2a57e79533c40
MD5 9b919717680dc57c2b3c6cb86d1c7939
BLAKE2b-256 e122a9ab8c5db9b8472d16bc766dc7aceb0b8d15b6d26e18a2d583364a30fc6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for midas_pipeline-0.4.5-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