import dascore as dc
import numpy as np
# Example 1 - Right-sided wavefield
= (
patch 'dispersion_event')
dc.get_example_patch(
)
= patch.dispersion_phase_shift(np.arange(100,1500,1),
disp_patch =0.1,approx_freq=[5,70])
approx_resolution= disp_patch.viz.waterfall(show=False,cmap=None)
ax 5, 70)
ax.set_xlim(1500, 100)
ax.set_ylim(=True, ax=ax)
disp_patch.viz.waterfall(show
# Example 2 - Left-sided wavefield
= (
patch 'dispersion_event')
dc.get_example_patch(
)= patch.dims.index("distance")
axis = np.flip(patch.data, axis=axis)
flipped_data = patch.update(data=flipped_data)
mirrored_patch
= mirrored_patch.dispersion_phase_shift(np.arange(100,1500,1),
disp_patch =0.1,approx_freq=[5,70]) approx_resolution
dispersion_phase_shift
dispersion_phase_shift(
patch: Patch ,
phase_velocities: collections.abc.Sequence[float] ,
approx_resolution: None | float[None, float] = None,
approx_freq: None | tuple[None, tuple[float, float]] = None,
)-> ‘PatchType’
Compute dispersion images using the phase-shift method.
Parameters
Parameter | Description |
---|---|
patch |
Patch to transform. Has to have dimensions of time and distance. It also needs to be right-sided (see notes below). |
phase_velocities |
NumPY array of positive velocities, monotonically increasing, for which the dispersion will be computed. |
approx_resolution |
Approximated frequency (Hz) resolution for the output. If left empty, the frequency resolution is dictated by the number of samples. |
approx_freq |
Minimum and maximum frequency to compute dispersion for, in Hz If left empty, minimum is 0 Hz, and maximum is Nyquist |
See also Park, Miller, and Xia (1998)
Inspired by https://geophydog.cool/post/masw_phase_shift/.
Dims/Units of the output are forced to be ‘frequency’ (‘Hz’) and ‘velocity’ (‘m/s’).
The patch’s distance coordinates are assumed to be ordered by distance from the source, and not “fiber distance”. In other words, data are effectively mapped along a 2-D line.
The input shot gather must be right-sided meaning the wavefield propagates from lower to higher channel numbers. Always plot the patch first to verify its orientation. If the gather is left-sided, simply mirror the patch along the distance axis (see Example 2 below).
Examples
```