import dascore as dc
patch = dc.get_example_patch(
"ricker_moveout",
velocity=100,
duration=2,
)
patch.viz.waterfall();
DASCore 1.0 beta is out! Read the announcement and check the migration guide.
Cross-correlate a moving Ricker wavelet against one channel used as a virtual source.
Use channel 4 (zero-based index 3) as the virtual source. Its autocorrelation is at zero lag; channels on either side have negative or positive lags while retaining the 100 m/s moveout.
normalize=True divides each correlation by the square root of the trace’s whole-trace energy times the source’s, so the autocorrelation peaks at one and no value exceeds one in magnitude. The energies do not change with lag, so for traces with their mean removed this equals the Pearson coefficient only at zero lag.
other correlates each trace with the matching trace of a second patch along lag_dim. A patch with only lag_dim, such as a short template, is matched against every trace. Here a 0.2 s window around the arrival at channel 4 is the template. Each channel peaks at the lag where the template’s waveform lines up with the trace: the offset of the template’s start from the start of the trace, in seconds. Channel 4 peaks at 0.45 s, where the template was cut; add the arrival’s offset inside the template (0.1 s) to get the arrival time. A positive lag means the waveform comes later in the trace than in the template, and the lags may run a few samples past the full range, as zeros from padding. With normalize=True the energies are those of the whole traces, so a match peaks at one only because these traces hold nothing but the wavelet.