artist.io.h5_scenario_parser
Functions
|
Load a surface configuration from an HDF5 scenario file. |
|
Load kinematics deviations from an HDF5 scenario file. |
|
Load kinematics deviations for a rigid body kinematics from an HDF5 scenario file. |
|
Load actuator parameters from an HDF5 scenario file. |
|
Load actuator parameters for linear actuators from an HDF5 scenario file. |
|
Load actuator parameters for ideal actuators from an HDF5 scenario file. |
Module Contents
- artist.io.h5_scenario_parser.surface_config(prototype: bool, scenario_file: h5py.File, device: torch.device | None = None) artist.util.config.SurfaceConfig
Load a surface configuration from an HDF5 scenario file.
Parameters
- prototypebool
Whether a prototype or an individual surface configuration should be loaded.
- scenario_fileh5py.File
The opened scenario HDF5 file containing the information.
- devicetorch.device | None
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill automatically select the most appropriate device (CUDA or CPU) based on availability and OS.
Returns
- SurfaceConfig
The surface configuration.
- artist.io.h5_scenario_parser.kinematics_deviations(prototype: bool, kinematics_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 kinematics deviations from an HDF5 scenario file.
Parameters
- prototypebool
Whether a prototype or individual kinematics deviations should be loaded.
- kinematics_typestr
The kinematics type.
- scenario_fileh5py.File
The opened scenario HDF5 file containing the information.
- loglogging.Logger
The logger for the scenario loader.
- heliostat_namestr | None
The heliostat name, only needed for individual heliostats, not prototypes (default is None).
- devicetorch.device | None
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill automatically select the most appropriate device (CUDA or CPU) based on availability and OS.
Raises
- ValueError
If the kinematics type in the scenario file is unknown.
Returns
- torch.Tensor
Translation deviation parameters for the kinematics.
- torch.Tensor
Rotation deviation parameters for the kinematics.
- int
The number of actuators needed for this kinematics type.
- artist.io.h5_scenario_parser.rigid_body_deviations(kinematics_config: h5py.File, log: logging.Logger, heliostat_name: str | None = None, device: torch.device | None = None) tuple[torch.Tensor, torch.Tensor]
Load kinematics deviations for a rigid body kinematics from an HDF5 scenario file.
Parameters
- kinematics_configh5py.File
The opened scenario HDF5 file containing the information.
- loglogging.Logger
The logger for the scenario loader.
- heliostat_namestr | None
The heliostat name, only needed for individual heliostats, not prototypes (default is None).
- devicetorch.device | None
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill automatically select the most appropriate device (CUDA or CPU) based on availability and OS.
Returns
- torch.Tensor
Translation deviation parameters for the kinematics. Shape is
[9].- torch.Tensor
Rotation deviation parameters for the kinematics. Shape is
[4].
- artist.io.h5_scenario_parser.actuator_parameters(prototype: bool, scenario_file: h5py.File, actuator_type: str, number_of_actuators: int, 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
- prototypebool
Whether prototype or individual actuator parameters should be loaded.
- scenario_fileh5py.File
The opened scenario HDF5 file containing the information.
- actuator_typestr
The actuator type.
- number_of_actuatorsint
The number of actuators.
- loglogging.Logger
The logger for the scenario loader.
- heliostat_namestr | None
The heliostat name, only needed for individual heliostats, not prototypes (default is None).
- devicetorch.device | None
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill 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 each actuator in the file.
- torch.Tensor
Optimizable actuator parameters for each actuator in the file.
- artist.io.h5_scenario_parser.linear_actuators(actuator_config: h5py.File, number_of_actuators: int, 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_configh5py.File
The opened scenario HDF5 file containing the information.
- number_of_actuatorsint
The number of actuators used for a specific kinematics.
- loglogging.Logger
The logger for the scenario loader.
- heliostat_namestr | None
The heliostat name, only needed for individual heliostats, not prototypes (default is None).
- devicetorch.device | None
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill 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 kinematics 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.
- artist.io.h5_scenario_parser.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_configh5py.File
The opened scenario HDF5 file containing the information.
- number_of_actuatorsint
The number of actuators used for a specific kinematics.
- devicetorch.device | None
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill 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 kinematics 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.