disba
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesedisba - Surface Wave Dispersion
disba - 面波频散
Quick Reference
快速参考
python
import numpy as np
from disba import PhaseDispersion, GroupDispersionpython
import numpy as np
from disba import PhaseDispersion, GroupDispersionDefine 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')
undefinedgd = GroupDispersion(*zip(thickness, vp, vs, rho))
ugr = gd(periods, mode=0, wave='rayleigh')
undefinedKey Classes
核心类
| Class | Purpose |
|---|---|
| Phase velocity dispersion curves |
| Group velocity dispersion curves |
| Sensitivity kernels (dc/dVs, dc/dVp, dc/drho) |
| 类 | 用途 |
|---|---|
| 相速度频散曲线计算 |
| 群速度频散曲线计算 |
| 敏感核计算(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 motionpython
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 periodspython
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'
undefinedundefinedForward 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
模型参数
| Parameter | Unit | Description |
|---|---|---|
| thickness | km | Layer thickness (0 = half-space) |
| vp | km/s | P-wave velocity |
| vs | km/s | S-wave velocity |
| rho | g/cm3 | Density |
| 参数 | 单位 | 描述 |
|---|---|---|
| thickness | km | 层厚度(0表示半无限空间) |
| vp | km/s | P波速度 |
| vs | km/s | S波速度 |
| rho | g/cm3 | 密度 |
Wave Types
波类型
| Type | Motion | Sensitivity |
|---|---|---|
| Rayleigh | Vertical + radial | Vs (primary), Vp (secondary) |
| Love | Horizontal (SH) | Vs only |
| 类型 | 运动形式 | 敏感性 |
|---|---|---|
| Rayleigh | 垂直+径向 | 主要敏感Vs,次要敏感Vp |
| Love | 水平(SH) | 仅敏感Vs |
Key Points
关键点
- Last layer thickness = 0 indicates half-space (infinite depth)
- Numba JIT - First call is slower due to compilation
- Higher modes may not exist at all periods
- Sensitivity kernels show which depths affect each period
- 最后一层厚度设为0表示半无限空间(深度无限)
- Numba JIT编译 - 首次调用速度较慢,因需要编译
- 高阶振型可能并非在所有周期都存在
- 敏感核显示不同深度对各周期的影响
When to Use vs Alternatives
适用场景与替代工具对比
| Tool | Best For |
|---|---|
| disba | Fast dispersion computation, Numba-accelerated, Python-native |
| CPS (Herrmann) | Full surface wave analysis suite, Fortran-based, broader features |
| pysurf | Surface 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
常见问题
| Issue | Solution |
|---|---|
| No dispersion at short periods | Increase model resolution (thinner layers) |
| Higher mode not computed | Mode may not exist at those periods |
| Slow first run | Normal - Numba compiles on first call |
| NaN in results | Check 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 - 计算并绘制频散曲线