Commit Graph

204 Commits

Author SHA1 Message Date
Martin Diehl 52d595ff62 numpy-compatible shape definition
can be scalar or sequence.
Try to avoid to use the term 'rotation' in the documentation and also
don't specify the return type because it will be used by
'damask.Orientation'.
2022-03-19 10:55:03 +01:00
Martin Diehl 4972c43b17 return scalar for None, not one-point array 2022-03-18 09:06:48 +01:00
Philip Eisenlohr 4f09bbc715 documented return type for from_fiber/spherical_component 2022-03-14 16:32:52 -04:00
Philip Eisenlohr 378b8b2396 use consistent "shape" keyword when shape not clear from input data 2022-03-14 16:24:05 -04:00
Philip Eisenlohr 320ab70270 Merge branch 'development' into 'python-vtk-improvements'
# Conflicts:
#   python/damask/_vtk.py
2022-02-23 14:20:52 +00:00
Philip Eisenlohr 5882a8560c shortened __repr__ code 2022-02-23 08:38:03 -05:00
Martin Diehl 77e57a268c unified.
the default python description "Return repr(self)." is pretty useless,
so better agree on a DAMASK standard
2022-02-23 07:21:30 +01:00
Philip Eisenlohr 47dcd4bd41 follow Python exception message convention of lower-case 2022-02-22 10:42:05 -05:00
Philip Eisenlohr aeb0e527ec Consistent formatting of raised messages 2022-02-22 09:46:12 -05:00
Philip Eisenlohr 91cb0f37c8 favor numpy intrinsic over list-comprehension 2022-02-17 12:16:53 -05:00
Martin Diehl 9972a22043 precision is ok, but numpy.sum takes sum over all dimensions per default 2022-02-17 07:58:56 +01:00
Martin Diehl ed50cd022b shorter, potential for higher precision
np.sum has an better alogrithm but fails ...
2022-02-16 23:40:02 +01:00
Martin Diehl 35caed305f consistently define allclose for own type only 2022-02-15 22:08:12 +01:00
Martin Diehl 2907facfd3 polishing
classes should return 'MyType' for inheritance without hassle
2022-02-13 02:47:08 +01:00
Philip Eisenlohr 0a52ae3b6f polishing of help and style; relax to FloatSequence type where appropriate but keep doc at np.ndarray 2022-02-11 14:50:55 -05:00
Daniel Otto de Mentock 72978df099 minor correction 2022-02-04 17:41:29 +01:00
Daniel Otto de Mentock c1c2336638 reverted __eq__ and __ne type verification to return NotImplemented constant
changed rotation.average input type to FloatSequence

minor adjustments
2022-02-04 16:57:25 +01:00
Daniel Otto de Mentock 019ae1c536 adjusted typecheck in __eq__ and __ne__ functions 2022-02-04 11:43:35 +01:00
Daniel Otto de Mentock 9dad54304c added generic types to remaining non-overwritten rotation functions (exception __mul__) 2022-02-04 09:57:42 +01:00
Daniel Otto de Mentock d1f9e98e3c moved typecheck of __ne__ functions to __eq__
added initial empty runtimeerror to Schmid function

