pybsm.otf.functional

The Python Based Sensor Model (pyBSM) is a collection of electro-optical camera modeling functions.

Developed by the Air Force Research Laboratory, Sensors Directorate.

Author citation: LeMaster, Daniel A.; Eismann, Michael T., “pyBSM: A Python package for modeling imaging systems”, Proc. SPIE 10204 (2017)

Distribution A. Approved for public release. Public release approval for version 0.0: 88ABW-2017-3101 Public release approval for version 0.1: 88ABW-2018-5226

Maintainer: Kitware, Inc. <nrtk@kitware.com>

This module contains a library of functions implementing the optical transfer function (OTF) for various modes of sharpness degradation in an optical system. The full system-level OTF is created by convolving all of the component-level OTF results. Having this system-level OTF for the imaging system we are modeling, we can take a notional ideal image and convolve it with the OTF to produce a high-accuracy estimate for what that image would look like if imaged by this our modeled imaging system.

Such a treatment is based on the premise that we can model an optical system as a linear spatial-invariant system completely defined by a system-level OTF. Here, spatial-invariance is referring to the fact that we assume the OTF is constant across the field of view. This framework is motivated by the field of Fourier optics.

Due to many different factors, all real-world optical systems produce an imperfect image of the world they are observing. One form of degradation is geometric distortion (barrel, pincushion), where features in the image are stretched to different locations, and another aspect is the addition of random or fixed-pattern noise. However, these modes of degradation are not considered by this module or by the treatment with the system-level OTF. The OTF treatment deals with, loosely speaking, all modes of degradation that less to reduction in spatial resolution or sharpness.

The simplest example that we can consider to understand what the OTF represents is the scenario of imaging a distant star with our imaging system. For all intents and purposes, a star is an infinitesimal point source of light (i.e., perfect plane wave incident on the optical system’s aperture plane), and the perfect image of the star would also be a point of light. However, the actual image of that star created by the imaging system will always be some blurred-out extended shape, and that shape is by definition the OTF. For example, the highest-quality imaging systems are often “diffraction-limited”, meaning all other aspects of the imaging system were sufficiently optimized such that its resolution is defined by the fundamental limit imposed by diffraction, the OTF is an Airy disk shape, and the angular resolution is approximately 1.22*lambda/d, where lambda is the wavelength of the light and d is the aperture diameter.

All of the functions in this module that end with OTF are of the form

H = <degradation-type>OTF(u, v, extra_parameters)

where u and v are the horizontal and vertical angular spatial frequency coordinates (rad^-1) and ‘extra_parameters’ captures all of relevant parameters of the imaging system dictating the particular mode of OTF. The return, H, is the OTF response (unitless) for that those spatial frequencies.

Functions

apply_otf_to_image

Applies OTF to ideal reference image to simulate real imaging.

circular_aperture_OTF

IBSM Equation 3-20.

circular_aperture_OTF_with_defocus

Calculate MTF for an unobscured circular aperture with a defocus aberration.

coherence_diameter

Improvement / replacement for calculation of Fried's coherence diameter (m) for spherical wave propagation.

common_OTFs

Returns optical transfer functions for the most common sources.

cte_OTF

IBSM Equation 3-39.

dark_current_from_density

The dark current part of Equation 3-42.

defocus_OTF

IBSM Equation 3-25.

detector_OTF

A simplified version of IBSM Equation 3-36.

detector_OTF_with_aggregation

Blur due to the spatial integrating effects of the detector size and aggregation.

diffusion_OTF

IBSM Equation 3-40.

drift_OTF

IBSM Equation 3-29.

filter_OTF

Returns the OTF of any filter applied to the image (e.g. a sharpening filter).

gaussian_OTF

A real-valued Gaussian OTF.

hufnagel_valley_turbulence_profile

Replaces IBSM Equations 3-6 through 3-8.

image_domain_defocus_radii

IBSM Equation 3-27.

jitter_OTF

IBSM Equation 3-28.

object_domain_defocus_radii

IBSM Equation 3-26.

otf_to_psf

Transform an optical transfer function into a point spread function (i.e., image space blur filter).

polychromatic_turbulence_OTF

IBSM Eqn 3.9.

resample_2D

Resample an image.

resampled_dimensions

Get the resampled dimension.

slice_otf

Returns a one dimensional slice of a 2D OTF (or MTF) along the direction specified by the input angle.

tdi_OTF

IBSM Equation 3-38.

turbulence_OTF

IBSM Equation 3-3.

wavefront_OTF

IBSM Equation 3-31.

wavefront_OTF_2

This function is an alternative to wavefront_OTF.

weighted_by_wavelength

Returns a wavelength weighted composite array based on my_function.

wind_speed_turbulence_OTF

IBSM Equation 3-9.