artist.util.raytracing_utils ============================ .. py:module:: artist.util.raytracing_utils Functions --------- .. autoapisummary:: artist.util.raytracing_utils.reflect artist.util.raytracing_utils.line_plane_intersections Module Contents --------------- .. py:function:: reflect(incident_ray_directions: torch.Tensor, reflection_surface_normals: torch.Tensor) -> torch.Tensor Reflect incoming rays given the normals of reflective surfaces. Parameters ---------- incident_ray_directions : torch.Tensor The direction of the incident ray as seen from the heliostats. Tensor of shape [number_of_active_heliostats, 1, 4]. reflection_surface_normals : torch.Tensor The normals of the reflective surfaces. Tensor of shape [number_of_active_heliostats, number_of_combined_surface_normals_all_facets, 4] Returns ------- torch.Tensor The reflected rays. Tensor of shape [number_of_active_heliostats, number_of_combined_surface_normals_all_facets, 4] .. py:function:: line_plane_intersections(rays: artist.scene.rays.Rays, points_at_ray_origins: torch.Tensor, target_areas: artist.field.tower_target_areas.TowerTargetAreas, target_area_mask: torch.Tensor | None = None, epsilon: float = 1e-06, device: torch.device | None = None) -> tuple[torch.Tensor, torch.Tensor] Compute line-plane intersections of the rays and the (receiver) planes. Parameters ---------- rays : Rays The rays. points_at_ray_origins : torch.Tensor The surface points of the ray origins. Tensor of shape [number_of_active_heliostats, number_of_combined_surface_points_all_facets, 4]. target_areas : TowerTargetAreas All possible tower target areas with their properties. target_area_mask : torch.Tensor | None The indices of target areas corresponding to each heliostat (default is None). If none are provided, the first target area of the scenario will be linked to all heliostats. Tensor of shape [number_of_active_heliostats]. epsilon : float A small value corresponding to the upper limit (default is 1e-6). device : torch.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 there are no intersections on the front of the target plane. Returns ------- torch.Tensor The intersections of the lines and planes. Tensor of shape [number_of_active_heliostats, number_of_rays, number_of_combined_surface_points_all_facets, 4]. torch.Tensor The absolute intensities of the rays hitting the target planes. Tensor of shape [number_of_active_heliostats, number_of_rays, number_of_combined_surface_points_all_facets].