-
Notifications
You must be signed in to change notification settings - Fork 98
ECP Example
On this page, we cover an explicit example of an ECP pattern simulation, from the Monte Carlo and master pattern simulations to the final pattern. We assume that the reader has successfully created the Ni.xtal crystal data file described in the first example. The instructions are for the command-line versions of all the programs.
To set up the simulation parameters, go to the folder where you wish to keep the data and type
EMMCOpenCL -t
Rename the resulting template file to whatever name you prefer to use, and make sure to use the extension .nml. Edit the filename.nml file with the correct parameters for a Ni ECP run: the majority of tje parameters are the same as for the EBSD example, with the following exceptions:
- set the mode to bse1;
- set the sample tilt angle sigstart to 0° (the sig angle does not matter for ECP mode);
- set sigend to the largest sample tilt angle you expect to need, say 10°
- set sigstep to the stepsize to go between sigstart and sigend, say 2°;
- set the energy to 20 keV, and the minimum energy to 19, with a bin size of 1 (this is because in ECP, we only need to have one energy bin).
Make sure that you follow the convention for file pathnames followed in EMsoft. Save the namelist file. It is recommended that output filenames have the form Ni-ECPmaster-20kV.h5, i.e., the compound name followed by master and the microscope accelerating voltage.
Then execute the program as follows:
EMMCOpenCL filename.nml
This will produce a lot of output; after the standard program header and information about the crystal structure, the OpenCL portion of the program will start with the following output (the numbers are just examples and do not necessarily represent the output for the Ni run):
Electron Wavelength [nm] 0.8582E-02
Interaction constant [V nm]^(-1) 0.1863E-01
Range of reflections along a*, b* and c* = 8 8 8
Normal absorption length [nm] = 59.3259125
Generating Fourier coefficient lookup table ...Done
Density, avZ, avA = 8.91125 28.00000, 58.69340
OpenCL source file set to : EMMC.cl
Kernel source length (characters) : 13238
Program Build Successful... Creating kernel
Monte Carlo mode set to bse1. Calculating statistics for tilt series...
Angle loop # 1
Total number of electrons incident = 11250000
Number of BSE1 electrons = 4449
Total number of electrons incident = 22500000
Number of BSE1 electrons = 8916
Total number of electrons incident = 33750000
Number of BSE1 electrons = 13355
.... (many lines omitted)
Total number of electrons incident = 1980000000
Number of BSE1 electrons = 802434
Total number of electrons incident = 1991250000
Number of BSE1 electrons = 807070
Total number of incident electrons = 2000000000
Total number of BSE1 electrons = 810750
Backscatter yield = 0.000405
Total execution time [s] = 75
The EMMCOpenCL program creates an HDF5-formatted output file that contains the Monte Carlo depth and directional histograms in square Lambert equal-area projection format. You can use any other program with HDF5 capability (Matlab, IDL, HDFview, ...) to analyze the contents of the output file.
As an example, here are the Monte Carlo output profiles for the top kV energy bin, displayed as a square Lambert projection.
Generate the template files:
EMECPmaster -t
rename the files with the .nml extension, and edit the contents; the default values are reasonable, and you can use as many threads as you have available. For the energyfile parameter, you should use the name of the Monte Carlo output file, i.e., Ni-ECPmaster-20kV.h5. You should also rename the BetheParameters.template file to BetheParameters.nml. Upon executing the program (in this case with 12 threads), you should see the following output:
...
# independent beam directions to be considered = 125752
Read Bethe parameters from BetheParameters.nml
Attempting to set number of threads to 12
Setting number of threads to 12
completed beam direction 5000
completed beam direction 10000
.... (many lines omitted)
completed beam direction 115000
completed beam direction 120000
completed beam direction 125000
-> Average number of strong reflections = 12
-> Average number of weak reflections = 2
Final data stored in file pathname/Ni-ECPmaster-20kV.h5
Below is an example master pattern in both the square Lambert projection (equal area) and a stereographic projection (equal angle).
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