SphericalRegion#
- class orix.vector.SphericalRegion(data=None)[source]#
Bases:
Vector3d
Normals segmenting a sphere.
Each entry represents a plane normal in 3D. Vectors can lie in, on, or outside the spherical region.
Examples
>>> from orix.vector import SphericalRegion, Vector3d >>> sr = SphericalRegion([0, 0, 1]) # Region above the x-y plane >>> v = Vector3d([(0, 0, 1), (0, 0, -1), (1, 0, 0)]) >>> v < sr array([ True, False, False]) >>> v <= sr array([ True, False, True])
Attributes
Azimuth spherical coordinate, i.e. the angle \(\phi \in [0, 2\pi]\) from the positive z-axis to a point on the sphere, according to the ISO 31-11 standard [Weisstein, 2005].
Return the data.
Return the number of navigation dimensions of the object.
Return the norm of the data.
Return the perpendicular vectors.
Polar spherical coordinate, i.e. the angle \(\theta \in [0, \pi]\) from the positive z-axis to a point on the sphere, according to the ISO 31-11 standard [Weisstein, 2005].
Return the radial spherical coordinate, i.e. the distance from a point on the sphere to the origin, according to the ISO 31-11 standard [Weisstein, 2005].
Return the shape of the object.
Return the total number of entries in this object.
Return the unit object.
Return or set the x coordinates.
Return the coordinates as three arrays, useful for plotting.
Return or set the y coordinates.
Return or set the z coordinate.
Methods
SphericalRegion.angle_with
(other[, degrees])Return the angles between these vectors in other vectors.
SphericalRegion.cross
(other)Return the cross product of a vector with another vector.
SphericalRegion.dot
(other)Return the dot products of the vectors and the other vectors.
SphericalRegion.dot_outer
(other[, lazy, ...])Return the outer dot products of all vectors and all the other vectors.
SphericalRegion.draw_circle
([projection, ...])Draw great or small circles with a given
opening_angle
to to the vectors in the stereographic projection.Return an empty object with the appropriate dimensions.
Return a new object with the same data in a single column.
SphericalRegion.from_path_ends
(vectors[, ...])Return vectors along the shortest path on the sphere between two or more consectutive vectors.
SphericalRegion.from_polar
(azimuth, polar[, ...])Initialize from spherical coordinates according to the ISO 31-11 standard [Weisstein, 2005].
SphericalRegion.get_circle
([opening_angle, ...])Get vectors delineating great or small circle(s) with a given
opening_angle
about each vector.SphericalRegion.get_nearest
(x[, inclusive, ...])Return the vector in
x
with the smallest angle to this vector.SphericalRegion.get_random_sample
([size, ...])Return a new flattened object from a random sample of a given size.
SphericalRegion.in_fundamental_sector
(symmetry)Project vectors to a symmetry's fundamental sector (inverse pole figure).
Plot the Inverse Pole Density Function (IPDF) within the fundamental sector of a given point group symmetry in the stereographic projection.
Return the mean vector.
Plot the Pole Density Function (PDF) on a given hemisphere in the stereographic projection.
SphericalRegion.random
([shape])Create object with random data.
SphericalRegion.reshape
(*shape)Return a new object with the same data in a new shape.
SphericalRegion.rotate
([axis, angle])Convenience function for rotating this vector.
SphericalRegion.scatter
([projection, ...])Plot vectors in the stereographic projection.
Return a new object with the same data with length 1-dimensions removed.
SphericalRegion.stack
(sequence)Return a stacked object from the sequence.
SphericalRegion.to_polar
([degrees])Return the azimuth \(\phi\), polar \(\theta\), and radial \(r\) spherical coordinates defined as in the ISO 31-11 standard [Weisstein, 2005].
SphericalRegion.transpose
(*axes)Return a new object with the same data transposed.
SphericalRegion.unique
([return_index, ...])Return a new object containing only this object's unique entries.
Return a unit vector in the x-direction.
Return a unit vector in the y-direction.
SphericalRegion.zero
([shape])Return zero vectors in the specified shape.
Return a unit vector in the z-direction.