artist.field.kinematic ====================== .. py:module:: artist.field.kinematic .. autoapi-nested-parse:: Kinematic modules in ``ARTIST``. Classes ------- .. autoapisummary:: artist.field.kinematic.Kinematic Module Contents --------------- .. py:class:: Kinematic Bases: :py:obj:`torch.nn.Module` Initialize the kinematic. The abstract kinematic implements a template for the construction of inheriting kinematics which currently can only be rigid body kinematics. The kinematic is concerned with the mechanics and motion of the heliostats and their actuators. The abstract base class defines two methods to determine orientation matrices, which all kinematics need to overwrite. .. py:method:: incident_ray_directions_to_orientations(incident_ray_directions: torch.Tensor, aim_points: torch.Tensor, device: Optional[torch.device] = None) -> torch.Tensor :abstractmethod: Compute orientation matrices given incident ray directions. Parameters ---------- incident_ray_directions : torch.Tensor The directions of the incident rays as seen from the heliostats. Tensor of shape [number_of_active_heliostats, 4]. aim_points : torch.Tensor The aim points for the active heliostats. Tensor of shape [number_of_active_heliostats, 4]. device : Optional[torch.device] 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 ------ NotImplementedError Whenever called (abstract base class method). .. py:method:: motor_positions_to_orientations(motor_positions: torch.Tensor, device: Optional[torch.device] = None) -> torch.Tensor :abstractmethod: Compute orientation matrices given the motor positions. Parameters ---------- motor_positions : torch.Tensor The motor positions. Tensor of shape [number_of_active_heliostats, 2]. device : Optional[torch.device] 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 ------ NotImplementedError Whenever called (abstract base class method). .. py:method:: forward(incident_ray_directions: torch.Tensor, aim_points: torch.Tensor, device: Optional[torch.device] = None) -> torch.Tensor Specify the forward operation of the kinematic, i.e., calculate orientation matrices given the incident ray directions. Parameters ---------- incident_ray_directions : torch.Tensor The directions of the incident rays as seen from the heliostats. Tensor of shape [number_of_active_heliostats, 4]. aim_points : torch.Tensor The aim points for the active heliostats. Tensor of shape [number_of_active_heliostats, 4]. device : Optional[torch.device] 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 orientation matrices. Tensor of shape [number_of_active_heliostats, 4, 4].