libera_utils.scene_identification.scene_definitions.Scene#
- class libera_utils.scene_identification.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.
- Variables:
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_bin_bounds(variable)Get the (min, max) bin bounds for a single variable in this scene.
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.
- get_bin_bounds(variable: str) tuple[float | None, float | None]#
Get the (min, max) bin bounds for a single variable in this scene.