- sunkit_image.coalignment.calculate_match_template_shift(mc, template=None, layer_index=0, func=<function _default_fmap_function>)¶
Calculate the arcsecond shifts necessary to co-register the layers in a
MapSequenceaccording to a template taken from that
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 coaligned
MapSequence, and compare the differences you see to the calculated shifts.
sunpy.map.MapSequence) – A
(ny, nx, nt), where
ntis the number of layers in the
int, optional) – The template is assumed to refer to the map in the
MapSequenceindexed by the value of “layer_index”. Displacements of all maps in the
MapSequenceare assumed to be relative to this layer. The displacements of the template relative to this layer are therefore
func (function, optional) – A function which is applied to the data values before the coalignment method is applied. This can be useful in coalignment, because it is sometimes better to co-align on a function of the data rather than the data itself. The calculated shifts are applied to the original data. Examples of useful functions to consider for EUV images are the logarithm or the square root. The function is of the form
func = F(data). The default function ensures that the data are floats.