From 92ca010b7c8afa8fa1f5151fb294504edb88ea47 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 4 Jul 2021 23:25:00 +0200 Subject: [PATCH] Philip's corrections --- python/damask/_crystal.py | 10 +++++----- python/damask/_lattice_family.py | 6 +++--- python/damask/_orientation.py | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/python/damask/_crystal.py b/python/damask/_crystal.py index 9d76bc3ab..3df338a9e 100644 --- a/python/damask/_crystal.py +++ b/python/damask/_crystal.py @@ -90,7 +90,7 @@ class Crystal(LatticeFamily): or (self.b is None or ('b' in self.immutable and self.b != self.immutable['b'] * self.a)) \ or (self.c is None or ('c' in self.immutable and self.c != self.immutable['c'] * self.b)) \ or (self.alpha is None or ('alpha' in self.immutable and self.alpha != self.immutable['alpha'])) \ - or (self.beta is None or ( 'beta' in self.immutable and self.beta != self.immutable['beta'])) \ + or (self.beta is None or ('beta' in self.immutable and self.beta != self.immutable['beta'])) \ or (self.gamma is None or ('gamma' in self.immutable and self.gamma != self.immutable['gamma'])): raise ValueError (f'Incompatible parameters {self.parameters} for crystal family {self.family}') @@ -139,7 +139,7 @@ class Crystal(LatticeFamily): @property def basis_real(self): """ - Calculate orthogonal real space crystal basis. + Return orthogonal real space crystal basis. References ---------- @@ -162,7 +162,7 @@ class Crystal(LatticeFamily): @property def basis_reciprocal(self): - """Calculate reciprocal (dual) crystal basis.""" + """Return reciprocal (dual) crystal basis.""" return np.linalg.inv(self.basis_real.T) @@ -172,13 +172,13 @@ class Crystal(LatticeFamily): Parameters ---------- - direction|normal : numpy.ndarray of shape (...,3) + direction|plane : numpy.ndarray of shape (...,3) Vector along direction or plane normal. Returns ------- Miller : numpy.ndarray of shape (...,3) - lattice vector of direction or plane. + Lattice vector of direction or plane. Use util.scale_to_coprime to convert to (integer) Miller indices. """ diff --git a/python/damask/_lattice_family.py b/python/damask/_lattice_family.py index 24d91490d..e34c02e10 100644 --- a/python/damask/_lattice_family.py +++ b/python/damask/_lattice_family.py @@ -6,7 +6,7 @@ class LatticeFamily(): def __init__(self,family): """ - Symmetry-related operations for crystal families. + Symmetry-related operations for crystal family. Parameters ---------- @@ -15,7 +15,7 @@ class LatticeFamily(): """ if family not in self._immutable.keys(): - raise KeyError(f'invalid lattice family "{family}"') + raise KeyError(f'invalid crystal family "{family}"') self.family = family @@ -40,7 +40,7 @@ class LatticeFamily(): @property def immutable(self): - """Return immutable parameters lattice parameters.""" + """Return immutable lattice parameters.""" return self._immutable[self.family] diff --git a/python/damask/_orientation.py b/python/damask/_orientation.py index fec73c551..d1a5e9c7a 100644 --- a/python/damask/_orientation.py +++ b/python/damask/_orientation.py @@ -33,10 +33,10 @@ lattice_symmetries = { _parameter_doc = \ """ family : {'triclinic', 'monoclinic', 'orthorhombic', 'tetragonal', 'hexagonal', 'cubic'} - Crystal family. Mutual exclusive with 'lattice' parameter. + Crystal family. Mutually exclusive with 'lattice' parameter. lattice : {'aP', 'mP', 'mS', 'oP', 'oS', 'oI', 'oF', 'tP', 'tI', 'hP', 'cP', 'cI', 'cF'}. Bravais lattice in Pearson notation. - Mutual exclusive with 'family' parameter. + Mutually exclusive with 'family' parameter. a : float, optional Length of lattice parameter 'a'. b : float, optional @@ -76,7 +76,7 @@ class Orientation(Rotation,Crystal): - triclinic - aP : primitive - - monoclininic + - monoclinic - mP : primitive - mS : base-centered