calculate_shift¶
-
sunpy.image.coalignment.
calculate_shift
(this_layer, template)[source] [edit on github]¶ Calculates the pixel shift required to put the template in the “best” position on a layer.
- Parameters
this_layer (
numpy.ndarray
) – A numpy array of size(ny, nx)
, where the first two dimensions are spatial dimensions.template (
numpy.ndarray
) – A numpy array of size(N, M)
whereN < ny
andM < nx
.
- Returns
tuple
– Pixel shifts(yshift, xshift)
relative to the offset of the template to the input array.