# UPDATES ![GitHub last commit (branch)](https://img.shields.io/github/last-commit/ORTOOLS4MTEX/ORTools/develop) ![GitHub repo size](https://img.shields.io/github/repo-size/ORTOOLS4MTEX/ORTools) ![GitHub Discussions](https://img.shields.io/github/discussions/ORTools4MTEX/ORTools) ![GitHub issues](https://img.shields.io/github/issues/ORTools4MTEX/ORTools) - The latest **[ORTools v2.3.0](https://github.com/ORTools4MTEX/ORTools/releases/tag/v2.3.0)** stable release should be employed together with the **[MTEX v5.11.2](https://mtex-toolbox.github.io/download.html)** stable release. - Alternatively, the developer version of **[ORTools](https://github.com/ORTools4MTEX/ORTools)** should be employed together with the **[MTEX v5.11.2](https://mtex-toolbox.github.io/download.html)** stable release. ---

ORTools --- [![buttonIcon1]][Link1] [![buttonIcon2]][Link2]     [![buttonIcon3]][Link3] [![buttonIcon4]][Link4]         [![buttonIcon5]][Link5] [![buttonIcon6]][Link6]       [![buttonIcon7]][Link7] [buttonIcon1]: https://img.shields.io/badge/Introduction_to_ORTools-37a779?style=for-the-badge [buttonIcon2]: https://img.shields.io/badge/Authors_and_contributors-37a779?style=for-the-badge [buttonIcon3]: https://img.shields.io/badge/Collaborators-37a779?style=for-the-badge [buttonIcon4]: https://img.shields.io/badge/How_to_cite_ORTools-37a779?style=for-the-badge [buttonIcon5]: https://img.shields.io/badge/How_to_use_ORTools-37a779?style=for-the-badge [buttonIcon6]: https://img.shields.io/badge/ORTools_example_scripts-37a779?style=for-the-badge [buttonIcon7]: https://img.shields.io/badge/ORTools_alphabetical_function_index-37a779?style=for-the-badge [link1]: #introduction-to-ortools [link2]: #authors-and-contributors [link3]: #collaborators [link4]: #how-to-cite-ortools [link5]: #how-to-use-ortools [link6]: #ortools-example-scripts [link7]: #ortools-alphabetical-function-index --- ## Introduction to ORTools ![matlab compatible](https://img.shields.io/badge/matlab-compatible-lightgrey.svg) ![GitHub top language](https://img.shields.io/github/languages/top/ORTOOLS4MTEX/ORTools) **Orientation relationship tools** (**ORTools**) is a function library for OR discovery, advanced OR analysis and the plotting of visually stunning and informative publication-ready figures particular to microstructures undergone partial/full martensitic transformation or OR-related phase transition. The **ORTools** function library is written in [**MATLAB**](https://mathworks.com/products/matlab.html) and is used as an add-on to the basic phase transformation functionalities within the MATLAB-based crystallographic toolbox [**MTEX**](https://mtex-toolbox.github.io). Due to their specific nature, the scripts contained in the **ORTools** library have not been included in MTEX. You may want to watch this [talk by Frank Niessen](https://youtu.be/B0faPjtOdmA) at the 2021 MTEX Workshop for an introduction to the phase transformation features in MTEX and **ORTools**. The advanced OR discovery, analysis and plotting functionalities of the **ORTools** library are highlighted in a series of [example scripts](https://github.com/ORTools4MTEX/ORTools#example-scripts) that showcase how the functions work and what their output comprises. To help maintain the **ORTools** library, please report any bugs you encounter in the [discussions board](https://github.com/ORTools4MTEX/ORTools/discussions). If you would like to contribute additional functionalities or wish to suggest new features that help improve it, please [submit an issue](https://github.com/ORTools4MTEX/ORTools/issues) or [open a discussion](https://github.com/ORTools4MTEX/ORTools/discussions). [![ORTools - Short video introduction](http://img.youtube.com/vi/inkR6LBzFeQ/0.jpg)](http://www.youtube.com/watch?v=inkR6LBzFeQ "Video Title") [*A short introduction to ORTools*](https://youtu.be/inkR6LBzFeQ) --- ## Authors and contributors ![GitHub contributors](https://img.shields.io/github/contributors/ORTools4MTEX/ORTools) **ORTools** has been created by [**Dr Azdiar Gazder**](https://www.researchgate.net/profile/Azdiar-Gazder) and [**Dr Frank Niessen**](https://www.researchgate.net/profile/Frank-Niessen-4). --- ## Collaborators ![Static Badge](https://img.shields.io/badge/Collaborators-Welcome!-8A2BE2) [**Dr Tuomo Nyyssönen**](https://www.researchgate.net/profile/Tuomo-Nyyssoenen) - Lath martensite block width calculator --- ## How to cite ORTools [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4898682.svg)](https://doi.org/10.5281/zenodo.4898682) If you have applied the OR discovery, OR and variant analyses, parent grain reconstruction, and correlated plotting features of MTEX and **ORTools** to your research, please cite this open-access paper as your reference: [**F. Niessen, T. Nyyssönen, A.A. Gazder, R. Hielscher, Parent grain reconstruction from partially and fully transformed microstructures in MTEX, Journal of Applied Crystallography: 55(1), pp. 180-194, 2022. (https://doi.org/10.1107/S1600576721011560)**](https://journals.iucr.org/j/issues/2022/01/00/nb5309/nb5309.pdf) --- ## How to use ORTools ![GitHub forks](https://img.shields.io/github/forks/ORTools4MTEX/ORTools) ![GitHub Repo stars](https://img.shields.io/github/stars/ORTools4MTEX/ORTools) ![GitHub watchers](https://img.shields.io/github/watchers/ORTools4MTEX/ORTools) ![GitHub followers](https://img.shields.io/github/followers/ORTools4MTEX) - The ORTools library only works **after** the prior installation of [MATLAB](https://se.mathworks.com/help/install/install-products.html) and [**MTEX**](https://mtex-toolbox.github.io/). - Follow the instructions for installing [MATLAB](https://se.mathworks.com/help/install/install-products.html). ORTools is tested for compatibility from MATLAB 2016b onwards. - With each [release](https://github.com/ORTools4MTEX/ORTools/releases) of ORTools, please check exactly which version of MTEX it is compatible with. - Click on the weblinks to download either one of the following two combinations: - Latest STABLE releases of: - [**MTEX**](https://mtex-toolbox.github.io/download.html) and [**ORTools**](https://github.com/ORTools4MTEX/ORTools/releases/tag/v2.3.0). - DEVELOPER versions of: - [**MTEX**](https://github.com/mtex-toolbox/mtex/blob/develop/) and [**ORTools**](https://github.com/ORTools4MTEX/ORTools/archive/develop.zip). - For instructions on installing MTEX and ORTools within MATLAB, please refer to the video given below. - The peak fitting functionality within the function [defineORs](https://github.com/ORTools4MTEX/ORTools/blob/master/README.md#defineors) requires the prior installation of the [MATLAB Signal Processing Toolbox](https://au.mathworks.com/products/signal.html). - Open MATLAB and run one of the example files. Please refer to the [Example 1](https://youtu.be/AcR-nXg5QKo) instruction video to learn how to run the examples. Alternatively, if you do not wish to run the example files and want to use the function library instead, please ensure that the **ORTools** root directory and all of its sub-directories are added to the MATLAB path. - If you encounter any problems, please [submit an issue](https://github.com/ORTools4MTEX/ORTools/issues) or [open a discussion](https://github.com/ORTools4MTEX/ORTools/discussions). - If you would like to contribute additional functionalities or wish to suggest new features, please [submit a contribution or request a feature in the discussion](https://github.com/ORTools4MTEX/ORTools/discussions). [![ORTools - How to install MTEX](http://img.youtube.com/vi/SsiDFqqqZU4/0.jpg)](http://www.youtube.com/watch?v=SsiDFqqqZU4 "Video Title") [*How to install MTEX*](https://youtu.be/SsiDFqqqZU4) --- ## ORTools example scripts The world of martensitic transformation or phase transition analysis can be difficult to navigate. To help make the analysis accessible, transparent, and easy to comprehend, the **ORTools** library consists of plug-and-play functions. Example scripts are provided to help demonstrate these functions *in action*. It is possible to run the example scripts from start to end, but we encourage you to run the example scripts [in sections](https://mathworks.com/help/matlab/matlab_prog/run-sections-of-programs.html) to understand the correlation between the scripts and the generated results. This will also help you follow the comments, which provide instructions on the various choices to make in the interactive parts of the program and/or help explain the obtained plots and results. In this way, you will learn the syntax applied throughout the scripts as well as the meaning behind the presented results. --- ### [Example 10: 03 JUL 2023](./ORTools_example10.m)
Update to Example 1: Parent grain reconstruction using the variant graph approach in lath martensite and child grain id analysis This script follows the same dataset as that used in the official [MTEX example]( https://mtex-toolbox.github.io/MaParentGrainReconstructionAdvanced.html) to demonstrate the reconstruction of parent gamma grains from child alpha grains in a lath martensite microstructure. The [computeGrainPairs](https://github.com/ORTools4MTEX/ORTools/blob/master/README.md#computeGrainPairs) function provides a direct way of calculating the absolute or normalised frequency and boundary segment lengths of grain pairs. The grain pair ids can be defined by the user for variants, crystallographic packets, Bain groups, any other-id type or for groups of id or equivalent id pairs. [![ORTools - Example 10](http://img.youtube.com/vi/ZOmOw1q0lXg/0.jpg)](http://www.youtube.com/watch?v=ZOmOw1q0lXg "Video Title") [*Example 10 - Parent grain reconstruction using the variant graph approach in lath martensite and child grain id analysis*](https://youtu.be/ZOmOw1q0lXg)
--- ### [Example 09: 06 JUN 2023](./ORTools_example09.m)
Update to Example 1: Parent grain reconstruction using the variant graph approach in lath martensite and habit plane determination This script follows the same dataset as that used in the official [MTEX example](https://mtex-toolbox.github.io/MaParentGrainReconstructionAdvanced.html) to demonstrate the reconstruction of parent gamma grains from child alpha grains in a lath martensite microstructure. The [computeHabitPlane](https://github.com/ORTools4MTEX/ORTools/blob/master/README.md#computeHabitPlane) function provides a direct way of calculating the habit plane compared to conventional MTEX. The details related to the habit plane calculation are described in the following paper: [**T. Nyyssönen, A.A. Gazder, R. Hielscher, F. Niessen, Habit plane determination from reconstructed parent phase orientation maps, Acta Materialia: 119035, 2023. (https://doi.org/10.1016/j.actamat.2023.119035)**]( https://www.researchgate.net/publication/371310735_Habit_plane_determination_from_reconstructed_parent_phase_orientation_maps) [![ORTools - Example 9](http://img.youtube.com/vi/lM_NhQQY5LY/0.jpg)](http://www.youtube.com/watch?v=lM_NhQQY5LY "Video Title") [*Example 9 - Parent grain reconstruction using the variant graph approach in lath martensite and habit plane determination*](https://youtu.be/lM_NhQQY5LY)
--- ### [Example 08: 29 MAR 2023](./ORTools_example08.m)
Update to Example 2: Parent grain reconstruction using the variant graph approach in Ti alloys This script follows the same dataset as that used in the official [MTEX example](https://mtex-toolbox.github.io/TiBetaReconstruction.html) to demonstrate the reconstruction of parent beta grains from child alpha grains in a alpha-beta Ti alloy. The script provides a faster and less involved way of reconstructing this microstructure compared to the triple-point based approach from [Example 2](./ORTools_example2.m). The details related to the variant graph approach are described in the following paper: [**R. Hielscher, T. Nyyssönen, F. Niessen, A.A. Gazder, The variant graph approach to improved parent grain reconstruction, Materialia: 22, 101399, 2022. (https://doi.org/10.1016/j.mtla.2022.101399)**](https://www.researchgate.net/publication/357646342_The_variant_graph_approach_to_improved_parent_grain_reconstruction)
--- ### [Example 07: 23 MAR 2022](./ORTools_example07.m)
Update to Example 1: Parent grain reconstruction using the new variant graph approach and advanced variant analysis in lath martensitic steel This script follows the same dataset as that used in the official [MTEX example](https://mtex-toolbox.github.io/MaParentGrainReconstruction.html) to demonstrate the reconstruction of parent austenite grains from child lath martensite using the new **variant graph approach**. Compared to the original [Example 1](./ORTools_example1.m), this updated version also features equivalent variant pair analysis and the measurement of lath block widths. The details related to the variant graph approach are described in the following paper: [**R. Hielscher, T. Nyyssönen, F. Niessen, A.A. Gazder, The variant graph approach to improved parent grain reconstruction, Materialia: 22, 101399, 2022. (https://doi.org/10.1016/j.mtla.2022.101399)**](https://www.researchgate.net/publication/357646342_The_variant_graph_approach_to_improved_parent_grain_reconstruction) [![ORTools - Example 7](http://img.youtube.com/vi/E9IFyFUQNl4/0.jpg)](https://www.youtube.com/watch?v=E9IFyFUQNl4 "Video Title") [*Example 7 - Variant graph approach & advanced variant analysis in lath martensitic steel*](https://youtu.be/E9IFyFUQNl4)
--- ### [Example 06: 12 MAY 2021](./ORTools_example06.m)
Two-stage parent grain reconstruction in a TWIP-TRIP steel This example is of a 10% cold-rolled twinning and transformation induced plasticity (TWIP-TRIP) steel microstructure with a two-step martensitic transformation in which ε martensite formed from γ austenite, and α' martensite formed from ε martensite. ORTools and the MTEX parent grain reconstruction functionalities are used to reconstruct both parent microstructures in a single workflow. Towards the end, it is demonstrated that variant analysis can be conducted on both transformations. **EBSD map courtesy: Pramanik et al. https://doi.org/10.1016/j.msea.2018.06.024** [![ORTools - Example 6](http://img.youtube.com/vi/K2rO3Mx4A8s/0.jpg)](http://www.youtube.com/watch?v=K2rO3Mx4A8s "Video Title") [*Example 6 - Two-stage parent grain reconstruction in a TWIP-TRIP steel*](https://youtu.be/K2rO3Mx4A8s)
--- ### [Example 05: 04 MAR 2021](./ORTools_example05.m)
Partial parent grain reconstruction to clean TWIP-TRIP steel EBSD data This example is of a 20% cold-rolled twinning and transformation induced plasticity (TWIP-TRIP) steel microstructure presenting with a two-step martensitic transformation in which ε martensite formed from γ austenite, and α' martensite formed from ε martensite. Using the [OR peak fitter](https://github.com/ORTools4MTEX/ORTools/blob/master/README.md#peakFitORs) function, it is discovered that two possible ORs could be in operation for the γ to α' microstructure. The first OR is not a real OR but rather, an "apparent" OR corresponding to pixels that were misindexed as α' during map acquisition even though they notionally belong to γ. The parent phase reconstruction features in MTEX and the "apparent" OR are used to revert these misindexed points to γ. The grain calculation and the OR peak fitter is re-run to show that the "apparent" OR was eliminated. **EBSD map courtesy: Pramanik et al. https://doi.org/10.1016/j.msea.2018.06.024** [![ORTools - Example 5](http://img.youtube.com/vi/Hj5kVscjljU/0.jpg)](http://www.youtube.com/watch?v=Hj5kVscjljU "Video Title") [*Example 5 - Partial parent grain reconstruction to clean TRIP-TWIP steel EBSD map data*](https://youtu.be/Hj5kVscjljU)
--- ### [Example 04: 04 MAR 2021](./ORTools_example04.m)
Predicting the β to α transformation texture in a titanium alloy In this script, the reconstruction of the prior parent β microstructure from a child α microstructure is repeated as shown in [example 2](https://github.com/ORTools4MTEX/ORTools#example-2). Examination of the variant distribution shows that strongly preferential variant selection did not occur. Therefore, the transition texture of α can be accurately predicted from the reconstructed β using the [plotPODF_transform](https://github.com/ORTools4MTEX/ORTools/blob/master/README.md#plotPODF_transform) function. The result shows that the predicted α transition texture is in good agreement with the experimental α texture. [![ORTools - Example 4](http://img.youtube.com/vi/Yx2jKII3HUc/0.jpg)](http://www.youtube.com/watch?v=Yx2jKII3HUc "Video Title") [*Example 4 - Transformation texture prediction in titanium alloys*](https://youtu.be/Yx2jKII3HUc)
--- ### [Example 03: 04 MAR 2021](./ORTools_example03.m)
Using the OR peak fitter to deconvolute multiple ORs in titanium alloys In [example 2](https://github.com/ORTools4MTEX/ORTools#example-2) the α-β Ti microstructure showed two ORs in the [OR peak fitter](https://github.com/ORTools4MTEX/ORTools/blob/master/README.md#peakFitORs) function. In this example, both ORs are investigated to find out which one of them dominated the phase transition. To evaluate the best match, the disorientation between grain boundary misorientations and the OR misorientations in inverse pole figures and on boundary maps are plotted. [![ORTools - Example 3](http://img.youtube.com/vi/8e9PhhFCWYc/0.jpg)](http://www.youtube.com/watch?v=8e9PhhFCWYc "Video Title") [*Example 3 - Separation of multiple ORs in titanium alloys*](https://youtu.be/8e9PhhFCWYc)
--- ### [Example 02: 03 MAR 2021](./ORTools_example02.m)
Parent grain reconstruction and variant analysis in titanium alloys This script follows the same dataset and steps that are used to demonstrate the reconstruction of β grains from an α microstructure in the official [MTEX example](https://mtex-toolbox.github.io/TiBetaReconstruction.html) for phase transitions in titanium alloys. Here the [OR peak fitter](https://github.com/ORTools4MTEX/ORTools/blob/master/README.md#peakFitORs) function is used to determine the OR from alpha-beta boundaries even though they only make up < 1% of all boundaries in the dataset. Advanced plotting functions are employed to produce publication-ready plots. [![ORTools - Example 2](http://img.youtube.com/vi/e6R0dApUc8Q/0.jpg)](http://www.youtube.com/watch?v=e6R0dApUc8Q "Video Title") [*Example 2 - Parent grain reconstruction in titanium alloys*](https://youtu.be/e6R0dApUc8Q)
--- ### [Example 01: 03 MAR 2021](./ORTools_example01.m)
Parent grain reconstruction and variant analysis in lath martensitic steel This script follows the same dataset and steps that are used to demonstrate the reconstruction of austenitic parent grains from martensite grains using the **grain graph approach** in the official [MTEX example](https://mtex-toolbox.github.io/GrainGraphBasedReconstruction.html) for martensite transformation in steels. The functionality of **ORTools** in providing pre-written and additional plotting functions to create publication-ready plots is demonstrated. [![ORTools - Example 1](http://img.youtube.com/vi/AcR-nXg5QKo/0.jpg)](http://www.youtube.com/watch?v=AcR-nXg5QKo "Video Title") [*Example 1 - Parent grain reconstruction in steel*](https://youtu.be/AcR-nXg5QKo)
--- ## ORTools alphabetical function index
C
----
D
----
F
----
G
----
O
----
P
----
R
----
S
----
T
----