minor corrections
2022-02-03 16:11:09 +01:00
Daniel Otto de Mentock f80de7d0b3 added NumpyRngSeed type to rotation rng_seed objects 2022-02-03 12:04:31 +01:00
Daniel Otto de Mentock fc8cd6322c adjusted rng_seed type in rotation
adjusted NotImplemented error return in orientation
2022-02-02 12:16:57 +01:00
Daniel Otto de Mentock 3df411469b Added generic type to rotation functions not overwritten by orientation 2022-02-02 12:14:00 +01:00
Daniel Otto de Mentock 71bc92fed0 changed quote layout to single quote Added NotImplemented returnvalue to __eq__ functions 2022-02-02 11:11:59 +01:00
Daniel Otto de Mentock 33731e4948 adjusted bracket error in from_fiber_component 2022-01-28 15:15:20 +01:00
Daniel Otto de Mentock 53a0de2271 Adjusted docstrings in rotation
rewrote map(np.radians()) line to one line tuple
2022-01-28 13:40:37 +01:00
Daniel Otto de Mentock 92ac018486 removed superfluous break in function definition in rotation 2022-01-28 13:34:42 +01:00
Daniel Otto de Mentock 0fe51f58a8 [skip ci] changed almost all function definition lines to multiline 2022-01-26 15:09:09 +01:00
Daniel Otto de Mentock 25513d572b minor type adjustment to rotation module removed superfluous Sequence type from orientation module 2022-01-14 14:55:08 +01:00
Daniel Otto de Mentock aabeee9de1 Replaced relevant Sequences with FloatSequence and IntSequence types 2022-01-14 14:37:48 +01:00
Daniel Otto de Mentock 4ba9935ccc Merge branch 'development' of git.damask.mpie.de:damask/DAMASK into typehints_orientation_rotation 2022-01-13 17:23:24 +01:00
Martin Diehl 3acabcdc7f docstring adjustments 2022-01-12 23:57:21 +01:00
Daniel Otto de Mentock 0a31ff0980 added type:ignore statement to broken line 2022-01-06 14:33:41 +01:00
Daniel Otto de Mentock 9a9ec11c29 added generator typehint to from_random function 2022-01-03 16:44:27 +01:00
Daniel Otto de Mentock 5702614c4f expanded rng_seed typehint to array_like type
adjusted alpha and beta types for from_fiber_component to also accept 
lists
removed superfluous kwargs argument in from_ODF and from_parallel 
functions
2022-01-03 15:35:28 +01:00
Daniel Otto de Mentock 65633ee6b1 added typehints for rotation.average function [skip ci] 2021-12-14 17:19:00 +01:00
Daniel Otto de Mentock cef885cfde added first typehints for rotation and orientation modules 2021-12-14 17:05:00 +01:00
Martin Diehl 509835bf0b type hints for tensor
adjustments to Rotation/Orientation needed to enable type checking with
mypy
2021-10-31 22:37:54 +01:00
Philip Eisenlohr f3bcdca5e8 slight improvements to help; use a/b instead of a*~b 2021-09-24 08:54:31 -04:00
Martin Diehl adecb4c9c2 avoid clash of notation with substitution extension 2021-09-23 21:46:53 +02:00
Philip Eisenlohr c93c4e462d [skip ci] changed "Bunge-Euler" to "Bunge Euler" and added note on axis sequence. 2021-09-09 14:05:09 +00:00
Philip Eisenlohr 4b163b9980 [skip ci] remove auto-inserted closing parentheses 2021-09-08 18:45:12 +00:00
Philip Eisenlohr eae4a7f29c [skip ci] stray en-dash 2021-09-08 18:39:06 +00:00
Philip Eisenlohr b337575963 polished langauge of help messages 2021-09-08 13:10:49 -04:00
Martin Diehl 68ac855f45 common help formulation 2021-09-01 22:33:04 +02:00
Martin Diehl a6842abebf give defaults
ODF etc seem to use degrees as default but mostly we use radians. Should
be discussed
2021-09-01 19:33:46 +02:00
Martin Diehl 63fee141b9 rubbish
neper offers advanced seeding/meshing methods
2021-07-16 10:37:09 +02:00
Martin Diehl f11e7742e5 better document
make damask.mpie.de colorful ;)
2021-07-16 10:30:33 +02:00
Martin Diehl 2648464525 relax tolerances for quaternion initialization
we read in ASCII/YAML files, 1e-8 must be enough
2021-05-19 09:46:02 +02:00
Philip Eisenlohr b1bbe5528b [skip ci] fixed mistake (R --> Q) in example 2021-04-26 17:09:11 +00:00