sunkit_image.coalignment.mapsequence_coalign_by_rotation(mc, *, layer_index=0, clip=True, shift=None, **kwargs)[source]#

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.

  • mc ( – 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 layer_index.

  • 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 calculate_solar_rotate_shift.

Returns: – The results of the shifts applied to the input mapsequence.


>>> import  
>>> from sunkit_image.coalignment import mapsequence_coalign_by_rotation
>>> map1 =  
>>> map2 =  
>>> mc =[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)