disba

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

disba - Surface Wave Dispersion

disba - 面波频散

Quick Reference

快速参考

python
import numpy as np
from disba import PhaseDispersion, GroupDispersion
python
import numpy as np
from disba import PhaseDispersion, GroupDispersion

Define velocity model (thickness, Vp, Vs, density)

定义速度模型(厚度、Vp、Vs、密度)

thickness in km, velocities in km/s, density in g/cm3

厚度单位:km,速度单位:km/s,密度单位:g/cm3

thickness = np.array([0.5, 1.0, 2.0, 0.0]) # 0.0 = half-space vp = np.array([1.5, 2.5, 4.0, 6.0]) vs = np.array([0.8, 1.4, 2.3, 3.5]) rho = np.array([1.8, 2.0, 2.3, 2.6])
thickness = np.array([0.5, 1.0, 2.0, 0.0]) # 0.0 表示半无限空间 vp = np.array([1.5, 2.5, 4.0, 6.0]) vs = np.array([0.8, 1.4, 2.3, 3.5]) rho = np.array([1.8, 2.0, 2.3, 2.6])

Periods to compute (seconds)

要计算的周期范围(秒)

periods = np.linspace(0.1, 5.0, 50)
periods = np.linspace(0.1, 5.0, 50)

Calculate Rayleigh wave phase velocity

计算Rayleigh波相速度

pd = PhaseDispersion(*zip(thickness, vp, vs, rho)) cpr = pd(periods, mode=0, wave='rayleigh') # Fundamental mode
pd = PhaseDispersion(*zip(thickness, vp, vs, rho)) cpr = pd(periods, mode=0, wave='rayleigh') # 基阶振型

Calculate group velocity

计算群速度

gd = GroupDispersion(*zip(thickness, vp, vs, rho)) ugr = gd(periods, mode=0, wave='rayleigh')
undefined
gd = GroupDispersion(*zip(thickness, vp, vs, rho)) ugr = gd(periods, mode=0, wave='rayleigh')
undefined

Key Classes

核心类

ClassPurpose
PhaseDispersion
Phase velocity dispersion curves
GroupDispersion
Group velocity dispersion curves
PhaseSensitivity
Sensitivity kernels (dc/dVs, dc/dVp, dc/drho)
用途
PhaseDispersion
相速度频散曲线计算
GroupDispersion
群速度频散曲线计算
PhaseSensitivity
敏感核计算(dc/dVs、dc/dVp、dc/drho)

Essential Operations

关键操作

Rayleigh and Love Waves

Rayleigh波与Love波

python
pd = PhaseDispersion(*zip(thickness, vp, vs, rho))
cpr = pd(periods, mode=0, wave='rayleigh')  # Vertical + radial motion
cpl = pd(periods, mode=0, wave='love')       # Horizontal SH motion
python
pd = PhaseDispersion(*zip(thickness, vp, vs, rho))
cpr = pd(periods, mode=0, wave='rayleigh')  # 垂直+径向运动
cpl = pd(periods, mode=0, wave='love')       # 水平SH运动

Multiple Modes

多阶振型

python
for mode in range(3):  # Fundamental + higher modes
    try:
        cpr = pd(periods, mode=mode, wave='rayleigh')
    except Exception:
        pass  # Higher modes may not exist at all periods
python
for mode in range(3):  # 基阶+高阶振型
    try:
        cpr = pd(periods, mode=mode, wave='rayleigh')
    except Exception:
        pass  # 高阶振型可能并非在所有周期都存在

Sensitivity Kernels

敏感核

python
from disba import PhaseSensitivity

ps = PhaseSensitivity(*zip(thickness, vp, vs, rho))
kernel_vs = ps(period=1.0, mode=0, wave='rayleigh', parameter='velocity_s')
python
from disba import PhaseSensitivity

ps = PhaseSensitivity(*zip(thickness, vp, vs, rho))
kernel_vs = ps(period=1.0, mode=0, wave='rayleigh', parameter='velocity_s')

Other parameters: 'velocity_p', 'density'

其他可选参数:'velocity_p'、'density'

undefined
undefined

Forward Modelling

正演模拟

python
def forward_model(vs_profile, thickness, vp_vs_ratio=1.73):
    """Compute dispersion curve from Vs profile."""
    vp = vs_profile * vp_vs_ratio
    rho = 0.32 * vp + 0.77  # Gardner relation
    pd = PhaseDispersion(*zip(thickness, vp, vs_profile, rho))
    return pd(periods, mode=0, wave='rayleigh')
