-
Notifications
You must be signed in to change notification settings - Fork 21
EMOrientationViz
This program can be used to generate visualizations of sets of orientations. In its current version, the program has two output modes: PoVray files (.pov) and a binary format established by the Medical Research Council (.mrc), which is readable by programs such as IMod, Chimera, and FIJI/ImageJ. The PoVray output is a text file that describes a 3D scene that is then rendered by the PoVray program; on Mac OS X, one of the better versions is the POVRay3_7_Unofficial version (https://www.povray.org/ for official version, https://macdownload.informer.com/povray-unofficial/ for unofficial version). On Windows and Linux some versions are available, and the source code is also available.
The visualizations in this program are described in the following two papers:
- P.G. Callahan, M.P. Echlin, M.A. Groeber, T.M. Pollock, and M. De Graef. "3D texture visualization approaches: Theoretical Analysis and Examples". J. Applied Crystallography, 50, 430-440 (2017). DOI
- P.G. Callahan, M. Echlin, T.M. Pollock, F. Ram, S. Singh, and M. De Graef. "3D Texture Visualization Approaches: Applications to Nickel and Titanium Alloys". J. Appl. Crystal. 50, 1267-1279 (2017). DOI
The program uses the standard name list approach and the name list template file can be obtained with the -t command line option; rename the file to EMOrientationViz.nml.
&EMOrientationViz
! name of crystal structure file
xtalname = 'undefined',
! first define the mrcmode parameter;
! 'off' for PoVray output;
! 'reg' for an .mrc file;
! 'frm' for an .mrc file containing only the volume outline [NOT YET IMPLEMENTED]
mrcmode = 'off',
! if mrcmode .ne. 'off', then define the mrc output file name WITHOUT .mrc EXTENSION !!!
mrcfile = 'undefined', ! if mrcmode .eq. 'reg'
!framemrcfile = 'undefined', ! if mrcmode .eq. 'frm' [NOT YET IMPLEMENTED]
!
! name of part of PoVray output file name WITHOUT THE .pov EXTENSION (i.e., no '.' character allowed)
! (note that the partial path should be included)
! The program will compose the output file name as follows:
! EMdatapathname/povrayfile-##.pov, where ## is a 2-character string determined by
! the next series of entries
povrayfile = 'undefined',
! cubochoric output 'cu' [1 if needed, 0 if not]
cubochoric = 1,
! homochoric output 'ho' [1 if needed, 0 if not]
homochoric = 1,
! Rodrigues output 'ro' [1 if needed, 0 if not]
rodrigues = 1,
! 3D stereographic output 'sp' [1 if needed, 0 if not]
stereographic = 1,
! primary Euler cell output 'eu' [1 if needed, 0 if not]
eulerspace = 1,
! reduce orientations to RFZ (1) or display all equivalent orientations (0)
reducetoRFZ = 1,
! override the point group number read from the xtal file ? 0 for no, new pgnum for yes
overridepgnum = 0,
!==================== the following parameters are needed for PoVray output only
! RGB color triplet for the spheres
rgb = 0.0, 0.0, 1.0,
! sphere radius (0.015 or smaller produces reasonable results)
sphrad = 0.015,
! distance parameter; 4.0 is good for overall view, 1.5-2.0 for zoom; will be multiplied by 10 for euler space
distance = 2.0,
! data scaling 'lin' for linear, 'log' for log10, 'lev' for discrete level contours (includes 'log')
scalingmode = 'lin',
!
! set these parameters if you want a density field representation (DO NOT ADD THE .DF3 EXTENSION!!!)
df3file = 'undefined',
nx = 64,
ny = 64,
nz = 64,
!=====================
!
! the angle file, a simple text file with the following format
! ## ! two characters denoting the representation (eu, ro, ho, cu, ax, qu)
! n ! number of entries in file
! ... ! one line per entry, components separated by spaces
anglefile = 'undefined',
/The program needs to know the crystal symmetry to properly apply reduction to the fundamental zone (FZ), so the first parameter is the crystal structure file name. Then the mrcmode parameter determines what kind of output is produced; when mrcmode='off', then the program only produces PoVray output. If mrcmode is set to 'reg', then the user must provide the mrcfile parameter [relative to EMdatapathname, without extension]. A third mode (frm) will be implemented in a future version.
The PoVray file name is entered via the povrayfile parameter [again relative to EMdatapathname]; the output file name is of the form 'path/povrayfile-##.pov', where ## stands for two characters identifying the orientation representation [cu, ho, ro, st, eu]. Reduction to the FZ can be enforced by setting reducetoRFZ=1; if set to 0, then all equivalent orientations are included in the rendering. Note that, in the present version, they need to be present in the input file; in a future version, the program will generate all equivalent orientations.
The requested orientation visualizations can be controlled with toggles for cubochoric, homochoric, rodrigues, stereographic, and Euler representations. It is possible to override the point group number that is specified in the crystal structure file using the overridepgnum parameter; this has been useful in the debugging stages of this program, so we left this option in.
The next set of parameters relates to the rendering in PoVray. Each orientation is represented by a small sphere with color rgb and radius sphrad, and the rendering has a zoom or scale factor called distance. The next parameter scalingmode determines how the density field intensity is scaled; this will have no effect unless the df3file parameter is set along with the size of the visualization volume. The df3 format is a binary format that can be read by PoVray for volume rendering.
Let's consider a simple example: a uniformly sampled set of orientations that all have a maximum misorientation of 7° with respect to the rotation 45°@[100] [corresponding to (0.9238795,-0.3826834,0,0) in quaternion form; note that the minus sign can also be a plus sign since the two are equivalent orientations]. One can use misorientation sampling mode of the EMsampleRFZ program to generate this orientation set; see the manual page for this program for details. For a value of N=15, the program generates a data set of 29,791 orientations in quaternion format.
To visualize this orientation distribution in the 3D stereographic representation, we use the following name list file (all comments have removed for brevity):
&EMOrientationViz
xtalname = 'Ni.xtal',
mrcmode = 'off',
povrayfile = 'PATH/ordist',
cubochoric = 0,
homochoric = 0,
rodrigues = 0,
stereographic = 1,
eulerspace = 0,
reducetoRFZ = 1,
rgb = 0.0, 1.0, 1.0,
sphrad = 0.005,
distance = 2.0,
anglefile = 'PATH/quat_split.txt',
/This generates a ordist-st.pov file which, when rendered, produces the figure on the left below. When the distance parameter is set to 0.5, the figure on the right is obtained. Note that the FZ boundaries are slightly curved in this representation.
\
Wiki pages are maintained by M. De Graef; they are part of the EMsoftOO package and fall under the same copyright (BSD2).
Information for Users
SEM Modalities
- Monte Carlo Simulations- EBSD Master Pattern Simulations
- EBSD Depth Master Pattern Simulations
- TKD Master Pattern Simulations
- ECP Master Pattern Simulations
- Overlap Master Patterns
- EBSD Pattern Simulations
- ECP Pattern Simulations
- TKD Pattern Simulations
- Dictionary Indexing
- EMHROSM
- EBSD Spherical Indexing
- EBSD Reflector Ranking
- Ion-induced Secondary Electron Master Pattern
- ECCI Defect Image Simulations
- 4DEBSD
TEM Modalities
- HH4- PED
- CBED Pattern Simulations
- STEM-DCI Image Simulations
- EMIntegrateSTEM utility
Utility Programs
- EMConvertOrientations- EMCliffordTorus
- EMDisorientations
- EMHOLZ
- EMKikuchiMap
- EMGPUinfo
- EMZAgeom
- EMcuboMK
- EMdpextract
- EMdpmerge
- EMdrawcell
- EMeqvPS
- EMeqvrot
- EMfamily
- EMGBO
- EMGBOdm
- EMgetEulers
- EMgetOSM
- EMlatgeom
- EMlistSG
- EMlistTC
- EMmkxtal
- EMorbit
- EMorav
- 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