TurbulenceAperturePerturber#

class nrtk.impls.perturb_image.optical.otf.TurbulenceAperturePerturber(*, mtf_wavelengths: Sequence[float] | None = None, mtf_weights: Sequence[float] | None = None, altitude: float | None = None, slant_range: float | None = None, D: float | None = None, ha_wind_speed: float | None = None, cn2_at_1m: float | None = None, int_time: float | None = None, n_tdi: float | None = None, aircraft_speed: float | None = None, interp: bool = True, **kwargs: Any)#

Implements OTF-based image perturbation with turbulence and aperture effects.

The TurbulenceAperturePerturber class simulates image degradation due to atmospheric turbulence and optical aperture effects, using pyBSM sensor and scenario configurations. It supports adjustable wavelengths, weights, and other environmental parameters for realistic perturbations.

See https://pybsm.readthedocs.io/en/latest/explanation.html for image formation concepts and parameter details.

Methods

from_config

Instantiate a new instance of this class given the configuration JSON-compliant dictionary encapsulating initialization arguments.

get_config

Get current configuration including perturber-specific parameters.

get_default_config

Generate and return a default configuration dictionary for this class.

get_impls

Discover plugins, skipping any entrypoints that fail to load.

get_type_string

Returns the fully qualified type string of the PerturbImage class or its subclass.

is_usable

Check whether this class is available for use.

perturb

Apply the OTF-based perturbation to the provided image.

__init__(*, mtf_wavelengths: Sequence[float] | None = None, mtf_weights: Sequence[float] | None = None, altitude: float | None = None, slant_range: float | None = None, D: float | None = None, ha_wind_speed: float | None = None, cn2_at_1m: float | None = None, int_time: float | None = None, n_tdi: float | None = None, aircraft_speed: float | None = None, interp: bool = True, **kwargs: Any) None#

Initializes the TurbulenceAperturePerturber.

Args:
mtf_wavelengths:

a sequence of wavelengths (m)

mtf_weights:

a sequence of weights for each wavelength contribution (arb)

altitude:

height of the aircraft above the ground (m)

slant_range:

line-of-sight range between the aircraft and target (target is assumed to be on the ground) (m)

D:

effective aperture diameter (m)

ha_wind_speed:

the high altitude windspeed (m/s); used to calculate the turbulence profile

cn2_at_1m:

the refractive index structure parameter “near the ground” (e.g. at h = 1 m); used to calculate the turbulence profile

int_time:

dwell (i.e. integration) time (seconds)

n_tdi:

the number of time-delay integration stages (relevant only when TDI cameras are used. For CMOS cameras, the value can be assumed to be 1.0)

aircraft_speed:

apparent atmospheric velocity (m/s); this can just be the windspeed at the sensor position if the sensor is stationary

interp:

a boolean determining whether load_database_atmosphere is used with or without interpolation

kwargs:

sensor and/or scenario values to modify

If both sensor and scenario parameters are absent, then default values will be used for their parameters.

If any of the individual or sensor/scenario parameters are absent, the following values will be set as defaults for the absent values:

mtf_wavelengths = [0.50e-6, 0.66e-6] mtf_weights = [1.0, 1.0] altitude = 250 slant_range = 250 # slant_range = altitude D = 40e-3 #m ha_wind_speed = 0 cn2_at_1m = 1.7e-14 int_time = 30e-3 #s n_tdi = 1.0 aircraft_speed = 0

If sensor and scenario parameters are provided, but not the other individial parameters, the values will come from the sensor and scenario objects.

If individial parameter values are provided by the user, those values will be used in the otf calculation.

Raises:
ValueError:

If mtf_wavelengths and mtf_weights are not equal length

ValueError:

If mtf_wavelengths is empty or mtf_weights is empty

ValueError:

If cn2at1m <= 0.0

get_config() dict[str, Any]#

Get current configuration including perturber-specific parameters.