warp_array_elements¶
- sofia_redux.toolkit.image.warp.warp_array_elements(source, destination, shape, order=2, get_transform=False)[source]¶
Warp the indices of an array with a given shape using a polynomial.
Note that all dimensions should be supplied using the Numpy (y, x) ordering convention.
- Parameters:
- sourcenumpy.ndarray
The reference source coordinates of shape (n_dimensions, shape2,). Used in conjunction with
destination
to define the warping transform.- destinationnumpy.ndarray
The reference destination coordinates of shape (n_dimensions, shape2,). Used in conjunction with
source
to define the warping transform.- shapetuple (int)
The shape of the output array with len(shape) equal to n_dimensions.
- orderint, optional
The order of polynomial used to model the transformation between
source
anddestination
.- get_transformbool, optional
If
True
, return the polynomial transform in addition to the results.
- Returns:
- warped_coordinates, [transform]np.ndarray (float), PolynomialTransform
The warped array indices of shape (n_dimensions, shape,).