artist.scenario =============== .. py:module:: artist.scenario .. autoapi-nested-parse:: Bundle all classes relevant for the scenario in ``ARTIST``. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/artist/scenario/configuration_classes/index /autoapi/artist/scenario/h5_scenario_generator/index /autoapi/artist/scenario/scenario/index /autoapi/artist/scenario/surface_generator/index Classes ------- .. autoapisummary:: artist.scenario.ActuatorConfig artist.scenario.ActuatorListConfig artist.scenario.ActuatorParameters artist.scenario.ActuatorPrototypeConfig artist.scenario.FacetConfig artist.scenario.HeliostatConfig artist.scenario.HeliostatListConfig artist.scenario.KinematicConfig artist.scenario.KinematicDeviations artist.scenario.KinematicLoadConfig artist.scenario.KinematicPrototypeConfig artist.scenario.LightSourceConfig artist.scenario.LightSourceListConfig artist.scenario.PowerPlantConfig artist.scenario.PrototypeConfig artist.scenario.SurfaceConfig artist.scenario.SurfacePrototypeConfig artist.scenario.TargetAreaConfig artist.scenario.TargetAreaListConfig artist.scenario.H5ScenarioGenerator artist.scenario.Scenario artist.scenario.SurfaceGenerator Package Contents ---------------- .. py:class:: ActuatorConfig(key: str, type: str, clockwise_axis_movement: bool, min_max_motor_positions: list[float], parameters: ActuatorParameters | None = None) Initialize the actuator configuration. Parameters ---------- key : str The name or descriptor of the actuator. type : str The type of actuator to use, e.g. linear or ideal. clockwise_axis_movement : bool Boolean indicating if the actuator operates in a clockwise or counterclockwise manner. min_max_motor_positions : list[float] The minimum and maximum motor positions. parameters : ActuatorParameters | None The parameters of the actuator. .. py:attribute:: key .. py:attribute:: type .. py:attribute:: clockwise_axis_movement .. py:attribute:: min_max_motor_positions .. py:attribute:: parameters :value: None .. py:method:: create_actuator_dict() -> dict[str, Any] Create a dictionary containing the actuator configuration. Returns ------- dict[str, Any] A dictionary containing the actuator configuration. .. py:class:: ActuatorListConfig(actuator_list: list[ActuatorConfig]) Initialize the actuator list configuration. Parameters ---------- actuator_list : list[ActuatorConfig] A list of actuator configurations. .. py:attribute:: actuator_list .. py:method:: create_actuator_list_dict() -> dict[str, Any] Create a dictionary containing a list of actuator configurations. Returns ------- dict[str, Any] A dictionary containing a list of actuator configurations. .. py:class:: ActuatorParameters(increment: torch.Tensor | None = None, initial_stroke_length: torch.Tensor | None = None, offset: torch.Tensor | None = None, pivot_radius: torch.Tensor | None = None, initial_angle: torch.Tensor | None = None) Initialize the actuator parameters. Parameters ---------- increment : torch.Tensor | None The increment for the actuator initial_stroke_length : torch.Tensor | None The initial stroke length. offset : torch.Tensor | None The initial actuator offset. pivot_radius : torch.Tensor | None The pivot radius of the considered joint. initial_angle : torch.Tensor | None The initial angle of the actuator. .. py:attribute:: increment :value: None .. py:attribute:: initial_stroke_length :value: None .. py:attribute:: offset :value: None .. py:attribute:: pivot_radius :value: None .. py:attribute:: initial_angle :value: None .. py:method:: create_actuator_parameters_dict() -> dict[str, torch.Tensor] Create a dictionary containing the parameters for the actuator. Returns ------- dict[str, torch.Tensor] A dictionary containing the configuration parameters for the actuator. .. py:class:: ActuatorPrototypeConfig(actuator_list: list[ActuatorConfig]) Bases: :py:obj:`ActuatorListConfig` Initialize the actuator list prototype configuration. Parameters ---------- actuator_list : list[ActuatorConfig] A list of actuator configurations. .. py:class:: FacetConfig(facet_key: str, control_points: torch.Tensor, degrees: torch.Tensor, translation_vector: torch.Tensor, canting: torch.Tensor) Initialize the facet configuration. Parameters ---------- facet_key : str The key used to identify the facet in the HDF5 file. control_points : torch.Tensor The NURBS control points. degrees : torch.Tensor The NURBS degree in the east and north direction. translation_vector : torch.Tensor The translation_vector of the facet. canting: torch.Tensor The canting vectors in the east and north direction. .. py:attribute:: facet_key .. py:attribute:: control_points .. py:attribute:: degrees .. py:attribute:: translation_vector .. py:attribute:: canting .. py:method:: create_facet_dict() -> dict[str, Any] Create a dictionary containing the configuration parameters for a facet. Returns ------- dict[str, Any] A dictionary containing the configuration parameters for the facet. .. py:class:: HeliostatConfig(name: str, id: int, position: torch.Tensor, surface: SurfaceConfig | None = None, kinematic: KinematicConfig | None = None, actuators: ActuatorListConfig | None = None) Initialize the single heliostat configuration. Parameters ---------- name : str The name used to identify the heliostat in the HDF5 file. id : int The numerical ID of the heliostat. position : torch.Tensor The position of the heliostat. surface : SurfaceConfig | None An optional individual surface config for the heliostat. kinematic : KinematicConfig | None An optional kinematic config for the heliostat. actuators : ActuatorListConfig | None An optional actuator list config for the heliostat. .. py:attribute:: name .. py:attribute:: id .. py:attribute:: position .. py:attribute:: surface :value: None .. py:attribute:: kinematic :value: None .. py:attribute:: actuators :value: None .. py:method:: create_heliostat_config_dict() -> dict[str, Any] Create a dictionary containing the heliostat configuration parameters. Returns ------- dict[str, Any] A dictionary containing the heliostat configuration parameters. .. py:class:: HeliostatListConfig(heliostat_list: list[HeliostatConfig]) Initialize the heliostat list configuration. Parameters ---------- heliostat_list : list[HeliostatConfig] The list of heliostats to include. .. py:attribute:: heliostat_list .. py:method:: create_heliostat_list_dict() -> dict[str, Any] Create a dictionary containing the heliostat list configuration parameters. Returns ------- dict[str, Any] A dictionary containing the heliostat list configuration parameters. .. py:class:: KinematicConfig(type: str, initial_orientation: torch.Tensor, deviations: KinematicDeviations | None = None) Initialize the kinematic configuration. Parameters ---------- type : str The type of kinematic used. initial_orientation : torch.Tensor The initial orientation of the kinematic configuration. deviations : KinematicDeviations | None The kinematic deviations. .. py:attribute:: type .. py:attribute:: initial_orientation .. py:attribute:: deviations :value: None .. py:method:: create_kinematic_dict() -> dict[str, Any] Create a dictionary containing the configuration parameters for the kinematic. Returns ------- dict[str, Any] A dictionary containing the configuration parameters for the kinematic. .. py:class:: KinematicDeviations(first_joint_translation_e: torch.Tensor | None = None, first_joint_translation_n: torch.Tensor | None = None, first_joint_translation_u: torch.Tensor | None = None, first_joint_tilt_n: torch.Tensor | None = None, first_joint_tilt_u: torch.Tensor | None = None, second_joint_translation_e: torch.Tensor | None = None, second_joint_translation_n: torch.Tensor | None = None, second_joint_translation_u: torch.Tensor | None = None, second_joint_tilt_e: torch.Tensor | None = None, second_joint_tilt_n: torch.Tensor | None = None, concentrator_translation_e: torch.Tensor | None = None, concentrator_translation_n: torch.Tensor | None = None, concentrator_translation_u: torch.Tensor | None = None) Initialize the kinematic deviations. Parameters ---------- first_joint_translation_e : torch.Tensor | None The first joint translation in the east direction. first_joint_translation_n : torch.Tensor | None The first joint translation in the north direction. first_joint_translation_u : torch.Tensor | None The first joint translation in the up direction. first_joint_tilt_n : torch.Tensor | None The first joint tilt in the north direction. first_joint_tilt_u : torch.Tensor | None The first joint tilt in the up direction. second_joint_translation_e : torch.Tensor | None The second joint translation in the east direction. second_joint_translation_n : torch.Tensor | None The second joint translation in the north direction. second_joint_translation_u : torch.Tensor | None The second joint translation in the up direction. second_joint_tilt_e : torch.Tensor | None The second joint tilt in the east direction. second_joint_tilt_n : torch.Tensor | None The second joint tilt in the north direction. concentrator_translation_e : torch.Tensor | None The concentrator translation in the east direction. concentrator_translation_n : torch.Tensor | None The concentrator translation in the north direction. concentrator_translation_u : torch.Tensor | None The concentrator translation in the up direction. .. py:attribute:: first_joint_translation_e :value: None .. py:attribute:: first_joint_translation_n :value: None .. py:attribute:: first_joint_translation_u :value: None .. py:attribute:: first_joint_tilt_n :value: None .. py:attribute:: first_joint_tilt_u :value: None .. py:attribute:: second_joint_translation_e :value: None .. py:attribute:: second_joint_translation_n :value: None .. py:attribute:: second_joint_translation_u :value: None .. py:attribute:: second_joint_tilt_e :value: None .. py:attribute:: second_joint_tilt_n :value: None .. py:attribute:: concentrator_translation_e :value: None .. py:attribute:: concentrator_translation_n :value: None .. py:attribute:: concentrator_translation_u :value: None .. py:method:: create_kinematic_deviations_dict() -> dict[str, Any] Create a dictionary containing the configuration parameters for the kinematic deviations. Returns ------- dict[str, Any] A dictionary containing the configuration parameters for the kinematic deviations. .. py:class:: KinematicLoadConfig(type: str, initial_orientation: torch.Tensor, deviations: KinematicDeviations) Initialize the kinematic configuration for loading in ``ARTIST``. Parameters ---------- type : str The type of kinematic used. initial_orientation : torch.Tensor The initial orientation of the kinematic configuration. deviations : KinematicDeviations The kinematic deviations. .. py:attribute:: type .. py:attribute:: initial_orientation .. py:attribute:: deviations .. py:class:: KinematicPrototypeConfig(type: str, initial_orientation: torch.Tensor, deviations: KinematicDeviations | None = None) Bases: :py:obj:`KinematicConfig` Initialize the kinematic prototype configuration. Parameters ---------- type : str The type of kinematic used. initial_orientation : torch.Tensor The initial orientation of the kinematic configuration. deviations : KinematicDeviations | None The kinematic deviations. .. py:class:: LightSourceConfig(light_source_key: str, light_source_type: str, number_of_rays: int, distribution_type: str, mean: float | None = None, covariance: float | None = None) Initialize the light source configuration. Parameters ---------- light_source_key : str The key used to identify the light source in the HDF5 file. light_source_type: The type of light source used, e.g. a sun. number_of_rays : int The number of rays generated by the light source. distribution_type : str The distribution type used to model the light source. mean : float | None The mean used for modeling the light source. covariance : float | None The covariance used for modeling the light source. Raises ------ ValueError If the specified light source distribution type is unknown. .. py:attribute:: light_source_key .. py:attribute:: light_source_type .. py:attribute:: number_of_rays .. py:attribute:: distribution_type .. py:method:: create_light_source_dict() -> dict[str, Any] Create a dictionary containing the configuration parameters for the light source. Returns ------- dict[str, Any] A dictionary containing the configuration parameters for the light source. .. py:class:: LightSourceListConfig(light_source_list: list[LightSourceConfig]) Initialize the light source list configuration. Parameters ---------- light_source_list : list[LightSourceConfig] The list of light source configs to be included in the scenario. .. py:attribute:: light_source_list .. py:method:: create_light_source_list_dict() -> dict[str, Any] Create a dictionary containing the configuration parameters for the light source list. Returns ------- dict[str, Any] A dictionary containing the configuration parameters for the light source list. .. py:class:: PowerPlantConfig(power_plant_position: torch.Tensor) Initialize the power plant configuration. Parameters ---------- power_plant_position : torch.Tensor The position of the power plant as latitude, longitude, altitude. .. py:attribute:: power_plant_position .. py:method:: create_power_plant_dict() -> dict[str, Any] Create a dictionary containing the configuration parameters for the power plant. Returns ------- dict[str, Any] A dictionary containing the configuration parameters for the power plant. .. py:class:: PrototypeConfig(surface_prototype: SurfacePrototypeConfig, kinematic_prototype: KinematicPrototypeConfig, actuators_prototype: ActuatorPrototypeConfig) Initialize the prototype configuration. Parameters ---------- surface_prototype : SurfacePrototypeConfig The prototype for the surface. kinematic_prototype : KinematicPrototypeConfig The prototype for the kinematic. actuators_prototype : ActuatorPrototypeConfig The prototype for the actuators. .. py:attribute:: surface_prototype .. py:attribute:: kinematic_prototype .. py:attribute:: actuators_prototype .. py:method:: create_prototype_dict() -> dict[str, Any] Create a dictionary containing the prototypes. Returns ------- dict[str, Any] A dictionary containing the prototypes. .. py:class:: SurfaceConfig(facet_list: list[FacetConfig]) Initialize the surface configuration. Parameters ---------- facet_list : list[FacetsConfig] The list of facets to be used for the surface of the heliostat. .. py:attribute:: facet_list .. py:method:: create_surface_dict() -> dict[str, Any] Create a dictionary containing the configuration parameters for the surface. Returns ------- dict[str, Any] A dictionary containing the configuration parameters for the surface. .. py:class:: SurfacePrototypeConfig(facet_list: list[FacetConfig]) Bases: :py:obj:`SurfaceConfig` Initialize the surface prototype configuration. Parameters ---------- facet_list : list[FacetsConfig] The list of facets to be used for the surface of the heliostat prototype. .. py:class:: TargetAreaConfig(target_area_key: str, geometry: str, center: torch.Tensor, normal_vector: torch.Tensor, plane_e: float, plane_u: float, curvature_e: float | None = None, curvature_u: float | None = None) Initialize the target area configuration. Parameters ---------- target_area_key : str The ID string used to identify the target area in the HDF5 file. geometry : str The type of target area, e.g., planar. center : torch.Tensor The position of the target area's center. normal_vector : torch.Tensor The normal vector to the target plane. plane_e : float The size of the target area in the east direction. plane_u : float The size of the target area in the up direction. curvature_e: float | None The curvature of the target area in the east direction. curvature_u: float | None The curvature of the target area in the up direction. .. py:attribute:: target_area_key .. py:attribute:: geometry .. py:attribute:: center .. py:attribute:: normal_vector .. py:attribute:: plane_e .. py:attribute:: plane_u .. py:attribute:: curvature_e :value: None .. py:attribute:: curvature_u :value: None .. py:method:: create_target_area_dict() -> dict[str, Any] Create a dictionary containing the configuration parameters for the target area. Returns ------- dict[str, Any] A dictionary containing the configuration parameters for the target area. .. py:class:: TargetAreaListConfig(target_area_list: list[TargetAreaConfig]) Initialize the target area list configuration. Parameters ---------- target_area_list : list[TargetAreaConfig] The list of target area configurations included in the scenario. .. py:attribute:: target_area_list .. py:method:: create_target_area_list_dict() -> dict[str, Any] Create a dictionary containing the configuration parameters for the list of target areas. Returns ------- dict[str, Any] A dictionary containing the configuration parameters for the list of target areas. .. py:class:: H5ScenarioGenerator(file_path: pathlib.Path, power_plant_config: artist.scenario.configuration_classes.PowerPlantConfig, target_area_list_config: artist.scenario.configuration_classes.TargetAreaListConfig, light_source_list_config: artist.scenario.configuration_classes.LightSourceListConfig, heliostat_list_config: artist.scenario.configuration_classes.HeliostatListConfig, prototype_config: artist.scenario.configuration_classes.PrototypeConfig, version: float = 1.0) Initialize the scenario generator. Scenarios in ``ARTIST`` describe the whole environment and all the components of a solar tower power plant. The scenario generator creates the scenarios. A scenario encompasses the tower target area(s), the light source(s), prototypes, and the heliostat(s). The generated scenarios are then saved in HDF5 files. Parameters ---------- file_path : pathlib.Path File path to the HDF5 to be saved. power_plant_config : PowerPlantConfig The power plant configuration object. target_area_list_config : TargetAreaListConfig The target area list configuration object. light_source_list_config : LightSourceListConfig The light source list configuration object. heliostat_list_config : HeliostatListConfig The heliostat_list configuration object. prototype_config : PrototypeConfig The prototype configuration object. version : float The version of the scenario generator being used (default is 1.0). .. py:attribute:: file_path .. py:attribute:: power_plant_config .. py:attribute:: target_area_list_config .. py:attribute:: light_source_list_config .. py:attribute:: heliostat_list_config .. py:attribute:: prototype_config .. py:attribute:: version :value: 1.0 .. py:method:: _get_number_of_heliostat_groups() -> int Get the number of heliostat groups in the scenario. Returns ------- int Number of heliostat groups in the scenario. .. py:method:: _check_equal_facet_numbers() Check that each heliostat has the same number of facets. Raises ------ ValueError If at least one heliostat has a different number of facets. .. py:method:: _flatten_dict(dictionary: collections.abc.MutableMapping, parent_key: str = '', sep: str = '/') -> dict[str, Any] Flatten nested dictionaries to first-level keys. Parameters ---------- dictionary : MutableMapping Original nested dictionary to flatten. parent_key : str The parent key of nested dictionaries. Should be empty upon initialization. sep : str The separator used to separate keys in nested dictionaries. Returns ------- dict[str, Any] A flattened version of the original dictionary. .. py:method:: _flatten_dict_gen(d: collections.abc.MutableMapping, parent_key: str, sep: str) -> Generator .. py:method:: _include_parameters(file: h5py.File, prefix: str, parameters: dict) -> None :staticmethod: Include the parameters from a parameter dictionary. Parameters ---------- file : h5py.File The HDF5 file to write to. prefix : str The prefix used for naming the parameters. parameters : dict The parameters to be included into the HFD5 file. .. py:method:: generate_scenario() -> None Generate the scenario and save it as an HDF5 file. .. py:class:: Scenario(power_plant_position: torch.Tensor, target_areas: artist.field.tower_target_areas.TowerTargetAreas, light_sources: artist.scene.light_source_array.LightSourceArray, heliostat_field: artist.field.heliostat_field.HeliostatField) Initialize the scenario. A scenario defines the physical objects and scene to be used by ``ARTIST``. Therefore, a scenario contains at least one target area that is a receiver, at least one light source and at least one heliostat in a heliostat field. ``ARTIST`` also supports scenarios that contain multiple target areas, multiple light sources, and multiple heliostats. (Note: Currently only a single light source can be provided.) Parameters ---------- power_plant_position : torch.Tensor, The position of the power plant as latitude, longitude and altitude. Tensor of shape [3]. target_areas : TargetAreaArray A list of tower target areas included in the scenario. light_sources : LightSourceArray A list of light sources included in the scenario. Currently only a single light source can be provided. heliostat_field : HeliostatField A field of heliostats included in the scenario. .. py:attribute:: power_plant_position .. py:attribute:: target_areas .. py:attribute:: light_sources .. py:attribute:: heliostat_field .. py:method:: get_number_of_heliostat_groups_from_hdf5(scenario_path: pathlib.Path) -> int :staticmethod: Get the number of heliostat groups to initiate distributed setup from the HDF5 scenario file. Parameters ---------- scenario_path : pathlib.Path File path to the HDF5 scenario file. Returns ------- int Number of heliostat groups to initiate distributed setup. .. py:method:: load_scenario_from_hdf5(scenario_file: h5py.File, number_of_surface_points_per_facet: torch.Tensor = torch.tensor([50, 50]), change_number_of_control_points_per_facet: torch.Tensor | None = None, device: torch.device | None = None) -> typing_extensions.Self :classmethod: Class method to load the scenario from an HDF5 file. Parameters ---------- scenario_file : h5py.File The config file containing all the information about the scenario being loaded. number_of_surface_points_per_facet : torch.Tensor The number of sampling points along each direction of each 2D facet (default is torch.tensor([50,50])). Tensor of shape [2]. change_number_of_control_points_per_facet : torch.Tensor | None The updated number of control points along each direction of each 2D facet (default is None). Providing this parameter should be done with caution. In a scenario with surfaces generated by deflectometry, this parameter should be None, otherwise the deflectometry surface will be overwritten and become ideal. For ideal surfaces this parameter can be used to change the number of control points specified in the .h5 scenario. Tensor of shape [2]. 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 ------- Scenario The ``ARTIST`` scenario loaded from the HDF5 file. .. py:method:: index_mapping(heliostat_group: artist.field.heliostat_group.HeliostatGroup, string_mapping: list[tuple[str, str, torch.Tensor]] | None = None, single_incident_ray_direction: torch.Tensor = torch.tensor([0.0, 1.0, 0.0, 0.0]), single_target_area_index: int = 0, device: torch.device | None = None) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor] Create an index mapping from heliostat names, target area names and incident ray directions. If no mapping is provided, a default mapping for all heliostats within this group will be created. The default mapping will map all heliostats to the default ``single_incident_ray_direction``, which simulates a light source positioned in the south and the default ``single_target_area_index``, which is 0. To overwrite these defaults, please provide a ``single_incident_ray_direction`` or a ``single_target_area_index``. Parameters ---------- heliostat_group : HeliostatGroup The current heliostat group. string_mapping : list[tuple[str, str, torch.Tensor]] | None Strings that map heliostats to target areas and incident ray direction tensors (default is None). single_incident_ray_direction : torch.Tensor The default incident ray direction (default is torch.tensor([0.0, 1.0, 0.0, 0.0])). Tensor of shape [4]. single_target_area_index : int The default target area index (default is 0). 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 The mask specifying which heliostat is selected and how many times. Tensor of shape [number_of_heliostats_in_group]. torch.Tensor The indices of target areas for all selected heliostats in order. Tensor of shape [number_of_active_heliostats_in_group]. torch.Tensor The incident ray directions for the selected heliostats in order. Tensor of shape [number_of_active_heliostats_in_group, 4]. .. py:method:: set_number_of_rays(number_of_rays: int) -> None Set the number of rays simulated by the light source. Parameters ---------- number_of_rays : int The new number of rays simulated by the light source. .. py:method:: __repr__() -> str Return a string representation of the scenario. .. py:class:: SurfaceGenerator(number_of_control_points: torch.Tensor = torch.tensor([10, 10]), degrees: torch.Tensor = torch.tensor([3, 3]), device: torch.device | None = None) Initialize the surface generator. Heliostat data, including information regarding their surfaces and structure, can be generated via ``STRAL`` and exported to a binary file or downloaded from ``PAINT``. The data formats are different depending on their source. To convert this data into a surface configuration format suitable for ``ARTIST``, this converter first loads the data and then learns or creates NURBS surfaces based on the data. Finally, the converter returns a list of facets that can be used directly in an ``ARTIST`` scenario. Parameters ---------- number_of_control_points : torch.Tensor The number of NURBS control points along each direction of each 2D facet (default is torch.tensor([10,10])). Tensor of shape [2]. degrees : torch.Tensor Degree of the NURBS along each direction of each 2D facet (default is torch.tensor([3,3])). Tensor of shape [2]. 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. .. py:attribute:: number_of_control_points .. py:attribute:: degrees .. py:method:: fit_nurbs(surface_points: torch.Tensor, surface_normals: torch.Tensor, optimizer: torch.optim.Optimizer, scheduler: torch.optim.lr_scheduler.LRScheduler | None = None, fit_method: str = config_dictionary.fit_nurbs_from_normals, tolerance: float = 1e-10, max_epoch: int = 400, device: torch.device | None = None) -> artist.util.nurbs.NURBSSurfaces Fit a NURBS surface. The surface points are first normalized and shifted to the range (0,1) to be compatible with the knot vector of the NURBS surface. The NURBS surface is then initialized with the correct number of control points, degrees, and knots. The origin of the control points is set based on the width and height of the point cloud. The control points are then fitted to the surface points or surface normals using the provided optimizer. Parameters ---------- surface_points : torch.Tensor The surface points. Tensor of shape [number_of_surface_points, 4]. surface_normals : torch.Tensor The surface normals. Tensor of shape [number_of_surface_points, 4]. optimizer : torch.optim.Optimizer The optimizer. scheduler : torch.optim.lr_scheduler.LRScheduler | None The learning rate scheduler (default is None). fit_method : str The method used to fit the NURBS, either from deflectometry points or normals (default is config_dictionary.fit_nurbs_from_normals). tolerance : float The tolerance value used for fitting NURBS surfaces (default is 1e-10). max_epoch : int The maximum number of epochs for the NURBS fit (default is 400). 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 ------ NotImplementedError If the NURBS fit method is unknown. Returns ------- NURBSSurfaces A fitted NURBS surface. .. py:method:: generate_fitted_surface_config(heliostat_name: str, facet_translation_vectors: torch.Tensor, canting: torch.Tensor, surface_points_with_facets_list: list[torch.Tensor], surface_normals_with_facets_list: list[torch.Tensor], optimizer: torch.optim.Optimizer, scheduler: torch.optim.lr_scheduler.LRScheduler | None = None, deflectometry_step_size: int = 100, fit_method: str = config_dictionary.fit_nurbs_from_normals, tolerance: float = 1e-10, max_epoch: int = 400, device: torch.device | None = None) -> artist.scenario.configuration_classes.SurfaceConfig Generate a fitted surface configuration. The fitted surface configuration is composed of separate facets. Each facet is defined by fitted control points, meaning the control points are fitted to measured point cloud or surface normals data. Initializing a surface from this configuration results in an imperfect heliostat surface with dents or bulges, reflecting real-world conditions. The surface can be fitted to deflectometry data or any other provided point cloud data. Parameters ---------- heliostat_name : str The heliostat name, used for logging. facet_translation_vectors : torch.Tensor Translation vectors for each facet from heliostat origin to relative position. Tensor of shape [number_of_facets, 4]. canting : torch.Tensor The canting vectors per facet in east and north directions Tensor of shape [number_of_facets, 2, 4]. surface_points_with_facets_list : list[torch.Tensor] A list of facetted surface points. Points per facet may vary. Tensors in list of shape [number_of_points, 3]. surface_normals_with_facets_list : list[torch.Tensor] A list of facetted surface normals. Points per facet may vary. Tensors in list of shape [number_of_points, 3]. optimizer : torch.optim.Optimizer The optimizer. scheduler : torch.optim.lr_scheduler.LRScheduler | None The learning rate scheduler (default is None). deflectometry_step_size : int The step size used to reduce the number of deflectometry points and normals for compute efficiency (default is 100). fit_method : str The method used to fit the NURBS, either from deflectometry points or normals (default is config_dictionary.fit_nurbs_from_normals). tolerance : float The tolerance value used for fitting NURBS surfaces (default is 1e-10). max_epoch : int The maximum number of epochs for the NURBS fit (default is 400). 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 A surface configuration. .. py:method:: generate_ideal_surface_config(facet_translation_vectors: torch.Tensor, canting: torch.Tensor, device: torch.device | None = None) -> artist.scenario.configuration_classes.SurfaceConfig Generate an ideal surface configuration. The ideal surface configuration is composed of separate facets. Each facet is defined by ideal control points, meaning the control points start as 3D points on a flat, equidistant grid around the origin. These control points are then canted (rotated) and translated to the facet positions. Initializing a surface from this configuration results in an ideal heliostat surface without dents or bulges but with canting. This ideal heliostat surface can be used as a starting point for a surface reconstruction based on measured flux distributions. Parameters ---------- facet_translation_vectors : torch.Tensor Translation vector for each facet from heliostat origin to relative position. Tensor of shape [number_of_facets, 4]. canting : torch.Tensor The canting vector per facet in east and north direction. Tensor of shape [number_of_facets, 2, 4]. 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 A surface configuration.