OwenModel.apply_distortion

giant.camera_models.owen_model:

OwenModel.apply_distortion(pinhole_locations)[source]

This method applies the distortion model to the specified pinhole (gnomic) locations in the image frame.

In general this function is not used by the user and the higher level project_onto_image() is used which calls this method (along with a few others) instead. In cases were it is desirable to use this method the pinhole locations should be input as a shape (2,) or shape (2, n) array of image plane locations in units of distance. The output from this function is the distorted image plane locations of the points in units of distance.

For the Owen model, the distortion is defined as

\[\begin{split}\Delta\mathbf{x}_I = \left(\epsilon_2r^2+\epsilon_4r^4+\epsilon_5y_I+\epsilon_6x_I\right)\mathbf{x}_I + \left(\epsilon_1r + \epsilon_2r^3\right)\left[\begin{array}{c} -y_I \\ x_I \end{array}\right]\end{split}\]

where \(\Delta\mathbf{x}_I\) is the additive distortion, \(\epsilon_2\) and \(\epsilon_4\) are radial distortion coefficients, \(\epsilon_5\) and \(\epsilon_6\) are tip/tilt/prism distortion coefficients, \(\epsilon_1\) and \(\epsilon_3\) are pinwheel distortion coefficients, \(\mathbf{x}_I\) is the gnomic location in units of distance, and \(r = \sqrt{\mathbf{x}_I^T\mathbf{x}_I}\) is the radial distance from the optical axis.

Parameters:

pinhole_locations (Sequence | ndarray) – The image plane location of points to be distorted as a shape (2,) or (2, n) array in units of distance

Returns:

The distorted locations of the points on the image plane as a shape (2,) or (2, n) array in units of distance

Return type:

ndarray