calculate_match_template_shift¶
- sunpy.image.coalignment.calculate_match_template_shift(mc, template=None, layer_index=0, func=<function _default_fmap_function>)[source]¶
Deprecated since version 4.0: The calculate_match_template_shift function is deprecated and may be removed in version 4.1. Use
sunkit_image.coalignment.calculate_match_template_shift
instead.Calculate the arcsecond shifts necessary to co-register the layers in a
MapSequence
according to a template taken from thatMapSequence
.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 coalignedMapSequence
, and compare the differences you see to the calculated shifts.- Parameters
mc (
sunpy.map.MapSequence
) – AMapSequence
of shape(ny, nx, nt)
, wherent
is the number of layers in theMapSequence
.template ({
None
|Map
|numpy.ndarray
}, optional) – The template used in the matching. If an ~numpy.ndarray` is passed, thenumpy.ndarray
has to have two dimensions.layer_index (
int
, optional) – The template is assumed to refer to the map in theMapSequence
indexed by the value of “layer_index”. Displacements of all maps in theMapSequence
are assumed to be relative to this layer. The displacements of the template relative to this layer are therefore(0, 0)
.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.