apply_shifts#

sunkit_image.coalignment.apply_shifts(mc, yshift: Unit('pix'), xshift: Unit('pix'), clip=True, **kwargs)[source]#

Apply a set of pixel shifts to a MapSequence, and return a new MapSequence.

Parameters:
  • mc (sunpy.map.MapSequence) – A MapSequence of shape (ny, nx, nt), where nt is the number of layers in the MapSequence. ny is the number of pixels in the “y” direction, nx is the number of pixels in the “x” direction.

  • yshift (Quantity) – An array of pixel shifts in the y-direction for an image.

  • xshift (Quantity) – An array of pixel shifts in the x-direction for an image.

  • clip (bool, optional) – If True (default), then clip off “x”, “y” edges of the maps in the sequence that are potentially affected by edges effects.

Notes

All other keywords are passed to scipy.ndimage.shift.

Returns:

sunpy.map.MapSequence – A MapSequence of the same shape as the input. All layers in the MapSequence have been shifted according the input shifts.