fixing prospector complaints

This commit is contained in:
Martin Diehl 2020-02-22 00:06:51 +01:00
parent a6279c8284
commit fd11f073f0
4 changed files with 5 additions and 9 deletions

View File

@ -1,7 +1,6 @@
import numpy as np
from .rotation import Rotation
from . import Lambert
P = -1

View File

@ -219,8 +219,7 @@ class Rotation:
def asRodrigues(self,
vector = False):
"""
Rodrigues-Frank vector representation [n_1, n_2, n_3, tan(ω/2)] unless vector == True:
[n_1, n_2, n_3] * tan(ω/2).
Rodrigues-Frank vector representation [n_1, n_2, n_3, tan(ω/2)] unless vector == True: [n_1, n_2, n_3] * tan(ω/2).
Parameters
----------
@ -634,7 +633,7 @@ class Rotation:
@staticmethod
def eu2ro(eu):
"""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
ro[3] = np.inf
elif iszero(ro[3]):
@ -754,7 +753,7 @@ class Rotation:
@staticmethod
def ro2cu(ro):
"""Rodriques-Frank vector to cubochoric vector."""
return ho2cu(ro2ho(ro))
return Rotation.ho2cu(Rotation.ro2ho(ro))
#---------- Homochoric vector----------

View File

@ -39,7 +39,7 @@ class bcolors:
def srepr(arg,glue = '\n'):
"""
r"""
Join arguments as individual lines.
Parameters
@ -110,7 +110,6 @@ def execute(cmd,
env = None):
"""
Execute command.
Parameters
----------
@ -179,6 +178,7 @@ def progressBar(iteration, total, prefix='', bar_length=50):
Prefix string.
bar_length : int, optional
Character length of bar. Defaults to 50.
"""
fraction = iteration / float(total)
if not hasattr(progressBar, "last_fraction"): # first call to function

View File

@ -1,10 +1,8 @@
import os
from itertools import permutations
import pytest
import numpy as np
import damask
from damask import Rotation
n = 1000