CircularAperturePerturber#

class nrtk.impls.perturb_image.optical.otf.CircularAperturePerturber(*, mtf_wavelengths: Sequence[float] | None = None, mtf_weights: Sequence[float] | None = None, D: float | None = None, eta: float | None = None, interp: bool = True, **kwargs: Any)#

Applies OTF-based image perturbation using a circular aperture model.

The CircularAperturePerturber 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.

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, D: float | None = None, eta: float | None = None, interp: bool = True, **kwargs: Any) None#

Initializes the CircularAperturePerturber.

Args:
mtf_wavelengths:

a numpy array of wavelengths (m)

mtf_weights:

a numpy array of weights for each wavelength contribution (arb)

D:

a float representing effective aperture diameter (m)

eta:

a float representing relative linear obscuration (arb)

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 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:
ValueError:

If mtf_wavelengths and mtf_weights are not equal length

ValueError:

If mtf_wavelengths is empty or mtf_weights is empty

get_config() dict[str, Any]#

Get current configuration including perturber-specific parameters.