libera_utils.scene_definitions.Scene#
- class libera_utils.scene_definitions.Scene(scene_id: int, variable_ranges: dict[str, tuple[float | None, float | None]])#
Bases:
objectRepresents a single scene with its variable bin definitions.
A scene defines a specific atmospheric state characterized by ranges of multiple variables (e.g., cloud fraction, optical depth, surface type). Data points are classified into scenes when all their variable values fall within the scene’s defined ranges.
- variable_ranges#
Dictionary mapping variable names to (min, max) tuples defining the acceptable range for each variable. None values indicate unbounded ranges (no min or no max constraint).
- matches(data_point)#
Check if a data point belongs to this scene
Examples
>>> scene = Scene( ... scene_id=1, ... variable_ranges={ ... "cloud_fraction": (0.0, 50.0), ... "optical_depth": (0.0, 10.0) ... } ... ) >>> scene.matches({"cloud_fraction": 30.0, "optical_depth": 5.0}) True >>> scene.matches({"cloud_fraction": 60.0, "optical_depth": 5.0}) False
Methods
Get list of variables that have at least one defined bound.
matches(data_point)Check if a data point falls within all variable ranges for this scene.
Methods
Get list of variables that have at least one defined bound.
matches(data_point)Check if a data point falls within all variable ranges for this scene.
Attributes