Algorithm for fitting pattern centers of EBSD patterns. Fits orientation and pattern center by optimization in 6D space using the SNOBFIT global optimization algorithm. This helps prevent getting trapped in local minima, which is an issue for standard downhill search methods. Uses EMsoft to simulate EBSD patterns.
Our paper (preprint) describing this method. Patterns used in this paper can be found in the folder 'paperdata/'.
More information about the SNOBFIT algorithm
*As of 5/8/2021, can automatically fit pattern centers for pseudosymmetric materials using the programs 'RunPCfit_pseudosym.m' and 'RunPCfit_loop_pseudosym.m'. These programs were used in this paper (preprint).
- Install EMsoft. Code and installation instructions can be found here.
- Download/clone this repository in any location.
- Download the minq5 package from here.
If you are using EMsoft v4.0, extract in a folder named 'minq5/' located in the 'pcglobal/EMsoft_v4_0/' directory. Only use the version of the code in this directory.
If you are using EMsoft v4.3 or later, extract in a folder named 'minq5/' located in the 'pcglobal/EMsoft_v4_3/' directory. Only use the version of the code in this directory.
Different versions of EMsoft have separate code here because of the differences in pattern orientation. Using the incorrect version can lead to low dot product values (and may not give an error) because the incorrect pattern orientation. We have only tested EMsoft v4.0 and v4.3. Please let us know if one or neither of these versions seems to work for you.
- Before performing a fitting run, you need to precompute the master pattern using EMsoft. See here for instructions.
- Open 'RunPCfit.m'. There is also a version 'RunPCfit_loop.m' that allows you to loop through multiple image files.
- Enter the parameter values in the section labeled 'INPUT PARAMETERS'. Comments in the script explain the meaning of each parameter. Default SNOBFIT values should be fine in most cases, but we have included a program FindParameters.m that can help you determine the optimal values for some of these parameters for your system.
- Run the script.
I have included some examples to learn how to use the package. This data is located in the folder /testdata/. You need to take a few additional steps to be able to perform a fitting run on this data:
- Download 'Ni.tar.gz' from here. Copy the file 'Ni-master-20kV.h5' to any location within EMsoft's EMdatapathname.
- Download 'Xtals.tar.gz' from here. Copy the 'Ni.xtal' file to your EMsoft xtal folder.
- Copy the folder 'testdata/' to any location within EMsoft's EMdatapathname. You can find the location of your xtal and EMdatapathname folders at: '~/.config/EMsoft/EMsoftConfig.json'
Feel free to email me at epang@mit.edu if you have any questions/difficulties/suggestions.