MIDAS is an open-source suite for reconstructing three-dimensional microstructures from High-Energy Diffraction Microscopy (HEDM) data. Developed at the Advanced Photon Source at Argonne National Laboratory, it supports the complete data-reduction pipeline — from raw detector frames to grain maps, strain tensors, spatially resolved orientation fields, and tomographic reconstructions.
Contact: Hemant Sharma (hsharma@anl.gov)
| Technique | What It Produces | Detector Distance |
|---|---|---|
| Far-Field HEDM (FF-HEDM) | Grain centroids, average orientations, full elastic strain tensors | ≈ 1 m |
| Near-Field HEDM (NF-HEDM) | Spatially resolved 3D orientation maps, grain morphology, grain boundary networks | ≈ 5–10 mm |
| Point-Focus HEDM (PF-HEDM) | High-resolution grain orientations from focused beam | ≈ 1 m |
| Radial Integration (Caking) | 1D intensity vs. 2θ profiles for Rietveld refinement (GSAS-II) | — |
| Tomography (CT) | Absorption-contrast cross-sections via gridrec algorithm | — |
MIDAS/
├── FF_HEDM/ # Far-field HEDM analysis codes (calibration, indexing, fitting, integration)
├── NF_HEDM/ # Near-field HEDM reconstruction codes
├── DT/ # Data transformation utilities
├── TOMO/ # Tomographic reconstruction (gridrec CT engine)
├── utils/ # Python utilities (integrator, auto-calibration, workflow drivers)
├── gui/ # Interactive visualization GUI
├── manuals/ # Comprehensive documentation (see below)
├── cmake/ # CMake build configuration and dependency management
├── build.sh # Build script (Linux / macOS)
├── build_wsl_windows.sh # Build script (Windows via WSL)
├── environment.yml # Conda environment specification
├── CMakeLists.txt # Top-level CMake configuration
└── LICENSE # UChicago Argonne open-source license
Full manuals are in the manuals/ directory. Start with the manuals README for an overview of all HEDM techniques, coordinate systems, and a getting-started checklist.
| Manual | Topic |
|---|---|
| FF_calibration | FF-HEDM geometry calibration |
| FF_Analysis | FF-HEDM grain indexing and fitting |
| FF_RadialIntegration | Radial integration / caking |
| FF_Interactive_Plotting | Interactive FF-HEDM visualization |
| FF_dual_datasets | Dual-dataset FF-HEDM analysis |
| PF_Analysis | Point-Focus HEDM analysis |
| NF_calibration | NF-HEDM detector calibration |
| NF_Analysis | NF-HEDM reconstruction workflow |
| NF_MultiResolution_Analysis | Multi-resolution NF-HEDM |
| NF_gui | NF-HEDM interactive GUI |
| ForwardSimulationManual | Forward simulation for validation |
| GSAS-II_Integration | Importing MIDAS output into GSAS-II |
| Tomography_Reconstruction | Absorption-contrast CT reconstruction |
| Platform | Requirements |
|---|---|
| macOS | Homebrew, LLVM, libomp, GCC, CMake, jemalloc |
| Linux | GCC ≥ 9, CMake ≥ 3.16 |
| Windows | WSL with Ubuntu |
MIDAS automatically downloads and builds these C/C++ dependencies during compilation: NLOPT, LIBTIFF, FFTW, HDF5, BLOSC, BLOSC-2, ZLIB, LIBZIP.
git clone https://github.com/marinerhemant/MIDAS.git
cd MIDAS-
Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Without sudo access, install to your home directory:
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/main | tar xz --strip-components 1 -C homebrew eval "$(homebrew/bin/brew shellenv)" brew update --force --quiet chmod -R go-w "$(brew --prefix)/share/zsh"
Add Homebrew to your PATH:
echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> ~/.zshrc source ~/.zshrc
-
Install dependencies:
brew install llvm libomp gcc cmake jemalloc
-
Configure environment variables:
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc echo 'export LDFLAGS="-L/opt/homebrew/opt/llvm/lib $LDFLAGS"' >> ~/.zshrc echo 'export CPPFLAGS="-I/opt/homebrew/opt/llvm/include $CPPFLAGS"' >> ~/.zshrc echo 'export LDFLAGS="-L/opt/homebrew/opt/libomp/lib $LDFLAGS"' >> ~/.zshrc echo 'export CPPFLAGS="-I/opt/homebrew/opt/libomp/include $CPPFLAGS"' >> ~/.zshrc echo 'CC=/opt/homebrew/opt/gcc/bin/gcc-15' >> ~/.zshrc echo 'export CC' >> ~/.zshrc echo 'CXX=/opt/homebrew/opt/gcc/bin/g++-15' >> ~/.zshrc echo 'export CXX' >> ~/.zshrc source ~/.zshrc
-
Build:
./build.sh
./build.shsudo ./build_wsl_windows.sh./build.sh --cuda OFFcd build
cmake --build . --target <TargetName>conda env create -f environment.yml
conda activate midas_env- Calibrate the detector geometry → FF_calibration
- Run FF-HEDM grain indexing and fitting → FF_Analysis
- Visualize results interactively → FF_Interactive_Plotting
- Reconstruct NF-HEDM orientation maps → NF_Analysis
- Validate with forward simulation → ForwardSimulationManual
See the manuals README for the full step-by-step checklist.
If you use MIDAS in your research, please cite:
In review, citations coming soon.
FF-HEDM methodology:
H. Sharma, R. M. Huizenga & S. E. Offerman, "A fast methodology to determine the characteristics of thousands of grains using three-dimensional X-ray diffraction. I. Overlapping diffraction peaks and parameters of the experimental setup," J. Appl. Cryst. 45, 693–704 (2012). DOI: 10.1107/S0021889812025563
H. Sharma, R. M. Huizenga & S. E. Offerman, "A fast methodology to determine the characteristics of thousands of grains using three-dimensional X-ray diffraction. II. Volume, centre-of-mass position, crystallographic orientation and strain state of grains," J. Appl. Cryst. 45, 705–718 (2012). DOI: 10.1107/S0021889812025599
MIDAS is released under the UChicago Argonne open-source license.
Copyright © 2012, UChicago Argonne, LLC. All rights reserved.
This product includes software produced by UChicago Argonne, LLC under Contract No. DE-AC02-06CH11357 with the Department of Energy.
