AbstractInterpolatedDistortionModel#

class optika.distortion.AbstractInterpolatedDistortionModel[source]#

Bases: AbstractDistortionModel

A distortion model defined by interpolating between known scene/sensor coordinates.

This class has two main members, coordinates_scene and coordinates_sensor, the calibration points between which subclasses interpolate.

Attributes

axis_field

The logical axes corresponding to changing position in the scene.

axis_wavelength

The logical axis corresponding to changing wavelength.

coordinates_scene

The wavelength and position of each calibration point in the scene.

coordinates_sensor

The position of each calibration point mapped onto the sensor.

Methods

__init__()

distort(coordinates)

Convert scene coordinates to sensor coordinates.

to_string([prefix])

Public-facing version of the __repr__ method that allows for defining a prefix string, which can be used to calculate how much whitespace to add to the beginning of each line of the result.

undistort(coordinates)

Convert sensor coordinates to scene coordinates.

Inheritance Diagram

Inheritance diagram of optika.distortion.AbstractInterpolatedDistortionModel
abstractmethod distort(coordinates)#

Convert scene coordinates to sensor coordinates.

Parameters:

coordinates (AbstractSpectralPositionalVectorArray) – The wavelength and position of each point in the scene.

Return type:

SpectralPositionalVectorArray

to_string(prefix=None)#

Public-facing version of the __repr__ method that allows for defining a prefix string, which can be used to calculate how much whitespace to add to the beginning of each line of the result.

Parameters:

prefix (None | str) – an optional string, the length of which is used to calculate how much whitespace to add to the result.

Return type:

str

abstractmethod undistort(coordinates)#

Convert sensor coordinates to scene coordinates.

Parameters:

coordinates (AbstractSpectralPositionalVectorArray) – The wavelength and sensor position of each point.

Return type:

SpectralPositionalVectorArray

abstract property axis_field: tuple[str, str]#

The logical axes corresponding to changing position in the scene.

abstract property axis_wavelength: str#

The logical axis corresponding to changing wavelength.

abstract property coordinates_scene: AbstractSpectralPositionalVectorArray#

The wavelength and position of each calibration point in the scene.

abstract property coordinates_sensor: AbstractCartesian2dVectorArray#

The position of each calibration point mapped onto the sensor.