fixing prospector complaints
This commit is contained in:
parent
a6279c8284
commit
fd11f073f0
|
@ -1,7 +1,6 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from .rotation import Rotation
|
from .rotation import Rotation
|
||||||
from . import Lambert
|
|
||||||
|
|
||||||
P = -1
|
P = -1
|
||||||
|
|
||||||
|
|
|
@ -219,8 +219,7 @@ class Rotation:
|
||||||
def asRodrigues(self,
|
def asRodrigues(self,
|
||||||
vector = False):
|
vector = False):
|
||||||
"""
|
"""
|
||||||
Rodrigues-Frank vector representation [n_1, n_2, n_3, tan(ω/2)] unless vector == True:
|
Rodrigues-Frank vector representation [n_1, n_2, n_3, tan(ω/2)] unless vector == True: [n_1, n_2, n_3] * tan(ω/2).
|
||||||
[n_1, n_2, n_3] * tan(ω/2).
|
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
|
@ -634,7 +633,7 @@ class Rotation:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def eu2ro(eu):
|
def eu2ro(eu):
|
||||||
"""Bunge-Euler angles to Rodriques-Frank vector."""
|
"""Bunge-Euler angles to Rodriques-Frank vector."""
|
||||||
ro = eu2ax(eu) # convert to axis angle pair representation
|
ro = Rotation.eu2ax(eu) # convert to axis angle pair representation
|
||||||
if ro[3] >= np.pi: # Differs from original implementation. check convention 5
|
if ro[3] >= np.pi: # Differs from original implementation. check convention 5
|
||||||
ro[3] = np.inf
|
ro[3] = np.inf
|
||||||
elif iszero(ro[3]):
|
elif iszero(ro[3]):
|
||||||
|
@ -754,7 +753,7 @@ class Rotation:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def ro2cu(ro):
|
def ro2cu(ro):
|
||||||
"""Rodriques-Frank vector to cubochoric vector."""
|
"""Rodriques-Frank vector to cubochoric vector."""
|
||||||
return ho2cu(ro2ho(ro))
|
return Rotation.ho2cu(Rotation.ro2ho(ro))
|
||||||
|
|
||||||
|
|
||||||
#---------- Homochoric vector----------
|
#---------- Homochoric vector----------
|
||||||
|
|
|
@ -39,7 +39,7 @@ class bcolors:
|
||||||
|
|
||||||
|
|
||||||
def srepr(arg,glue = '\n'):
|
def srepr(arg,glue = '\n'):
|
||||||
"""
|
r"""
|
||||||
Join arguments as individual lines.
|
Join arguments as individual lines.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
|
@ -110,7 +110,6 @@ def execute(cmd,
|
||||||
env = None):
|
env = None):
|
||||||
"""
|
"""
|
||||||
Execute command.
|
Execute command.
|
||||||
|
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
|
@ -179,6 +178,7 @@ def progressBar(iteration, total, prefix='', bar_length=50):
|
||||||
Prefix string.
|
Prefix string.
|
||||||
bar_length : int, optional
|
bar_length : int, optional
|
||||||
Character length of bar. Defaults to 50.
|
Character length of bar. Defaults to 50.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
fraction = iteration / float(total)
|
fraction = iteration / float(total)
|
||||||
if not hasattr(progressBar, "last_fraction"): # first call to function
|
if not hasattr(progressBar, "last_fraction"): # first call to function
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
import os
|
import os
|
||||||
from itertools import permutations
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
import damask
|
|
||||||
from damask import Rotation
|
from damask import Rotation
|
||||||
|
|
||||||
n = 1000
|
n = 1000
|
||||||
|
|
Loading…
Reference in New Issue