dispersion_phase_shift

function of dascore.transform.dispersion source

dispersion_phase_shift(
    self ,
    phase_velocities: collections.abc.Sequence[float] ,
    approx_resolution: float | None[float, None] = None,
    approx_freq: tuple[tuple[float, float], None] = None,
    time_dim: str | None[str, None] = None,
    distance_dim: str = distance,
    source_distance: float | pint.registry.Quantity | None[float, Quantity, None] = None,
    normalize: Literal[‘phase’] | None = phase,
)-> ‘Self’

Compute dispersion images using the phase-shift method.

The patch must have time-like and distance-like dimensions (see notes). Any other dimensions are imaged independently and lead the output’s dimensions, which end with velocity and frequency.

Parameters

Parameter Description
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
time_dim The time-like dimension. If None, time, else lag_time, so
the output of Patch.correlate chains.
distance_dim The distance-like dimension.
source_distance The source’s position along distance_dim, a float in the
coordinate’s units or a quantity. If given, each channel’s offset
abs(distance - source_distance) is used, which images a gather
with channels on both sides of the source.
normalize “phase” divides each channel’s spectrum by its magnitude, keeping
only its phase, and the output is dimensionless. None stacks the
spectra as they are (a slant stack), and the output keeps the
patch’s data units. Either way, the stack is divided by the number
of channels.
Note
  • 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’).

  • Each channel’s distance is read as its position along the wave’s path, so data are effectively mapped along a 2-D line; the coordinate need not be sorted.

  • The image depends only on distances relative to each other, so any origin works for a one-sided gather, but the wave must travel toward increasing distance. For a gather whose wave travels toward lower distance, negate the coordinate; for a two-sided gather, use the offset from the source with source_distance. The new values carry no units, so convert to metres first: p = patch.convert_units(distance="m") then p.update_coords(distance=-p.get_array("distance")). Reversing the patch with flip changes nothing, since it reverses the data and the coordinate together.

Examples

import dascore as dc
import numpy as np

# Example 1 - Right-sided wavefield
patch = (
    dc.get_example_patch('dispersion_event')
)

disp_patch = patch.dispersion_phase_shift(np.arange(100,1500,1),
            approx_resolution=0.1,approx_freq=[5,70])
ax = disp_patch.viz.waterfall(show=False, cbar=False)
ax.set_xlim(5, 70)
ax.set_ylim(1500, 100)
disp_patch.viz.waterfall(show=True, ax=ax)

# Example 2 - Image the correlation of every channel with the first
cc = patch.correlate(distance=0, samples=True).squeeze()
cc_disp = cc.select(lag_time=(0, None)).dispersion_phase_shift(
    np.arange(100, 1500, 5), approx_freq=[5, 70]
)

```

References

Park, Choon Byong, Richard D Miller, and Jianghai Xia. 1998. “Imaging Dispersion Curves of Surface Waves on Multi-Channel Record.” In SEG Technical Program Expanded Abstracts 1998, 1377–80. Society of Exploration Geophysicists.