optiland.rays.ray_aiming.registry
Ray Aimer Registry Module
This module provides a registry for managing available ray aiming algorithms.
Kramer Harrison, 2025
Functions
|
Factory function to create a ray aimer instance. |
|
Decorator to register a ray aiming class. |
- create_ray_aimer(name: str, optic: Optic, **kwargs: Any) BaseRayAimer[source]
Factory function to create a ray aimer instance.
- Parameters:
name (str) – The name of the ray aimer to create.
optic (Optic) – The optical system instance.
**kwargs – Additional arguments for the aimer constructor.
- Returns:
An instance of the requested ray aimer.
- Return type:
- Raises:
ValueError – If the requested ray aimer is not registered.
- register_aimer(name: str) Callable[[type[BaseRayAimer]], type[BaseRayAimer]][source]
Decorator to register a ray aiming class.
- Parameters:
name (str) – The name to register the aimer under.
- Returns:
The decorated class.
- Return type:
Callable[[Type[BaseRayAimer]], Type[BaseRayAimer]]