CircularApertureOTFPerturber
- class nrtk.impls.perturb_image.pybsm.circular_aperture_otf_perturber.CircularApertureOTFPerturber(sensor: PybsmSensor | None = None, scenario: PybsmScenario | None = None, mtf_wavelengths: Sequence[float] | None = None, mtf_weights: Sequence[float] | None = None, interp: bool = True)
Applies OTF-based image perturbation using a circular aperture model with sensor and scenario configurations.
The CircularApertureOTFPerturber class uses a circular aperture model to simulate image perturbations, allowing for wavelength-specific and sensor-specific modifications based on the sensor and scenario configurations.
See https://pybsm.readthedocs.io/en/latest/explanation.html for image formation concepts and parameter details.
- Attributes:
- sensor (PybsmSensor | None):
The sensor configuration for the perturbation.
- scenario (PybsmScenario | None):
The scenario configuration used for perturbation.
- mtf_wavelengths (Sequence[float]):
Sequence of wavelengths used in MTF calculations.
- mtf_weights (Sequence[float]):
Sequence of weights associated with each wavelength.
- D (float):
Effective aperture diameter.
- eta (float):
Relative linear obscuration.
- slant_range (float):
Line-of-sight distance between platform and target.
- ifov (float):
Instantaneous field of view of the sensor.
- interp (bool):
Specifies whether to use interpolated atmospheric data.
Methods
from_configInstantiate from configuration dictionary.
Get current configuration including perturber-specific parameters.
get_default_configRetrieves the default configuration.
get_implsDiscover and return a set of classes that implement the calling class.
get_type_stringReturns the fully qualified type string of the PerturbImage class or its subclass.
is_usableCheck if dependencies are available.
perturbApply the OTF-based perturbation to the provided image.
- __init__(sensor: PybsmSensor | None = None, scenario: PybsmScenario | None = None, mtf_wavelengths: Sequence[float] | None = None, mtf_weights: Sequence[float] | None = None, interp: bool = True) None
Initializes the CircularApertureOTFPerturber.
- Args:
- sensor:
pyBSM sensor object
- scenario:
pyBSM scenario object
- mtf_wavelengths:
a numpy array of wavelengths (m)
- mtf_weights:
a numpy array of weights for each wavelength contribution (arb)
- interp:
a boolean determining whether load_database_atmosphere is used with or without interpolation.
If both sensor and scenario parameters are absent, then default values will be used for their parameters
If none of mtf_wavelengths, mtf_weights, sensor or scenario parameters are provided, the values of mtf_wavelengths and mtf_weights will default to [0.50e-6, 0.66e-6] and [1.0, 1.0] respectively
If sensor and scenario parameters are provided, but not mtf_wavelengths and mtf_weights, the values of mtf_wavelengths and mtf_weights will come from the sensor and scenario objects.
If mtf_wavelengths and mtf_weights are provided by the user, those values will be used in the otf calculation.
- Raises:
- raises ImportError:
If pyBSM is not found, install via pip install nrtk[pybsm].
- raises ValueError:
If mtf_wavelengths and mtf_weights are not equal length
- raises ValueError:
If mtf_wavelengths is empty or mtf_weights is empty
- get_config() dict[str, Any]
Get current configuration including perturber-specific parameters.