Cross-correlation is a mathematical operation used to measure the similarity or relationship between two signals or datasets asa function of the time-lag applied to one of them. It essentially quantifies how one signal can be correlated with a shifted version of another signal.