This MATLAB script performs batch processing of EBSD data (.ctf files) using the MTEX toolbox. It automates data import, grain reconstruction, filtering, and specifically handles the merging of annealing twins for effective grain size calculation.
Application: Currently configured for 304L stainless steel merging Sigma 3 and Sigma 9 annealing twins. However, the script is fully adaptable to any other material or twinning system by modifying the crystal symmetry and twin definitions.
Automatically generates high-resolution maps for IPF, Merged Grains, and Clean Maps (showing Phases, Sigma 3, Sigma 9, and random boundaries). It also exports an Excel file with the effective grain size distribution.
Place your .ctf files in the same directory as the script.
Open the script and update the mtex_path variable to point to your local MTEX installation.
Author: Hugo Latuner, 2025.