Scenario
- class pybsm.simulation.scenario.Scenario(*, name: str, ihaze: int, altitude: float, ground_range: float, aircraft_speed: float = 0, target_reflectance: float = 0.15, target_temperature: float = 295, background_reflectance: float = 0.07, background_temperature: float = 293, ha_wind_speed: float = 21, cn2_at_1m: float = 1.7e-14, interp: bool | None = False)
Everything about the target and environment.
NOTE: if the niirs model is called, values for target/background temperature, reflectance, etc. are overridden with the NIIRS model defaults.
Attributes: name (str):
The name of the scenario.
- ihaze (int):
The haze index for the scenario.
- altitude (float):
The altitude of the aircraft in meters.
- ground_range (float):
The ground range of the scenario in meters.
- aircraft_speed (float):
The speed of the aircraft in meters per second.
- target_reflectance (float):
The reflectance of the target.
- target_temperature (float):
The temperature of the target in Kelvin.
- background_reflectance (float):
The reflectance of the background.
- background_temperature (float):
The temperature of the background in Kelvin.
- ha_wind_speed (float):
The horizontal atmospheric wind speed in meters per second.
- cn2_at_1m (float):
The structure parameter of the refractive index at 1 meter above ground level.
Methods
- __hash__() int
Compute hash based on relevant scenario parameters for caching.
- __init__(*, name: str, ihaze: int, altitude: float, ground_range: float, aircraft_speed: float = 0, target_reflectance: float = 0.15, target_temperature: float = 295, background_reflectance: float = 0.07, background_temperature: float = 293, ha_wind_speed: float = 21, cn2_at_1m: float = 1.7e-14, interp: bool | None = False) None
Initializes a scenario object.
- Parameters:
name – The name of the scenario object
ihaze – MODTRAN code for visibility, valid options are ihaze = 1 (Rural extinction with 23 km visibility) or ihaze = 2 (Rural extinction with 5 km visibility)
altitude – sensor height above ground level in meters; the database includes the following altitude options: 2 32.55 75 150 225 500 meters, 1000 to 12000 in 1000 meter steps, and 14000 to 20000 in 2000 meter steps, 24500
ground_range – projection of line of sight between the camera and target along on the ground in meters; the distance between the target and the camera is given by sqrt(altitude^2 + ground_range^2). The following ground ranges are included in the database at each altitude until the ground range exceeds the distance to the spherical earth horizon: 0 100 500 1000 to 20000 in 1000 meter steps, 22000 to 80000 in 2000 m steps, and 85000 to 300000 in 5000 meter steps.
aircraft_speed – ground speed of the aircraft (m/s)
target_reflectance – object reflectance (unitless); the default 0.15 is the giqe standard
target_temperature – object temperature (Kelvin); 282 K is used for GIQE calculation
background_reflectance – background reflectance (unitless)
background_temperature – background temperature (Kelvin); 280 K used for GIQE calculation
ha_wind_speed – the high altitude wind speed (m/s) used to calculate the turbulence profile; the default, 21.0, is the HV 5/7 profile value
cn2_at_1m – the refractive index structure parameter “near the ground” (e.g. at h = 1 m) used to calculate the turbulence profile; the default, 1.7e-14, is the HV 5/7 profile value
interp – A flag to indicate whether atmospheric interpolation should be used. Defaults to False.
- __weakref__
list of weak references to the object (if defined)
- property altitude: float
Get or set altitude, in meters.
- property atm: ndarray
Return atmospheric spectral absorption.
- Returns:
List of values:
atm[:,0]- wavelengths from .3 to 14 x 10^-6 m in 0.01x10^-6 m steps
atm[:,1]- (TRANS) total transmission through the defined path
atm[:,2]- (PTH THRML) radiance component due to atmospheric emission and scattering received at the observer
atm[:,3]- (SURF EMIS) component of radiance due to surface emission received at the observer
atm[:,4]- (SOL SCAT) component of scattered solar radiance received at the observer
atm[:,5]- (GRND RFLT) is the total solar flux impingement on the ground and reflected directly to the sensor from the ground. (direct radiance + diffuse radiance) * surface reflectance
NOTE: Units for columns 1 through 5 are in radiance W/(sr m^2 m).
- property ground_range: float
Get or set ground range, in meters.
- property ihaze: int
Get or set ihaze, MODTRAN code for visibility. Valid options are ihaze = 1 (Rural extinction with 23 km visibility) or ihaze = 2 (Rural extinction with 5 km visibility)