sunkit_image.coalignment.calculate_shift(this_layer, template)[source]

Calculates the pixel shift required to put the template in the “best” position on a layer.

  • 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) where N < ny and M < nx.


tuple – Pixel shifts (yshift, xshift) relative to the offset of the template to the input array.