adding property alias for Orientation class to simplify syntax.
This commit is contained in:
parent
905b9f8f42
commit
dfe0991134
|
@ -790,30 +790,36 @@ class Orientation:
|
||||||
|
|
||||||
def asQuaternion(self):
|
def asQuaternion(self):
|
||||||
return self.quaternion.asList()
|
return self.quaternion.asList()
|
||||||
|
quaternion = property(asQuaternion)
|
||||||
|
|
||||||
def asEulers(self,type='bunge'):
|
def asEulers(self,type='bunge'):
|
||||||
return self.quaternion.asEulers(type)
|
return self.quaternion.asEulers(type)
|
||||||
|
eulers = property(asEulers)
|
||||||
|
|
||||||
def asRodrigues(self):
|
def asRodrigues(self):
|
||||||
return self.quaternion.asRodrigues()
|
return self.quaternion.asRodrigues()
|
||||||
|
rodrigues = property(asRodrigues)
|
||||||
|
|
||||||
def asAngleAxis(self):
|
def asAngleAxis(self):
|
||||||
return self.quaternion.asAngleAxis()
|
return self.quaternion.asAngleAxis()
|
||||||
|
angleAxis = property(asAngleAxis)
|
||||||
|
|
||||||
def asMatrix(self):
|
def asMatrix(self):
|
||||||
return self.quaternion.asMatrix()
|
return self.quaternion.asMatrix()
|
||||||
|
matrix = property(asMatrix)
|
||||||
|
|
||||||
def inFZ(self):
|
def inFZ(self):
|
||||||
return self.symmetry.inFZ(self.quaternion.asRodrigues())
|
return self.symmetry.inFZ(self.quaternion.asRodrigues())
|
||||||
|
infz = property(inFZ)
|
||||||
|
|
||||||
def equivalentQuaternions(self):
|
def equivalentQuaternions(self):
|
||||||
return self.symmetry.equivalentQuaternions(self.quaternion)
|
return self.symmetry.equivalentQuaternions(self.quaternion)
|
||||||
|
equiQuaternions = property(equivalentQuaternions)
|
||||||
|
|
||||||
def equivalentOrientations(self):
|
def equivalentOrientations(self):
|
||||||
return map(lambda q: Orientation(quaternion=q,symmetry=self.symmetry.lattice),
|
return map(lambda q: Orientation(quaternion=q,symmetry=self.symmetry.lattice),
|
||||||
self.equivalentQuaternions())
|
self.equivalentQuaternions())
|
||||||
|
equiOrientation = property(equivalentQuaternions)
|
||||||
|
|
||||||
def reduced(self):
|
def reduced(self):
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in New Issue