Skip to content

Commit 46e1e69

Browse files
committed
DOC: update command description
1 parent 78d2ff0 commit 46e1e69

File tree

18 files changed

+70
-69
lines changed

18 files changed

+70
-69
lines changed

docs/source/API/c_api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ C extension API
1111

1212
C_extension/common
1313
C_extension/dynamic
14+
C_extension/grt.h
15+
C_extension/grt_error.h
1416
C_extension/static
1517
C_extension/travt

docs/source/Advanced/filon/linear_filon.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _linear_filon:
2-
31
固定间隔的Filon积分法
42
=========================
53

@@ -10,7 +8,7 @@
108

119
.. warning::
1210

13-
谨慎使用固定间隔的Filon积分法,除非你很清楚原理以及误差来源。推荐使用 :ref:`self_adaptive_filon` 以减少固定积分间隔的影响。
11+
谨慎使用固定间隔的Filon积分法,除非你很清楚原理以及误差来源。推荐使用 :doc:`/Advanced/filon/self_adaptive_filon` 以减少固定积分间隔的影响。
1412

1513

1614
以下介绍程序中使用的 **基于两点线性插值的Filon积分** :ref:`(纪晨, 姚振兴, 1995) <jichen_1995>` :ref:`(初稿) <yao_init_manuscripts>` ,主要介绍思路,具体公式推导详见对应论文。
@@ -27,7 +25,7 @@
2725
2826
P_m(\omega,r) = \int_0^{k^*} F_m(k, \omega)J_m(kr)kdk + \int_{k^*}^{k_{\text{max}}} F_m(k, \omega)J_m(kr)kdk
2927
30-
其中积分第一部分仍然使用离散波数积分求解 (见 :ref:`k_integ_rst` 部分),积分第二部分将Bessel函数取渐近表达式,可将其转为以下形式
28+
其中积分第一部分仍然使用离散波数积分求解 (见 :doc:`/Advanced/k_integ` 部分),积分第二部分将Bessel函数取渐近表达式,可将其转为以下形式
3129

3230
.. math::
3331
@@ -62,11 +60,11 @@
6260

6361
.. group-tab:: C
6462

65-
:command:`grt` 和 :command:`stgrt` 程序支持以下可选参数来使用Filon积分,具体说明详见 :command:`grt -h` 或 :command:`stgrt -h`。
63+
:command:`greenfn` 和 :command:`static_greenfn` 模块支持以下可选参数来使用Filon积分,具体说明详见 :command:`grt greenfn -h` 或 :command:`grt static greenfn -h`。
6664

6765
+ ``-L<length>[/<Flength>/<Fcut>]``
6866

69-
+ ``<length>`` 定义离散波数积分的积分间隔 (见 :ref:`k_integ_rst` 部分)
67+
+ ``<length>`` 定义离散波数积分的积分间隔 (见 :doc:`/Advanced/k_integ` 部分)
7068
+ ``<Flength>`` 定义Filon积分间隔,公式和离散波数积分使用的一致。
7169
+ ``<Fcut>`` 定义了两个积分的分割点, :math:`k^*=` ``<Fcut>`` :math:`/r_{\text{max}}`
7270

docs/source/Advanced/filon/self_adaptive_filon.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11

2-
.. _self_adaptive_filon:
3-
42
自适应Filon积分法
53
===================
64

@@ -9,7 +7,7 @@
97

108
-----------------------------------------------------------
119

12-
:ref:`linear_filon` 部分简单介绍了Filon积分的过程与核心原理,即 **分段计算积分的解析解**,而以下介绍的 **自适应Filon积分法(SAFIM)** ,便是 **动态分段**,在核函数变化剧烈的部分多采样,在核函数变化平缓的部分少采样。具体原理详见 :ref:`(Chen and Zhang, 2001) <chen_2001>` :ref:`(张海明, 2021) <zhang_book_2021>` 。
10+
:doc:`/Advanced/filon/linear_filon` 部分简单介绍了Filon积分的过程与核心原理,即 **分段计算积分的解析解**,而以下介绍的 **自适应Filon积分法(SAFIM)** ,便是 **动态分段**,在核函数变化剧烈的部分多采样,在核函数变化平缓的部分少采样。具体原理详见 :ref:`(Chen and Zhang, 2001) <chen_2001>` :ref:`(张海明, 2021) <zhang_book_2021>` 。
1311

1412

1513
参数介绍
@@ -21,13 +19,13 @@
2119

