tensors
FabricTensor
Fabric tensor of directional density function.
density
classmethod
density(
*coords: ndarray,
deg: int,
kind: Literal["second", "third"] = "third",
theta_den: ndarray | None = None,
phi_den: ndarray | None = None,
csys: Literal["cartesian", "polar"] = "polar"
) -> Tuple[ndarray, ndarray, ndarray]
Directional density function, defined as for the second kind:
and for the third kind:
PARAMETER | DESCRIPTION |
---|---|
coords
|
Tuple of (theta, phi, radius) in polar coordinates, or tuple of (x, y, z) in cartesian coordinates. |
deg
|
Degree of the fabric tensor, must be even and greater or equal to 0, by default 2.
TYPE:
|
kind
|
Kind of the fabric tensor to use, by default "third".
TYPE:
|
theta_den
|
Meshgrid of theta for the directional density function, by default theta is derived from coords.
TYPE:
|
phi_den
|
Meshgrid of phi for the directional density function, by default phi is derived from coords.
TYPE:
|
csys
|
Coordinate system of the directional data, by default "polar".
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Tuple[ndarray, ndarray, ndarray]
|
Tuple of meshgrid of theta, meshgrid of phi, and directional density function. |
first_kind
classmethod
Fabric tensor of the first kind, defined as the average of the product of directional coordinates:
PARAMETER | DESCRIPTION |
---|---|
coords
|
Tuple of (theta, phi, radius) in polar coordinates, or tuple of (x, y, z) in cartesian coordinates. |
deg
|
Degree of the fabric tensor, must be greater or equal to 0.
TYPE:
|
csys
|
Coordinate system of the directional data, by default "polar".
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ndarray
|
Fabric tensor of the first kind of shape |
second_kind
classmethod
Fabric tensor of the second kind.
PARAMETER | DESCRIPTION |
---|---|
coords
|
Tuple of (theta, phi, radius) in polar coordinates, or tuple of (x, y, z) in cartesian coordinates. |
deg
|
Degree of the fabric tensor, must be even and greater or equal to 0.
TYPE:
|
csys
|
Coordinate system of the directional data, by default "polar".
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ndarray
|
Fabric tensor of the first kind of shape |
tensor
classmethod
tensor(
*coords: ndarray,
deg: int,
kind: Literal["first", "second", "third"],
csys: Literal["cartesian", "polar"] = "polar"
) -> ndarray
Calculate the fabric tensor of the directional density function.
PARAMETER | DESCRIPTION |
---|---|
coords
|
Tuple of (theta, phi, radius) in polar coordinates, or tuple of (x, y, z) in cartesian coordinates. |
deg
|
Degree of the fabric tensor, must be even and greater or equal to 0.
TYPE:
|
kind
|
Kind of the fabric tensor to use.
TYPE:
|
csys
|
Coordinate system of the directional data, by default "polar".
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ndarray
|
Fabric tensor of the directional density function of shape |
third_kind
classmethod
Fabric tensor of the third kind.
PARAMETER | DESCRIPTION |
---|---|
coords
|
Tuple of (theta, phi, radius) in polar coordinates, or tuple of (x, y, z) in cartesian coordinates. |
deg
|
Degree of the fabric tensor, must be even and greater or equal to 0.
TYPE:
|
csys
|
Coordinate system of the directional data, by default "polar".
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ndarray
|
Fabric tensor of the first kind of shape |