Commit Graph

215 Commits

Author SHA1 Message Date
Martin Diehl cdd3b44519 using more precise coefficients also in test
changes in _rotation.py are just cosmetic
2022-06-09 23:54:56 +02:00
Philip Eisenlohr 8fefc46f38 fixed FZ conditions and tightened tolerance to accommodate higher precision "tfit" 2022-06-09 16:38:13 -04:00
Martin Diehl b9cea941cc simplified 2022-05-23 10:37:57 +02:00
Franz Roters d83f0acf7f Merge branch 'rotation-help-polish' into 'development'
Rotation help improvements

See merge request damask/DAMASK!575
2022-05-13 09:18:35 +00:00
Philip Eisenlohr 75272163cd slight polish of help messages 2022-05-10 15:45:19 -04:00
Martin Diehl f27969caf9 documenting and testing 2022-05-08 23:22:03 +02:00
Martin Diehl 06cef42927 use physical/ISO convention 2022-04-28 15:57:04 +02:00
Martin Diehl a0455cadf3 consistently have input in radians 2022-04-28 15:46:19 +02:00
Martin Diehl 5c4d481155 common order is theta,phi 2022-04-28 01:33:33 +02:00
Martin Diehl e0d2859202 better test coverage 2022-04-27 17:25:39 +02:00
Philip Eisenlohr 8f0240c67b avoid option clash in Orientation.from_fiber_component 2022-04-27 08:59:55 -04:00
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