Correlate

Here, we demonstrate how to utilize the Correlate module to perform cross-correlation between a specific channel/time sample and other channels/time samples within a given patch. By doing so, we create a new “correlate patch”, which is essentially a data construct that encapsulates the results of these cross-correlation operations. We use the Ricker wavelet as an example signal and compute its cross-correlation using DASCore.

Load and visualize the Ricker wavelet

import dascore as dc

patch = dc.get_example_patch(
    "ricker_moveout",
    velocity=100,
    duration=2,
)

patch.viz.waterfall();

Compute Ricker wavelet’s cross-correlation

As an example, here we cross-correlate our Ricker patch’s all channels with channel number 4 as a master channel or virtual source. In the correlate patch, the first three traces have negative time lag, but the fourth trace appears at 0.0 sec time lag (auto-correlation) along with other traces with positive time lags. As expected, both Ricker patch and the correlate patch have the same 100 m/s moveout.

import dascore as dc

patch = dc.get_example_patch(
    "ricker_moveout",
    velocity=100,
    duration=2,
)

corr = patch.correlate(distance=3, samples=True)

corr.viz.waterfall();