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

Returns

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