artist.geometry.transforms

Functions

rotate_distortions(→ torch.Tensor)

Rotate the distortions for the light source.

rotate_e(→ torch.Tensor)

Rotate around the east axis.

rotate_n(→ torch.Tensor)

Rotate around the north axis.

rotate_u(→ torch.Tensor)

Rotate around the up axis.

translate_enu(→ torch.Tensor)

Translate in all directions.

perform_canting(→ torch.Tensor)

Perform canting (rotation) on data like surface points or surface normals.

Module Contents

artist.geometry.transforms.rotate_distortions(e: torch.Tensor, u: torch.Tensor, device: torch.device | None = None) torch.Tensor

Rotate the distortions for the light source.

Rotate around the up and then the east axis in this very order in a right-handed east-north-up coordinate system. Positive angles result in a rotation in the mathematical direction of rotation, i.e., counter-clockwise. Points need to be multiplied as column vectors from the right-hand side with the resulting rotation matrix. Note that the order is fixed due to the non-commutative property of matrix-matrix multiplication.

Parameters

etorch.Tensor

East rotation angles in radians. Shape is [number_of_heliostats, number_of_rays, number_of_surface_points].

utorch.Tensor

Up rotation angles in radians. Shape is [number_of_heliostats, number_of_rays, number_of_surface_points].

devicetorch.device | None

The device on which to perform computations or load tensors and models (default is None). If None, ARTIST will automatically select the most appropriate device (CUDA or CPU) based on availability and OS.

Raises

ValueError

If the shapes of the input tensors do not match.

Returns

torch.Tensor

Batched 4×4 rotation matrices, one per distortion sample. Shape is [number_of_heliostats, number_of_rays, number_of_surface_points, 4, 4].

artist.geometry.transforms.rotate_e(e: torch.Tensor, device: torch.device | None = None) torch.Tensor

Rotate around the east axis.

Rotate around the east axis in a right-handed east-north-up coordinate system. Positive angles result in a rotation in the mathematical direction of rotation, i.e., counter-clockwise. Points need to be multiplied as column vectors from the right-hand side with the resulting rotation matrix.

Parameters

etorch.Tensor

East rotation angles in radians. Shape is [number_of_heliostats].

devicetorch.device | None

The device on which to perform computations or load tensors and models (default is None). If None, ARTIST will automatically select the most appropriate device (CUDA or CPU) based on availability and OS.

Returns

torch.Tensor

Batched 4×4 east-axis rotation matrices, one per heliostat. Shape is [number_of_heliostats, 4, 4].

artist.geometry.transforms.rotate_n(n: torch.Tensor, device: torch.device | None = None) torch.Tensor

Rotate around the north axis.

Rotate around the north axis in a right-handed east-north-up coordinate system. Positive angles result in a rotation in the mathematical direction of rotation, i.e., counter-clockwise. Points need to be multiplied as column vectors from the right-hand side with the resulting rotation matrix.

Parameters

ntorch.Tensor

North rotation angles in radians. Shape is [number_of_heliostats].

devicetorch.device | None

The device on which to perform computations or load tensors and models (default is None). If None, ARTIST will automatically select the most appropriate device (CUDA or CPU) based on availability and OS.

Returns

torch.Tensor

Batched 4×4 north-axis rotation matrices, one per heliostat. Shape is [number_of_heliostats, 4, 4].

artist.geometry.transforms.rotate_u(u: torch.Tensor, device: torch.device | None = None) torch.Tensor

Rotate around the up axis.

Rotate around the up axis in a right-handed east-north-up coordinate system. Positive angles result in a rotation in the mathematical direction of rotation, i.e., counter-clockwise. Points need to be multiplied as column vectors from the right-hand side with the resulting rotation matrix.

Parameters

utorch.Tensor

Up rotation angles in radians. Shape is [number_of_heliostats].

devicetorch.device | None

The device on which to perform computations or load tensors and models (default is None). If None, ARTIST will automatically select the most appropriate device (CUDA or CPU) based on availability and OS.

Returns

torch.Tensor

Batched 4×4 up-axis rotation matrices, one per heliostat. Shape is [number_of_heliostats, 4, 4].

artist.geometry.transforms.translate_enu(e: torch.Tensor, n: torch.Tensor, u: torch.Tensor, device: torch.device | None = None) torch.Tensor

Translate in all directions.

Translate a given point in the east, north, and up direction. Note that the point must be multiplied as a column vector from the right-hand side of the resulting matrix.

Parameters

etorch.Tensor

East translation distances in meters. Shape is [number_of_heliostats].

ntorch.Tensor

North translation distances in meters. Shape is [number_of_heliostats].

utorch.Tensor

Up translation distances in meters. Shape is [number_of_heliostats].

devicetorch.device | None

The device on which to perform computations or load tensors and models (default is None). If None, ARTIST will automatically select the most appropriate device (CUDA or CPU) based on availability and OS.

Raises

ValueError

If the sizes of the input tensors do not match.

Returns

torch.Tensor

Batched 4×4 translation matrices, one per heliostat. Shape is [number_of_heliostats, 4, 4].

artist.geometry.transforms.perform_canting(canting_angles: torch.Tensor, data: torch.Tensor, inverse: bool = False, device: torch.device | None = None) torch.Tensor

Perform canting (rotation) on data like surface points or surface normals.

Parameters

canting_anglestorch.Tensor

Canting angles. Shape is [number_of_surfaces, number_of_facets, 2, 4].

datatorch.Tensor

Data to be canted. Shape is [number_of_surfaces, number_of_facets, number_of_points_per_facet, 4].

inversebool

Indicates the direction of the rotation. Use inverse=False for canting and inverse=True for decanting (default is False).

devicetorch.device | None

The device on which to perform computations or load tensors and models (default is None). If None, ARTIST will automatically select the most appropriate device (CUDA or CPU) based on availability and OS.

Returns

torch.Tensor

The (de-)canted data. Shape is [number_of_surfaces, number_of_facets, number_of_points_per_facet, 4].