make "orientation" module part of damask python interface

This commit is contained in:
Philip Eisenlohr 2013-10-08 13:56:28 +00:00
parent ec6440f1f4
commit c496288144
2 changed files with 13 additions and 6 deletions

View File

@ -5,6 +5,7 @@ from .environment import Environment # only one class
from .asciitable import ASCIItable # only one class
from .config import Material # will be extended to debug and numerics
from .colormaps import Colormap, Color
from .orientation import Vector3, Quaternion
#from .block import Block # only one class
from .result import Result # one class with subclasses
from .geometry import Geometry # one class with subclasses
@ -51,4 +52,4 @@ except (ImportError,AttributeError) as e:
):
sys.stderr.write('\nWARNING: Core module (Fortran code) not available, \n'\
'try to run setup_processing.sh or compile_CoreModule.py\n'\
'Error Message when importing core.so: %s\n\n'%e)
'Error message when importing core.so: %s\n\n'%e)

View File

@ -244,6 +244,12 @@ class Vector3:
self.z - d * normal[2]])
def inSST(self,symmetry):
'''
Determination of disorientations follow the work of A. Heinz and P. Neumann:
Representation of Orientation and Disorientation Data for
Cubic, Hexagonal, Tetragonal and Orthorhombic Crystals
Acta Cryst. (1991). A47, 780-789
'''
return {'cubic': lambda R: R.inFZ('cubic') and R.x >= R.y and R.y >= R.z and R.z >= 0.0,
'hexagonal': lambda R: R.inFZ('hexagonal') and R.x >= math.sqrt(3)*R.y and R.y >= 0.0 and R.z >= 0.0,
'tetragonal': lambda R: R.inFZ('tetragonal') and R.x >= R.y and R.y >= 0.0 and R.z >= 0.0,