@@ -75,7 +75,9 @@ def symmetry(self) -> Symmetry:
7575 @symmetry .setter
7676 def symmetry (self , value : Symmetry ) -> None :
7777 if not isinstance (value , Symmetry ):
78- raise TypeError ("Value must be an instance of orix.quaternion.Symmetry." )
78+ raise TypeError (
79+ "Value must be an instance of orix.quaternion.Symmetry."
80+ )
7981 self ._symmetry = (C1 , value )
8082
8183 @property
@@ -356,39 +358,40 @@ def from_scipy_rotation(
356358 def from_path_ends (
357359 cls , points : Orientation , closed : bool = False , steps : int = 100
358360 ) -> Misorientation :
359- """Return orientations tracing the shortest path (ignoring
360- symmetry) between two or more consecutive points.
361+ """Return orientations tracing the shortest path between two
362+ or more consecutive points.
361363
362364 Parameters
363365 ----------
364366 points
365- Two or more orientations that define waypoints along
366- a path through rotation space (SO3) .
367+ Two or more orientations that define points along the
368+ path.
367369 closed
368- Option to add a final trip from the last waypoint back to
370+ Option to add a final trip from the last point back to
369371 the first, thus closing the loop. The default is False.
370372 steps
371- Number of orientations to return along the path
372- between each pair of waypoints . The default is 100.
373+ Number of orientations to return between each point
374+ along the path defined by `points` . The default is 100.
373375
374376 Returns
375377 -------
376378 path
377- orientations that map a path between the given waypoints .
379+ regularly spaced orientations following the shortest path .
378380
379- Note
380- -------
381- This function traces a path between points in SO(3), in which there
382- is one and only one direct path between every point. The equivalent
383- is not well-defined for orientations, which define multiple
384- symmetrically-equivalent points in SO(3) with non-equivalent paths
385- between them.
381+ Notes
382+ -----
383+ This function traces the shortest path between points without
384+ any regard to symmetry. Concept of "shortest path" is not
385+ well-defined for orientations, which can define multiple
386+ symmetrically equivalent points with non-equivalent paths.
386387 """
387388 if type (points ) is not cls :
388389 raise TypeError (
389390 f"Points must be an Orientation instance, not of type { type (points )} "
390391 )
391- out = Rotation .from_path_ends (points = points , closed = closed , steps = steps )
392+ out = Rotation .from_path_ends (
393+ points = points , closed = closed , steps = steps
394+ )
392395 return cls (out .data , symmetry = points .symmetry )
393396
394397 @classmethod
@@ -417,7 +420,9 @@ def random(
417420
418421 # --------------------- Other public methods --------------------- #
419422
420- def angle_with (self , other : Orientation , degrees : bool = False ) -> np .ndarray :
423+ def angle_with (
424+ self , other : Orientation , degrees : bool = False
425+ ) -> np .ndarray :
421426 """Return the smallest symmetry reduced angles of rotation
422427 transforming the orientations to the other orientations.
423428
@@ -707,7 +712,9 @@ def plot_unit_cell(
707712 If :attr:`size` > 1.
708713 """
709714 if self .size > 1 :
710- raise ValueError ("Can only plot a single unit cell, so *size* must be 1" )
715+ raise ValueError (
716+ "Can only plot a single unit cell, so *size* must be 1"
717+ )
711718
712719 from orix .plot .unit_cell_plot import _plot_unit_cell
713720
@@ -748,8 +755,12 @@ def in_euler_fundamental_region(self) -> np.ndarray:
748755
749756 # Find the first triplet among the symmetrically equivalent ones
750757 # inside the fundamental region
751- max_alpha , max_beta , max_gamma = np .radians (pg .euler_fundamental_region )
752- is_inside = (alpha <= max_alpha ) * (beta <= max_beta ) * (gamma <= max_gamma )
758+ max_alpha , max_beta , max_gamma = np .radians (
759+ pg .euler_fundamental_region
760+ )
761+ is_inside = (
762+ (alpha <= max_alpha ) * (beta <= max_beta ) * (gamma <= max_gamma )
763+ )
753764 first_nonzero = np .argmax (is_inside , axis = 1 )
754765
755766 euler_in_region = np .column_stack (
@@ -764,7 +775,9 @@ def in_euler_fundamental_region(self) -> np.ndarray:
764775
765776 def scatter (
766777 self ,
767- projection : Literal ["axangle" , "rodrigues" , "homochoric" , "ipf" ] = "axangle" ,
778+ projection : Literal [
779+ "axangle" , "rodrigues" , "homochoric" , "ipf"
780+ ] = "axangle" ,
768781 figure : mfigure .Figure | None = None ,
769782 position : int | tuple [int , int , int ] | SubplotSpec | None = None ,
770783 return_figure : bool = False ,
@@ -890,7 +903,9 @@ def inv(self) -> Orientation:
890903
891904 # -------------------- Other private methods --------------------- #
892905
893- def _dot_outer_dask (self , other : Orientation , chunk_size : int = 20 ) -> da .Array :
906+ def _dot_outer_dask (
907+ self , other : Orientation , chunk_size : int = 20
908+ ) -> da .Array :
894909 """Symmetry reduced dot product of every orientation in this
895910 instance to every orientation in another instance, returned as a
896911 Dask array.
0 commit comments