artist.data_parser.h5_scenario_parser ===================================== .. py:module:: artist.data_parser.h5_scenario_parser Functions --------- .. autoapisummary:: artist.data_parser.h5_scenario_parser.surface_config artist.data_parser.h5_scenario_parser.kinematic_deviations artist.data_parser.h5_scenario_parser.rigid_body_deviations artist.data_parser.h5_scenario_parser.actuator_parameters artist.data_parser.h5_scenario_parser.linear_actuators artist.data_parser.h5_scenario_parser.ideal_actuators Module Contents --------------- .. py:function:: surface_config(prototype: bool, scenario_file: h5py.File, device: torch.device | None = None) -> artist.scenario.configuration_classes.SurfaceConfig Load a surface configuration from an HDF5 scenario file. Parameters ---------- prototype : bool Loading a prototype or an individual surface configuration. scenario_file : h5py.File The opened scenario HDF5 file containing the information. 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. Returns ------- SurfaceConfig The surface configuration. .. py:function:: kinematic_deviations(prototype: bool, kinematic_type: str, scenario_file: h5py.File, log: logging.Logger, heliostat_name: str | None = None, device: torch.device | None = None) -> tuple[torch.Tensor, torch.Tensor, int] Load kinematic deviations from an HDF5 scenario file. Parameters ---------- prototype : bool Loading prototype or individual kinematic deviations. kinematic_type : str The kinematic type. scenario_file : h5py.File The opened scenario HDF5 file containing the information. log : logging.Logger The logger for the scenario loader. heliostat_name : str | None The heliostat name, only needed for individual heliostats, not prototypes (default is None). 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 the kinematic type in the scenario file is unknown. Returns ------- torch.Tensor Translation deviation parameters for the kinematic. torch.Tensor Rotation deviation parameters for the kinematic. int The number of actuators needed for this kinematic type. .. py:function:: rigid_body_deviations(kinematic_config: h5py.File, log: logging.Logger, heliostat_name: str | None = None, device: torch.device | None = None) -> tuple[torch.Tensor, torch.Tensor] Load kinematic deviations for a rigid body kinematic from an HDF5 scenario file. Parameters ---------- kinematic_config : h5py.File The opened scenario HDF5 file containing the information. log : logging.Logger The logger for the scenario loader. heliostat_name : str | None The heliostat name, only needed for individual heliostats, not prototypes (default is None). 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. Returns ------- torch.Tensor Translation deviation parameters for the kinematic. Tensor of shape [9]. torch.Tensor Rotation deviation parameters for the kinematic. Tensor of shape [4]. .. py:function:: actuator_parameters(prototype: bool, scenario_file: h5py.File, actuator_type: str, number_of_actuators: int, initial_orientation: torch.Tensor, log: logging.Logger, heliostat_name: str | None = None, device: torch.device | None = None) -> tuple[torch.Tensor, torch.Tensor] Load actuator parameters from an HDF5 scenario file. Parameters ---------- prototype : bool Loading prototype or individual actuator parameters. scenario_file : h5py.File The opened scenario HDF5 file containing the information. actuator_type : str The actuator type. number_of_actuators : int The number of actuators. initial_orientation : torch.Tensor The initial orientation of the heliostat. log : logging.Logger The logger for the scenario loader. heliostat_name : str | None The heliostat name, only needed for individual heliostats, not prototypes (default is None). 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 the actuator type in the scenario file is unknown. Returns ------- torch.Tensor Non-optimizable actuator parameters for for each actuator in the file. torch.Tensor Optimizable actuator parameters for for each actuator in the file. .. py:function:: linear_actuators(actuator_config: h5py.File, number_of_actuators: int, initial_orientation: torch.Tensor, log: logging.Logger, heliostat_name: str | None = None, device: torch.device | None = None) -> tuple[torch.Tensor, torch.Tensor] Load actuator parameters for linear actuators from an HDF5 scenario file. Parameters ---------- actuator_config : h5py.File The opened scenario HDF5 file containing the information. number_of_actuators : int The number of actuators used for a specific kinematic. initial_orientation : torch.Tensor The initial orientation of the heliostat. log : logging.Logger The logger for the scenario loader. heliostat_name : str | None The heliostat name, only needed for individual heliostats, not prototypes (default is None). 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 the file contains the wrong amount of actuators for a heliostat with a specific kinematic type. Returns ------- torch.Tensor Non-optimizable actuator parameters for for each actuator in the file. torch.Tensor Optimizable actuator parameters for for each actuator in the file. .. py:function:: ideal_actuators(actuator_config: h5py.File, number_of_actuators: int, device: torch.device | None = None) -> tuple[torch.Tensor, torch.Tensor] Load actuator parameters for ideal actuators from an HDF5 scenario file. Parameters ---------- actuator_config : h5py.File The opened scenario HDF5 file containing the information. number_of_actuators : int The number of actuators used for a specific kinematic. 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 the file contains the wrong number of actuators for a heliostat with a specific kinematic type. Returns ------- torch.Tensor Non-optimizable actuator parameters for each actuator in the file. torch.Tensor Optimizable actuator parameters for each actuator in the file.