- sunkit_image.coalignment.mapsequence_coalign_by_rotation(mc, layer_index=0, clip=True, shift=None, **kwargs)#
Move the layers in a mapsequence according to the input shifts.
If an input shift is not given, the shifts due to solar rotation relative to an index layer is calculated and applied. When using this functionality, it is a good idea to check that the shifts that were applied to were reasonable and expected. One way of checking this is to animate the original mapsequence, animate the derotated mapsequence, and compare the differences you see to the calculated shifts.
sunpy.map.MapSequence) – A mapsequence of shape (ny, nx, nt), where nt is the number of layers in the mapsequence.
layer_index (int) – Solar derotation shifts of all maps in the mapsequence are assumed to be relative to the layer in the mapsequence indexed by
clip (bool) – If True, then clip off x, y edges in the datasequence that are potentially affected by edges effects.
**kwargs – These keywords are passed to
sunpy.map.MapSequence– The results of the shifts applied to the input mapsequence.
>>> import sunpy.data.sample >>> from sunkit_image.coalignment import mapsequence_coalign_by_rotation >>> map1 = sunpy.map.Map(sunpy.data.sample.AIA_171_IMAGE) >>> map2 = sunpy.map.Map(sunpy.data.sample.EIT_195_IMAGE) >>> mc = sunpy.map.Map([map1, map2], sequence=True) >>> derotated_mc = mapsequence_coalign_by_rotation(mc) >>> derotated_mc = mapsequence_coalign_by_rotation(mc, layer_index=-1) >>> derotated_mc = mapsequence_coalign_by_rotation(mc, clip=False)