2220
.. group-tab:: C
2321

24-
:command:`grt` 和 :command:`stgrt` 程序支持以下可选参数来使用自适应Filon积分,具体说明详见 :command:`grt -h` 或 :command:`stgrt -h`。
22+
:command:`greenfn` 和 :command:`static_greenfn` 模块支持以下可选参数来使用自适应Filon积分,具体说明详见 :command:`grt greenfn -h` 或 :command:`grt static greenfn -h`。
2523

2624
+ ``-La<length>[/<Ftol>/<Fcut>]``
2725

28-
+ ``<length>`` 定义离散波数积分的积分间隔 (见 :ref:`k_integ_rst` 部分, :ref:`linear_filon` 部分)
26+
+ ``<length>`` 定义离散波数积分的积分间隔 (见 :doc:`/Advanced/k_integ` 部分, :doc:`/Advanced/filon/linear_filon` 部分)
2927
+ ``<Ftol>`` 定义自适应采样精度,见 :ref:`(Chen and Zhang, 2001) <chen_2001>` :ref:`(张海明, 2021) <zhang_book_2021>`,通常1e-2即可。
30-
+ ``<Fcut>`` 定义了两个积分的分割点, :math:`k^*=` ``<Fcut>`` :math:`/r_{\text{max}}` (见 :ref:`linear_filon` 部分)
28+
+ ``<Fcut>`` 定义了两个积分的分割点, :math:`k^*=` ``<Fcut>`` :math:`/r_{\text{max}}` (见 :doc:`/Advanced/filon/linear_filon` 部分)
3129

3230
.. group-tab:: Python
3331

docs/source/Advanced/integ_converg/integ_converg.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _integ_converg_rst:
2-
31
积分收敛性与峰谷平均法
42
===============================
53

@@ -8,7 +6,7 @@
86

97
-----------------------------------------------------------
108

11-
通过输出核函数文件,观察源点和场点深度接近时,积分收敛性的变化,以及峰谷平均法的作用。 **具体积分表达式以及分类详见** :ref:`gfunc_rst`。
9+
通过输出核函数文件,观察源点和场点深度接近时,积分收敛性的变化,以及峰谷平均法的作用。 **具体积分表达式以及分类详见** :doc:`/Tutorial/dynamic/gfunc`。
1210

1311
核函数文件
1412
---------------
@@ -41,7 +39,7 @@ C和Python导出的核函数文件是一致的,底层调用的是相同的函
4139

4240
.. group-tab:: C
4341

44-
:command:`grt.k2a` 程序可将单个核函数文件转为文本格式
42+
:command:`k2a` 模块可将单个核函数文件转为文本格式
4543

4644
.. literalinclude:: run/run.sh
4745
:language: bash
@@ -62,15 +60,15 @@ C和Python导出的核函数文件是一致的,底层调用的是相同的函
6260
:start-after: BEGIN read statsfile
6361
:end-before: END read statsfile
6462

65-
其中除了波数 ``k`` 外,每条结果的命名格式均为 ``{srcType}_{q/w/v}``,与 :ref:`gfunc_rst` 部分介绍的积分公式中的核函数 :math:`q_m, w_m, v_m` 保持一致。
63+
其中除了波数 ``k`` 外,每条结果的命名格式均为 ``{srcType}_{q/w/v}``,与 :doc:`/Tutorial/dynamic/gfunc` 部分介绍的积分公式中的核函数 :math:`q_m, w_m, v_m` 保持一致。
6664

6765
.. note::
6866

6967
核函数文件中记录的值非最终核函数值。对于动态解,还需乘 :math:`\left(-\dfrac{\Delta k}{4\pi\rho\omega^2}\right)`。
7068

7169
可视化
7270
-------------
73-
以下将使用Python进行图件绘制。 **在Python函数中指定震源类型、阶数、积分类型,可自动绘制核函数、被积函数和积分值随波数的变化**,其中积分类型对应 :ref:`gfunc_rst` 部分介绍的4种类型。
71+
以下将使用Python进行图件绘制。 **在Python函数中指定震源类型、阶数、积分类型,可自动绘制核函数、被积函数和积分值随波数的变化**,其中积分类型对应 :doc:`/Tutorial/dynamic/gfunc` 部分介绍的4种类型。
7472

7573
.. literalinclude:: run/run.py
7674
:language: python
@@ -145,7 +143,7 @@ C和Python导出的核函数文件是一致的,底层调用的是相同的函
145143

