max_cross_correlation¶
- sunkit_image.time_lag.max_cross_correlation(signal_a, signal_b, time: Unit('s'), lag_bounds: (Unit('s'), None) = None)[source]¶
Compute the maximum value of the cross-correlation between
signal_a
andsignal_b
.This is the maximum value of the cross-correlation as a function of lag (computed in
cross_correlation()
). This will always be between -1 (perfectly anti-correlated) and +1 (perfectly correlated) though in practice is nearly always between 0 and +1.- Parameters:
signal_a (array-like) – The first dimension must be the same length as
time
.signal_b (array-like) – Must have the same dimensions as
signal_a
.time (array-like) – Time array corresponding to the intensity time series
signal_a
andsignal_b
.lag_bounds (
tuple
, optional) – Minimum and maximum lag to consider when finding the time lag that maximizes the cross-correlation. This is useful for minimizing boundary effects.
- Returns:
array-like – Maximum value of the cross-correlation. The dimensions will be consistent with those of
signal_a
andsignal_b
, i.e. if the input arrays are of dimension(K,M,N)
, the resulting array will have dimensions(M,N)
. Similarly, if the input signals are one-dimensional time series(K,)
, the result will have dimension(1,)
.
References
Viall, N.M. and Klimchuk, J.A. Evidence for Widespread Cooling in an Active Region Observed with the SDO Atmospheric Imaging Assembly ApJ, 753, 35, 2012 (https://doi.org/10.1088/0004-637X/753/1/35)