avoid name clash: as_Rodrigues_vector(vector = ...)
This commit is contained in:
parent
1c07152b96
commit
894a8de9f9
|
@ -469,7 +469,7 @@ class Orientation(Rotation):
|
||||||
if self.family is None:
|
if self.family is None:
|
||||||
raise ValueError('Missing crystal symmetry')
|
raise ValueError('Missing crystal symmetry')
|
||||||
|
|
||||||
rho_abs = np.abs(self.as_Rodrigues_vector(vector=True))
|
rho_abs = np.abs(self.as_Rodrigues_vector(compact=True))
|
||||||
|
|
||||||
with np.errstate(invalid='ignore'):
|
with np.errstate(invalid='ignore'):
|
||||||
# using '*'/prod for 'and'
|
# using '*'/prod for 'and'
|
||||||
|
@ -512,7 +512,7 @@ class Orientation(Rotation):
|
||||||
if self.family is None:
|
if self.family is None:
|
||||||
raise ValueError('Missing crystal symmetry')
|
raise ValueError('Missing crystal symmetry')
|
||||||
|
|
||||||
rho = self.as_Rodrigues_vector(vector=True)
|
rho = self.as_Rodrigues_vector(compact=True)
|
||||||
|
|
||||||
with np.errstate(invalid='ignore'):
|
with np.errstate(invalid='ignore'):
|
||||||
if self.family == 'cubic':
|
if self.family == 'cubic':
|
||||||
|
|
|
@ -357,7 +357,7 @@ class Rotation:
|
||||||
return Rotation._qu2om(self.quaternion)
|
return Rotation._qu2om(self.quaternion)
|
||||||
|
|
||||||
def as_Rodrigues_vector(self,
|
def as_Rodrigues_vector(self,
|
||||||
vector = False):
|
compact = False):
|
||||||
"""
|
"""
|
||||||
Represent as Rodrigues-Frank vector with separated axis and angle argument.
|
Represent as Rodrigues-Frank vector with separated axis and angle argument.
|
||||||
|
|
||||||
|
@ -375,7 +375,7 @@ class Rotation:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
ro = Rotation._qu2ro(self.quaternion)
|
ro = Rotation._qu2ro(self.quaternion)
|
||||||
if vector:
|
if compact:
|
||||||
with np.errstate(invalid='ignore'):
|
with np.errstate(invalid='ignore'):
|
||||||
return ro[...,:3]*ro[...,3:4]
|
return ro[...,:3]*ro[...,3:4]
|
||||||
else:
|
else:
|
||||||
|
@ -595,13 +595,12 @@ class Rotation:
|
||||||
P = -1,
|
P = -1,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
"""
|
"""
|
||||||
Initialize from Rodrigues-Frank vector.
|
Initialize from Rodrigues-Frank vector (angle separated from axis).
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
rho : numpy.ndarray of shape (...,4)
|
rho : numpy.ndarray of shape (...,4)
|
||||||
Rodrigues-Frank vector (angle separated from axis).
|
Rodrigues-Frank vector. (n_1, n_2, n_3, tan(ω/2)), ǀnǀ = 1 and ω ∈ [0,π].
|
||||||
(n_1, n_2, n_3, tan(ω/2)), ǀnǀ = 1 and ω ∈ [0,π].
|
|
||||||
normalize : boolean, optional
|
normalize : boolean, optional
|
||||||
Allow ǀnǀ ≠ 1. Defaults to False.
|
Allow ǀnǀ ≠ 1. Defaults to False.
|
||||||
P : int ∈ {-1,1}, optional
|
P : int ∈ {-1,1}, optional
|
||||||
|
|
Loading…
Reference in New Issue