146144
.. note::
147145

148-
:command:`grt.k2a` 程序也支持将 ``PTAM_{ir}_{dist}/PTAM_{iw}_{freq}`` 文件转为文本格式,
146+
:command:`k2a` 模块也支持将 ``PTAM_{ir}_{dist}/PTAM_{iw}_{freq}`` 文件转为文本格式,
149147

150148
.. literalinclude:: run/run.sh
151149
:language: bash

docs/source/Advanced/k_integ.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _k_integ_rst:
2-
31
控制波数积分
42
===================
53

@@ -8,13 +6,13 @@
86

97
-----------------------------------------------------------
108

11-
:ref:`gfunc_rst` 部分介绍了程序将按以下形式从数值上计算波数积分,
9+
:doc:`/Tutorial/dynamic/gfunc` 部分介绍了程序将按以下形式从数值上计算波数积分,
1210

1311
.. math::
1412
1513
P_m(\omega) = \Delta k \sum_{j=0}^{\infty} F_m(k_j,\omega)J_m(k_j r)k_j
1614
17-
其中 :math:`\Delta k = 2\pi/L, k_j=j\Delta k`,:math:`L` 为特征长度,即 :math:`L` 控制波数积分的积分间隔,默认根据 :ref:`gfunc_rst` 部分介绍的约束条件自动确定。
15+
其中 :math:`\Delta k = 2\pi/L, k_j=j\Delta k`,:math:`L` 为特征长度,即 :math:`L` 控制波数积分的积分间隔,默认根据 :doc:`/Tutorial/dynamic/gfunc` 部分介绍的约束条件自动确定。
1816

1917
程序会取一个较大值 :math:`k_{\text{max}}` 作为波数积分的上限,经验公式为
2018

@@ -46,7 +44,7 @@
4644

4745
.. group-tab:: C
4846

49-
:command:`grt` 程序支持以下可选参数来控制波数积分,具体说明详见 :command:`grt -h`。
47+
:command:`greenfn` 模块支持以下可选参数来控制波数积分,具体说明详见 :command:`grt greenfn -h`。
5048

5149
+ ``-K<k0>[/<ampk>/<keps>]``
5250

@@ -58,7 +56,7 @@
5856

5957
+ ``-L<length>``, 对应公式中的 :math:`L` 的系数, :math:`L=` ``<length>`` :math:`\cdot r_{\text{max}}`
6058

61-
:command:`stgrt` 程序支持以下可选参数来控制波数积分,参数与上面对应,具体说明详见 :command:`stgrt -h`。
59+
:command:`static_greenfn` 模块支持以下可选参数来控制波数积分,参数与上面对应,具体说明详见 :command:`grt static greenfn -h`。
6260

6361
+ ``-K<k0>[/<keps>]``
6462
+ ``-L<length>``

docs/source/Advanced/kernel/kernel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
-----------------------------------------------------------
99