python
def forward_model(vs_profile, thickness, vp_vs_ratio=1.73):
    """根据Vs剖面计算频散曲线。"""
    vp = vs_profile * vp_vs_ratio
    rho = 0.32 * vp + 0.77  # Gardner经验公式
    pd = PhaseDispersion(*zip(thickness, vp, vs_profile, rho))
    return pd(periods, mode=0, wave='rayleigh')

Model Parameters

模型参数

ParameterUnitDescription
thicknesskmLayer thickness (0 = half-space)
vpkm/sP-wave velocity
vskm/sS-wave velocity
rhog/cm3Density
参数单位描述
thicknesskm层厚度(0表示半无限空间)
vpkm/sP波速度
vskm/sS波速度
rhog/cm3密度

Wave Types

波类型

TypeMotionSensitivity
RayleighVertical + radialVs (primary), Vp (secondary)
LoveHorizontal (SH)Vs only
类型运动形式敏感性
Rayleigh垂直+径向主要敏感Vs,次要敏感Vp
Love水平(SH)仅敏感Vs

Key Points

关键点

  1. Last layer thickness = 0 indicates half-space (infinite depth)
  2. Numba JIT - First call is slower due to compilation
  3. Higher modes may not exist at all periods
  4. Sensitivity kernels show which depths affect each period
  1. 最后一层厚度设为0表示半无限空间(深度无限)
  2. Numba JIT编译 - 首次调用速度较慢,因需要编译
  3. 高阶振型可能并非在所有周期都存在
  4. 敏感核显示不同深度对各周期的影响

When to Use vs Alternatives

适用场景与替代工具对比

ToolBest For
disbaFast dispersion computation, Numba-accelerated, Python-native
CPS (Herrmann)Full surface wave analysis suite, Fortran-based, broader features
pysurfSurface wave processing from field data, MASW/SASW workflows
Use disba when you need fast forward modelling of dispersion curves for inversion or parameter studies. Numba acceleration makes it ideal for iterative workflows requiring thousands of forward computations.
Use CPS instead when you need the full Herrmann suite: receiver functions, synthetic seismograms, or established research-grade tools.
Use pysurf instead when processing raw field data (shot gathers) through MASW/SASW workflows to extract dispersion curves from measured data.
工具最佳适用场景
disba快速频散计算、Numba加速、原生Python实现
CPS (Herrmann)全套面波分析套件、Fortran实现、功能更全面
pysurf野外数据面波处理、MASW/SASW工作流
当需要以下场景时使用disba:需要快速正演模拟频散曲线用于反演或参数研究。Numba加速使其非常适合需要数千次正演计算的迭代工作流。
当需要以下场景时改用CPS:需要完整的Herrmann套件功能,如接收函数、合成地震图或成熟的研究级工具。
当需要以下场景时改用pysurf:处理原始野外数据(炮集),通过MASW/SASW工作流从实测数据中提取频散曲线。

Common Workflows

常见工作流

Compute and analyze dispersion curves

计算并分析频散曲线

- [ ] Define layered velocity model (thickness, Vp, Vs, density)
- [ ] Set last layer thickness to 0.0 (half-space)
- [ ] Choose period range appropriate for model depth
- [ ] Compute phase/group velocity for fundamental mode
- [ ] Compute higher modes if needed (wrap in try/except)
- [ ] Generate sensitivity kernels to assess depth resolution
- [ ] Compare computed curves against observed data
- [ ] 定义层状速度模型(厚度、Vp、Vs、密度)
- [ ] 将最后一层厚度设为0.0(半无限空间)
- [ ] 选择与模型深度匹配的周期范围
- [ ] 计算基阶振型的相速度/群速度
- [ ] 如需计算高阶振型,用try/except包裹(避免报错)
- [ ] 生成敏感核评估深度分辨率
- [ ] 将计算得到的曲线与观测数据对比

Common Issues

常见问题

IssueSolution
No dispersion at short periodsIncrease model resolution (thinner layers)
Higher mode not computedMode may not exist at those periods
Slow first runNormal - Numba compiles on first call
NaN in resultsCheck model validity (Vs < Vp, positive values)
问题解决方案
短周期无频散结果提高模型分辨率(使用更薄的层)
无法计算高阶振型该振型可能在对应周期不存在
首次运行速度慢正常现象 - Numba在首次调用时进行编译
结果出现NaN检查模型有效性(确保Vs < Vp,所有参数为正值)

References

参考资料

  • Dispersion Curves - Phase vs group velocity, mode numbering
  • Velocity Models - Model setup, units, common profiles
  • 频散曲线 - 相速度与群速度、振型编号规则
  • 速度模型 - 模型搭建、单位说明、常见剖面

Scripts

脚本

  • scripts/dispersion_analysis.py - Compute and plot dispersion curves
  • scripts/dispersion_analysis.py - 计算并绘制频散曲线