-
Notifications
You must be signed in to change notification settings - Fork 96
EBSD Master Pattern Simulations
The master pattern simulation is typically the most time consuming part of an EBSD pattern simulation sequence, but this has to be carried out only once for a given crystal structure, microscope voltage and sample tilt angle; the master file can be reused often, regardless of the detector parameters.
As of EMsoft release 5.0, this program can also be used to compute a second type of master pattern file that contains the spherical harmonic transform of the energy-weighted master pattern; this SHT master pattern is used by the new spherical indexing program (this program can also employ the standard master pattern file). Generating an SHT transform is covered in the final section of this wiki page.
To set up the simulation parameters, enter the following command:
EMEBSDmaster -t
This will generate two new files in your folder: EMEBSDmaster.template and BetheParameters.template. The Bethe parameters are used to control the cut-off parameters for strong beams, weak beams, and beams that can be ignored safely. The default values are appropriate for most middle range atomic numbers but may need to be increased slightly (10-20%) for heavier elements (e.g., Ag, Au, etc.). For a regular EBSD master pattern computation, simply leave the parameters at their default values and rename the file to BetheParameters.nml.
&Bethelist
! Do not change the line above !
!
! Details about the particular implementation of the Bethe potentials can be
! found in the recent paper: A. Wang & M. De Graef, "Modeling dynamical electron
! scattering with Bethe potentials and the scattering matrix" Ultramicroscopy,
! vol 160, pp. 35-43 (2016)
!
! strong beam cutoff
c1 = 4.0,
! weak beam cutoff
c2 = 8.0,
! complete cutoff
c3 = 50.0,
! double diffraction reflections: maximum excitation error to include [nm^{-1}]
sgdbdiff = 1.00
/
The second template file, EMEBSDmaster.template, contains the following parameters:
&EBSDmastervars
! smallest d-spacing to take into account [nm]
dmin = 0.05,
! number of pixels along x-direction of the square master pattern (2*npx+1 = total number)
! in Legendre mode (see below), this number will be the maximum
! band width for the spherical harmonic transform
npx = 500,
! number of OpenMP threads
nthreads = 1,
! name of the energy statistics file produced by EMMCOpenCL program;
! relative to EMdatapathname; this file will also contain the
! output data of the master program
energyfile = 'MCoutput.h5',
! do you wish to receive a notification (Email or Slack) when
! the program completes ?
Notify = 'Off',
! lattitudinal grid type: 'Lambert' or 'Legendre'
! 'Lambert' will produce a standard master pattern file that
! can be used for dictionary indexing etc...
! 'Legendre' will produce a much smaller binary SHT-master
! pattern file that can only be used for spherical
! indexing; this file does not contain any MC data
latgridtype = 'Lambert',
! ========================================================
! =============== if latgridtype = 'Lambert' =============
! name of EMMCOpenCL output file to be used to copy the MC data
! from for this master pattern run; This can be used to perform
! multiple master pattern runs starting from the same MC data set
! without having to rerun the MC computation. Leave this variable
! set to 'undefined' if not needed.
copyfromenergyfile = 'undefined',
! if copyfromenergyfile is not 'undefined', then:
! - for EMsoft developers who have the EMsoft_SDK installed,
! the following parameter will be ignored;
! - all other users will need to provide the full path to
! the h5copy program here
h5copypath = 'undefined',
! restart computation ?
restart = .FALSE.,
! create output file with uniform master patterns set to 1.0
! (used to study background only)
uniform = .FALSE.,
! ========================================================
! =============== if latgridtype = 'Legendre' =============
! name of the SHTmaster pattern file (Legendre latgridtype only)
! we suggest that these files be given names of the following type:
!
! material-info-##kV.sht
!
SHTfile = 'undefined',
/
The most important parameter is dmin, which sets the smallest d-spacing to be taken into account in the computation. This parameter has a strong influence on the duration of the calculation; the smaller dmin, the more beams will be considered, and the computation time scales with the cube of the number of beams as well as with the size of the unit cell and the value of npx (the number of pixels along the side of the master pattern will be 2*npx+1). The energyfile parameter is the name of the file that contains the Monte Carlo output data; the master pattern data will be written to the same file into a different data group. This program uses parallel threads via OpenMP, so you can set the desired number of threads with the nthreads parameter. Since this can be a lengthy computation, you have the option to restart the program after it was interrupted; this program computes the master pattern for each energy bin, so you can interrupt the program after a given energy bin has been completed, and then restart it with restart=.TRUE. to continue the run at the correct energy bin. Finally, the Notify parameter can be set to Email or Slack; in the former case you will receive an email message when the program completes, in the latter case a notification will be pushed to your Slack channel. See the configuration help pages for details on how to set this up.
The h5copypath parameter should only be set if you do not have the EMsoft_SDK (software developer toolkit) installed on your machine. You should search for the h5copy program, which is part of an HDF5 installation. This could be present, for instance, in a python anaconda package (typically in anaconda3/bin); in that case, the full path, including the program name, should be given as follows: h5copypath = '/fullpath/anaconda3/bin/h5copy'.
Once you have completed editing the parameters, save the namelist file and execute the following command:
EMEBSDmaster filename.nml
The program begins with the highest energy level; the time it takes to complete this level multiplied by the number of energy bins will be a lower bound to the total computation time.
You can use the EMsoftWorkbench program to display the master pattern in either the internal square Lambert projection format or as a stereographic projection.
The spherical indexing program can use the standard master pattern file, but also a second type of file that contains the spherical harmonic transform of the energy-weighted master pattern; this is a much smaller output file that can be considered to be a compressed version of the original master pattern, using a band width of 384. The spherical indexing wizard program (EBSDwizard) scans for this type of file (with extension .sht).
To compute the SHT master pattern, simply set the latgridtype parameter to Legendre and fill in the output filename in the SHTfile variable. Run the program in the same way as the standard master pattern run described above. Note that, at the moment, the .sht files can not be used by any of the other EMsoft programs; they are only used by the programs on the EMSphInx site.
Wiki pages are maintained by M. De Graef; they are part of the EMsoft package and fall under the same copyright (BSD2).
Information for Users
SEM Modalities
- Monte Carlo Simulations- EBSD Master Pattern Simulations
- EBSD Overlap Master Patterns
- EBSD Pattern Simulations
- EBSD Dictionary Indexing
- EBSD Spherical Indexing
- EBSD Reflector Ranking
- EBSD HREBSD
- ECP Master Pattern Simulations
- ECP Pattern Simulations
- TKD Master Pattern Simulations
- TKD Pattern Simulations
- ECCI Defect Image Simulations
TEM Modalities
- HH4- PED
- CBED Pattern Simulations
- STEM-DCI Image Simulations
- EMIntegrateSTEM utility
Utility Programs
- EMConvertOrientations- EMDisorientations
- EMHOLZ
- EMKikuchiMap
- EMOpenCLinfo
- EMZAgeom
- EMcuboMK
- EMdpextract
- EMdpmerge
- EMdrawcell
- EMeqvPS
- EMeqvrot
- EMfamily
- EMGBO
- EMGBOdm
- EMgetEulers
- EMgetOSM
- EMlatgeom
- EMlistSG
- EMlistTC
- EMmkxtal
- EMorbit
- EMorient
- EMqg
- EMsampleRFZ
- EMshowxtal
- EMsoftSlackTest
- EMsoftinit
- EMstar
- EMstereo
- EMxtalExtract
- EMxtalinfo
- EMzap
Complete Examples
- Crystal Data Entry Example
- EBSD Example
- ECP Example
- TKD Example
- ECCI Example
- CBED Example
- Dictionary Indexing Example
- DItutorial
Information for Developers