10-
:ref:`integ_converg_rst` 部分介绍了程序可以导出积分过程中不同频率的核函数值,这使得我们可以绘制核函数的 :math:`f-v` 谱图 [#]_ ,以观察其中的频散特征 。
10+
:doc:`/Advanced/integ_converg/integ_converg` 部分介绍了程序可以导出积分过程中不同频率的核函数值,这使得我们可以绘制核函数的 :math:`f-v` 谱图 [#]_ ,以观察其中的频散特征 。
1111

1212
以薄层模型为例,
1313

docs/source/Formula/static_source.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
9696
其中三个势函数均吸收了 :math:`k` 因子,即 :math:`\phi_m \leftarrow k\phi_m, \psi_m \leftarrow k\psi_m, \chi_m \leftarrow k\chi_m` ,这会体现在后续的震源系数中。
9797

98-
为了求解震源系数,需将 :ref:`static_uniform` 部分的最终表达式展开成 :eq:`u_qwv` 的形式,对应的垂直波函数的系数 :math:`(B_m, D_m, F_m)` 即为震源系数。具体而言,我们可将位移同一分量的不同表达式进行对比得到震源系数。将 :eq:`qwv_pot` 式代入 :eq:`u_qwv` 式,柱坐标系下的位移三分量表达式为
98+
为了求解震源系数,需将 :doc:`static_uniform` 部分的最终表达式展开成 :eq:`u_qwv` 的形式,对应的垂直波函数的系数 :math:`(B_m, D_m, F_m)` 即为震源系数。具体而言,我们可将位移同一分量的不同表达式进行对比得到震源系数。将 :eq:`qwv_pot` 式代入 :eq:`u_qwv` 式,柱坐标系下的位移三分量表达式为
9999

100100
.. math::
101101
:label:

docs/source/Formula/static_uniform.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _static_uniform:
2-
31
无限均匀介质中集中脉冲力产生的静态位移场
42
===========================================
53

docs/source/Tutorial/dynamic/gfunc.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _gfunc_rst:
2-
31
计算动态格林函数
42
=================
53

@@ -9,9 +7,9 @@
97
-----------------------------------------------------------
108

119

12-
Python中计算动态格林函数的主函数为 :func:`compute_grn() <pygrt.pymod.PyModel1D.compute_grn>` ,C程序为 :command:`grt`。
10+
Python中计算动态格林函数的主函数为 :func:`compute_grn() <pygrt.pymod.PyModel1D.compute_grn>` ,C模块为 :command:`greenfn`。
1311

14-
核心计算逻辑来自 :ref:`初稿 <yao_init_manuscripts>` ,具体代码可见与C API中对应同名 :file:`*.c` 文件,其中计算格林函数频谱的主函数为 :file:`grt.c` 里的 :c:func:`integ_grn_spec`。输出结果的坐标系见下图。
12+
核心计算逻辑来自 :ref:`初稿 <yao_init_manuscripts>` ,具体代码可见与C API中对应同名 :file:`*.c` 文件,其中计算格林函数频谱的主函数为 :file:`grn.c` 里的 :c:func:`integ_grn_spec`。输出结果的坐标系见下图。
1513

1614
.. image:: ../coord.svg
1715
:align: center
@@ -43,7 +41,7 @@ Python中计算动态格林函数的主函数为 :func:`compute_grn() <pygrt.pym
4341

4442
一些基本信息(包括源点和场点的物性参数)保存在SAC头段变量中,其中 :c:var:`t0` 和 :c:var:`t1` 分别代表初至P波和初至S波的到时。在不设定其它参数时,程序中使用0(发震时刻)作为参考时间,故其等价于走时。
4543

46-
+ :command:`grt.travt` 命令可以显式地再计算初至波走时
44+
+ :command:`travt` 模块可以显式地再计算初至波走时
4745

4846
.. literalinclude:: run/run.sh
4947
:language: bash
@@ -55,7 +53,7 @@ Python中计算动态格林函数的主函数为 :func:`compute_grn() <pygrt.pym
5553
.. literalinclude:: run/travt
5654
:language: text
5755

58-
+ 如果你没有安装SAC软件,可以使用Python的ObsPy库读取生成的SAC数据,或者使用 :command:`grt.b2a` 工具临时将SAC格式文件转为如下的文本文件
56+
+ 如果你没有安装SAC软件,可以使用Python的ObsPy库读取生成的SAC数据,或者使用 :command:`b2a` 模块临时将SAC格式文件转为如下的文本文件
5957

6058
.. literalinclude:: run/run.sh
6159
:language: bash

docs/source/Tutorial/dynamic/strain_stress.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _strain_stress_rst:
2-
31
计算动态应变、旋转、应力张量
42
=======================================
53

@@ -9,7 +7,7 @@
97
-----------------------------------------------------------
108

119

12-
计算这些张量需要计算位移的空间导数 :math:`\partial z,\partial r,\partial \theta` [#partial]_ 。 从前文关于格林函数的计算 ( :ref:`gfunc_rst` ) 和位移合成的公式 ( :ref:`syn_rst` ) 出发,位移空间导数分两个步骤计算,再根据几何方程和本构方程合成应变、旋转和应力张量。
10+
计算这些张量需要计算位移的空间导数 :math:`\partial z,\partial r,\partial \theta` [#partial]_ 。 从前文关于格林函数的计算 ( :doc:`/Tutorial/dynamic/gfunc` ) 和位移合成的公式 ( :doc:`/Tutorial/dynamic/syn` ) 出发,位移空间导数分两个步骤计算,再根据几何方程和本构方程合成应变、旋转和应力张量。
1311

1412
.. [#partial] :math:`\partial z,\partial r,\partial \theta` 为 :math:`\dfrac{\partial}{\partial z},\dfrac{\partial}{\partial r},\dfrac{\partial}{\partial \theta}` 的简写。
1513

0 commit comments

Comments
 (0)