Sensors
Sensor and platform configurations representing satellite and ground-based observing systems together with their associated instrument types.
s2gos_simulator.config.sensors.BaseSensor
pydantic-model
Bases: BaseModel
Base sensor configuration.
Fields:
-
id(Optional[str]) -
platform_type(PlatformType) -
viewing(ViewingType) -
srf(Optional[SRFType]) -
produces(List[Literal['radiance', 'irradiance', 'hdrf', 'brf', 'bhr']]) -
samples_per_pixel(int) -
noise_model(Optional[Dict[str, Any]])
Validators:
-
resolve_srf_preset→srf
Attributes
id
pydantic-field
Unique sensor identifier (auto-generated if not provided)
produces
pydantic-field
List of radiative quantities to be produced by this sensor configuration
samples_per_pixel
pydantic-field
Number of Monte Carlo samples per pixel
s2gos_simulator.config.sensors.SatelliteSensor
pydantic-model
Bases: BaseSensor
Satellite sensor configuration.
Fields:
-
id(Optional[str]) -
srf(Optional[SRFType]) -
produces(List[Literal['radiance', 'irradiance', 'hdrf', 'brf', 'bhr']]) -
samples_per_pixel(int) -
noise_model(Optional[Dict[str, Any]]) -
platform_type(Literal[SATELLITE]) -
viewing(AngularViewing) -
platform(SatellitePlatform) -
instrument(SatelliteInstrument) -
band(str) -
film_resolution(Tuple[int, int]) -
target_center_lat(float) -
target_center_lon(float) -
target_size_km(Union[float, Tuple[float, float]]) -
for_reference_only(bool)
Validators:
-
resolve_srf_preset→srf -
validate_and_set_defaults
Attributes
film_resolution
pydantic-field
Pixel grid dimensions (width, height) for 2D imaging
for_reference_only
pydantic-field
If True, this sensor is used for geometry specification only (e.g., for PixelHDRF/PixelBRF coordinate mapping) and will NOT be simulated. Use this when you already have satellite data and only need the sensor's geometry (lat/lon, resolution, viewing angles) for pixel index mapping. The sensor remains accessible for coordinate queries but is excluded from Eradiate measure translation.
pixel_size_m
property
Calculate ground pixel size in meters.
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
Tuple of (pixel_size_x_m, pixel_size_y_m) in meters per pixel |
platform_type
pydantic-field
Platform type (always 'satellite')
target_center_lat
pydantic-field
Target center latitude in WGS84 decimal degrees
target_center_lon
pydantic-field
Target center longitude in WGS84 decimal degrees
target_size_km
pydantic-field
Target area size: float for square (km), tuple for rectangular (width_km, height_km)
Functions
s2gos_simulator.config.sensors.GroundSensor
pydantic-model
Bases: BaseSensor
Ground sensor configuration.
Fields:
-
id(Optional[str]) -
srf(Optional[SRFType]) -
produces(List[Literal['radiance', 'irradiance', 'hdrf', 'brf', 'bhr']]) -
samples_per_pixel(int) -
noise_model(Optional[Dict[str, Any]]) -
platform_type(Literal[GROUND]) -
instrument(GroundInstrumentType) -
viewing(Union[LookAtViewing, AngularFromOriginViewing, HemisphericalViewing, DistantViewing]) -
fov(Optional[float]) -
resolution(Optional[List[int]]) -
post_processing(Optional[PostProcessingOptions])
Validators:
-
resolve_srf_preset→srf -
set_instrument_defaults -
validate_compatibility_and_id
Attributes
fov
pydantic-field
Field of view in degrees (for camera-like instruments: HYPSTAR, perspective_camera, dhp_camera)
platform_type
pydantic-field
Platform type (always 'ground')
post_processing
pydantic-field
Post-processing pipeline options (spatial averaging, SRF, circular mask, etc.)
resolution
pydantic-field
Film resolution [width, height] (for camera-like instruments: HYPSTAR, perspective_camera, dhp_camera)
s2gos_simulator.config.sensors.SatellitePlatform
Bases: str, Enum
Supported satellite platforms.
s2gos_simulator.config.sensors.SatelliteInstrument
Bases: str, Enum
Supported satellite instruments.
s2gos_simulator.config.sensors.GroundInstrumentType
Bases: str, Enum
Enum for ground instrument types for robustness.
s2gos_simulator.config.sensors.PostProcessingOptions
pydantic-model
Bases: BaseModel
Post-processing pipeline options for ground sensors.
Controls spatial averaging, SRF convolution, circular FOV mask, and RGB output.
Fields:
-
apply_srf(bool) -
spatial_averaging(bool) -
spatial_statistic(Literal['mean', 'median']) -
apply_circular_mask(bool) -
generate_rgb_image(bool) -
rgb_wavelengths(Tuple[float, float, float]) -
rgb_brightness_factor(float)
Attributes
apply_circular_mask
pydantic-field
Apply circular FOV mask before spatial averaging. Pixels outside the circular FOV are set to NaN and excluded. Enable for HYPSTAR-style circular aperture sensors.
generate_rgb_image
pydantic-field
Generate RGB visualization before spatial averaging. Requires at least 3 wavelengths covering RGB range (440-660nm). Image saved as {sensor_id}_rgb.png in output directory.
rgb_brightness_factor
pydantic-field
Brightness multiplier for RGB visualization
rgb_wavelengths
pydantic-field
Target wavelengths (nm) for RGB channels (red, green, blue)
spatial_averaging
pydantic-field
Average over spatial dimensions (x_index, y_index)
s2gos_simulator.config.sensors.create_chime_sensor
create_chime_sensor(
target_center_lat: float,
target_center_lon: float,
target_size_km: Union[float, Tuple[float, float]] = 1.0,
zenith: float = 0.0,
azimuth: float = 0.0,
samples_per_pixel: int = 64,
ssi_nm: float = 8.4,
fwhm_nm: Optional[float] = None,
spectral_regions: Optional[List[SpectralRegion]] = None,
wmin_nm: float = 400.0,
wmax_nm: float = 2500.0,
sensor_id: Optional[str] = None,
**kwargs,
) -> SatelliteSensor
Create a CHIME hyperspectral satellite sensor with sensible defaults.
CHIME (Copernicus Hyperspectral Imaging Mission) specifications: - Spectral range: 400-2500 nm - Spectral resolution: < 11 nm (FWHM) - Spectral Sampling Interval (SSI): 8.4 nm - Spatial resolution: 30 m - Swath: ~130 km
The sensor uses Gaussian SRF post-processing with wavelength-dependent FWHM to simulate the instrument's spectral response characteristics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_center_lat
|
float
|
Target center latitude (WGS84 decimal degrees) |
required |
target_center_lon
|
float
|
Target center longitude (WGS84 decimal degrees) |
required |
target_size_km
|
Union[float, Tuple[float, float]]
|
Target area size (km). Float for square, tuple for (width, height) |
1.0
|
zenith
|
float
|
Viewing zenith angle (0=nadir). Default 0.0 |
0.0
|
azimuth
|
float
|
Viewing azimuth angle. Default 0.0 |
0.0
|
samples_per_pixel
|
int
|
Monte Carlo samples per pixel. Default 64 |
64
|
ssi_nm
|
float
|
Spectral Sampling Interval (nm). Default 8.4 per CHIME spec |
8.4
|
fwhm_nm
|
Optional[float]
|
Single FWHM for all wavelengths (overrides spectral_regions) |
None
|
spectral_regions
|
Optional[List[SpectralRegion]]
|
Wavelength-dependent FWHM regions. If None, uses CHIME defaults |
None
|
wmin_nm
|
float
|
Minimum wavelength (nm). Default 400.0 |
400.0
|
wmax_nm
|
float
|
Maximum wavelength (nm). Default 2500.0 |
2500.0
|
sensor_id
|
Optional[str]
|
Optional sensor ID. Auto-generated if not provided |
None
|
**kwargs
|
Additional sensor parameters |
{}
|
Returns:
| Type | Description |
|---|---|
SatelliteSensor
|
SatelliteSensor configured for CHIME hyperspectral simulation |
s2gos_simulator.config.sensors.create_hypstar_sensor
create_hypstar_sensor(
viewing: Union[LookAtViewing, AngularFromOriginViewing],
fov: float = 5.0,
resolution: tuple[int, int] = (32, 32),
reference_file: Optional[str] = None,
wavelength_variable: str = "wavelength",
sensor_id: Optional[str] = None,
**kwargs,
) -> GroundSensor
Create a HYPSTAR ground sensor.
HYPSTAR (HYPERNETS Land Network) specifications: - VNIR detector (Si): 380–1000 nm, FWHM ≈ 3 nm - SWIR detector (InGaAs): 1000–1680 nm, FWHM ≈ 10 nm
When reference_file is provided, SRF post-processing outputs wavelengths from that file (for direct comparison against real HYPSTAR observations). Without it, simulation wavelengths are used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
viewing
|
Union[LookAtViewing, AngularFromOriginViewing]
|
Pointing configuration (LookAtViewing or AngularFromOriginViewing) |
required |
fov
|
float
|
Field of view in degrees. Default 5.0 (HYPSTAR default) |
5.0
|
resolution
|
tuple[int, int]
|
Film resolution [width, height]. Default (32, 32) |
(32, 32)
|
reference_file
|
Optional[str]
|
Path to HYPERNETS L2A NetCDF file. If provided, SRF post-processing will output at the file's wavelength grid. |
None
|
wavelength_variable
|
str
|
Variable name for wavelengths in reference file |
'wavelength'
|
sensor_id
|
Optional[str]
|
Optional sensor ID. Auto-generated if not provided |
None
|
**kwargs
|
Additional GroundSensor parameters |
{}
|
Returns:
| Type | Description |
|---|---|
GroundSensor
|
GroundSensor configured for HYPSTAR simulation |