cleaning
This commit is contained in:
parent
652ece6bb3
commit
743e91a78d
|
@ -140,7 +140,7 @@ for name in filenames:
|
||||||
config_header = ['<texture>']
|
config_header = ['<texture>']
|
||||||
for i in range(np.nanmax(microstructure)):
|
for i in range(np.nanmax(microstructure)):
|
||||||
config_header += ['[{}{}]'.format(label,i+1),
|
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>']
|
config_header += ['<microstructure>']
|
||||||
for i in range(np.nanmax(microstructure)):
|
for i in range(np.nanmax(microstructure)):
|
||||||
|
|
|
@ -89,7 +89,7 @@ for name in filenames:
|
||||||
for i,data in enumerate(unique):
|
for i,data in enumerate(unique):
|
||||||
ori = damask.Rotation(data[0:4])
|
ori = damask.Rotation(data[0:4])
|
||||||
config_header += ['[Grain{}]'.format(i+1),
|
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)]
|
if options.axes is not None: config_header += ['axes\t{} {} {}'.format(*options.axes)]
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ if options.matrix is not None:
|
||||||
if options.eulers is not None:
|
if options.eulers is not None:
|
||||||
rot = damask.Rotation.from_Eulers(np.array(options.eulers),degrees=options.degrees)
|
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]
|
if filenames == []: filenames = [None]
|
||||||
|
|
|
@ -305,15 +305,6 @@ class Rotation:
|
||||||
"""
|
"""
|
||||||
return np.einsum('...i,...j',self.quaternion,self.quaternion)
|
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
|
# 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)
|
# for compatibility (old names do not follow convention)
|
||||||
fromQuaternion = from_quaternion
|
fromQuaternion = from_quaternion
|
||||||
fromEulers = from_Eulers
|
fromEulers = from_Eulers
|
||||||
fromAxisAngle = from_axis_angle
|
asAxisAngle = as_axis_angle
|
||||||
fromBasis = from_basis
|
|
||||||
fromMatrix = from_matrix
|
|
||||||
fromRodrigues = from_Rodrigues
|
|
||||||
fromHomochoric = from_homochoric
|
|
||||||
fromCubochoric = from_cubochoric
|
|
||||||
fromRandom = from_random
|
|
||||||
|
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
# Code below available according to the following conditions on https://github.com/MarDiehl/3Drotations
|
# Code below available according to the following conditions on https://github.com/MarDiehl/3Drotations
|
||||||
|
|
Loading…
Reference in New Issue