Backend
s2gos_simulator.backends.eradiate.backend.EradiateBackend
Bases: SimulationBackend
Enhanced Eradiate backend with modular architecture.
This backend orchestrates specialized modules for different aspects of the simulation: geometry, atmosphere, surfaces, sensors, and results.
Initialize the Eradiate backend with modular components.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
simulation_config
|
SimulationConfig
|
Simulation configuration |
required |
Attributes
supported_measurements
property
Get list of supported measurement types.
Returns:
| Type | Description |
|---|---|
List[str]
|
List of measurement type strings |
supported_platforms
property
Get list of supported platform types.
Returns:
| Type | Description |
|---|---|
List[str]
|
List of platform type strings |
Functions
create_experiment
create_experiment(
scene_description: SceneDescription,
scene_dir: UPath,
include_irradiance_measures: bool = True,
atmosphere: Optional[str] = "auto",
sensor_ids: Optional[set] = None,
measures: Optional[list] = None,
irradiance_disk_coords: Optional[
Dict[str, tuple]
] = None,
)
Create Eradiate experiment from scene description.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scene_description
|
SceneDescription
|
Scene description with all scene data |
required |
scene_dir
|
UPath
|
Base directory for resolving file paths |
required |
include_irradiance_measures
|
bool
|
Whether to include irradiance measurements |
True
|
atmosphere
|
Optional[str]
|
Atmosphere option: - "auto": Create atmosphere from scene config (default) - None: No atmosphere (for BRF measurements) |
'auto'
|
sensor_ids
|
Optional[set]
|
Optional set of sensor IDs to include. If None, all sensors are included. Use this to filter sensors for specific workflows (e.g., only BRF sensors for BRF workflow). |
None
|
measures
|
Optional[list]
|
Pre-built Eradiate measure dicts. When provided, translate_sensors() is bypassed and these measures are used directly. include_irradiance_measures and sensor_ids are ignored. Use this when the caller owns measure construction (e.g. BHR distant_flux). |
None
|
irradiance_disk_coords
|
Optional[Dict[str, tuple]]
|
Optional mapping of IrradianceConfig ID to (x, y, z) disk coordinates. Passed through to translate_sensors() when measures is None. |
None
|
Returns:
| Type | Description |
|---|---|
|
AtmosphereExperiment configured for the scene |
is_available
Check if Eradiate dependencies are available.
Returns:
| Type | Description |
|---|---|
bool
|
True if Eradiate is available, False otherwise |
run_simulation
run_simulation(
scene_description: SceneDescription,
scene_dir: PathRef,
output_dir: Optional[PathRef] = None,
**kwargs,
) -> xr.Dataset
Run Eradiate simulation from scene description.
Automatically detects measurement types and executes appropriate workflow: - BRF: No atmosphere - HDRF/HCRF: With atmosphere, uses BOA irradiance from white disk - Standard: Regular radiance measurements
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scene_description
|
SceneDescription
|
Scene description from s2gos_generator |
required |
scene_dir
|
PathRef
|
Directory containing scene assets |
required |
output_dir
|
Optional[PathRef]
|
Output directory (defaults to scene_dir/eradiate_renders) |
None
|
**kwargs
|
Additional options (plot_image, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
Dataset
|
xarray Dataset containing all simulation results |