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 (abs(distance - 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 dcimport numpy as np# Example 1 - Right-sided wavefieldpatch = ( 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)
```
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.