This commit is contained in:
Martin Diehl 2020-05-17 08:01:34 +02:00
parent 652ece6bb3
commit 743e91a78d
4 changed files with 5 additions and 19 deletions

View File

@ -140,7 +140,7 @@ for name in filenames:
config_header = ['<texture>']
for i in range(np.nanmax(microstructure)):
config_header += ['[{}{}]'.format(label,i+1),
'(gauss)\tphi1 {:.2f}\tPhi {:.2f}\tphi2 {:.2f}'.format(*rot[i].asEulers(degrees = True)),
'(gauss)\tphi1 {:.2f}\tPhi {:.2f}\tphi2 {:.2f}'.format(*rot[i].as_Eulers(degrees = True)),
]
config_header += ['<microstructure>']
for i in range(np.nanmax(microstructure)):

View File

@ -89,7 +89,7 @@ for name in filenames:
for i,data in enumerate(unique):
ori = damask.Rotation(data[0:4])
config_header += ['[Grain{}]'.format(i+1),
'(gauss)\tphi1 {:.2f}\tPhi {:.2f}\tphi2 {:.2f}'.format(*ori.asEulers(degrees = True)),
'(gauss)\tphi1 {:.2f}\tPhi {:.2f}\tphi2 {:.2f}'.format(*ori.as_Eulers(degrees = True)),
]
if options.axes is not None: config_header += ['axes\t{} {} {}'.format(*options.axes)]

View File

@ -67,7 +67,7 @@ if options.matrix is not None:
if options.eulers is not None:
rot = damask.Rotation.from_Eulers(np.array(options.eulers),degrees=options.degrees)
eulers = rot.asEulers(degrees=True)
eulers = rot.as_Eulers(degrees=True)
if filenames == []: filenames = [None]

View File

@ -305,15 +305,6 @@ class Rotation:
"""
return np.einsum('...i,...j',self.quaternion,self.quaternion)
# for compatibility (old names do not follow convention)
asM = M
asQuaternion = as_quaternion
asEulers = as_Eulers
asAxisAngle = as_axis_angle
asMatrix = as_matrix
asRodrigues = as_Rodrigues
asHomochoric = as_homochoric
asCubochoric = as_cubochoric
################################################################################################
# Static constructors. The input data needs to follow the conventions, options allow to
@ -505,13 +496,8 @@ class Rotation:
# for compatibility (old names do not follow convention)
fromQuaternion = from_quaternion
fromEulers = from_Eulers
fromAxisAngle = from_axis_angle
fromBasis = from_basis
fromMatrix = from_matrix
fromRodrigues = from_Rodrigues
fromHomochoric = from_homochoric
fromCubochoric = from_cubochoric
fromRandom = from_random
asAxisAngle = as_axis_angle
####################################################################################################
# Code below available according to the following conditions on https://github.com/MarDiehl/3Drotations