artist.core.kinematic_reconstructor
Attributes
A logger for the kinematic reconstructor. |
Classes
Initialize the kinematic optimizer. |
Module Contents
- artist.core.kinematic_reconstructor.log
A logger for the kinematic reconstructor.
- class artist.core.kinematic_reconstructor.KinematicReconstructor(ddp_setup: dict[str, Any], scenario: artist.scenario.scenario.Scenario, data: dict[str, artist.data_parser.calibration_data_parser.CalibrationDataParser | list[tuple[str, list[pathlib.Path], list[pathlib.Path]]]], optimization_configuration: dict[str, Any], reconstruction_method: str = config_dictionary.kinematic_reconstruction_raytracing)
Initialize the kinematic optimizer.
Parameters
- ddp_setupdict[str, Any]
Information about the distributed environment, process_groups, devices, ranks, world_Size, heliostat group to ranks mapping.
- scenarioScenario
The scenario.
- datadict[str, CalibrationDataParser | list[tuple[str, list[pathlib.Path], list[pathlib.Path]]]]
The data parser and the mapping of heliostat name and calibration data.
- optimization_configurationdict[str, Any]
The parameters for the optimizer, learning rate scheduler, regularizers and early stopping.
- reconstruction_methodstr
The reconstruction method. Currently only reconstruction via ray tracing is available (default is ray_tracing).
- ddp_setup
- scenario
- data
- optimization_configuration
- reconstruct_kinematic(loss_definition: artist.core.loss_functions.Loss, device: torch.device | None = None) torch.Tensor
Reconstruct the kinematic parameters.
Parameters
- loss_definitionLoss
The definition of the loss function and pre-processing of the prediction.
- devicetorch.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 final loss of the kinematic reconstruction for each heliostat in each group. Tensor of shape [total_number_of_heliostats_in_scenario].
- _reconstruct_kinematic_parameters_with_raytracing(loss_definition: artist.core.loss_functions.Loss, device: torch.device | None = None) torch.Tensor
Reconstruct the kinematic parameters using ray tracing.
This reconstruction method optimizes the kinematic parameters by extracting the focal points of calibration images and using heliostat-tracing.
Parameters
- loss_definitionLoss
The definition of the loss function and pre-processing of the prediction.
- devicetorch.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 final loss of the kinematic reconstruction for each heliostat in each group. Tensor of shape [total_number_of_heliostats_in_scenario].