Skip to content

Commit 3d182f4

Browse files
authored
DOC: add modules manual (#105)
1 parent 2a9e299 commit 3d182f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1826
-230
lines changed

docs/compile.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,21 @@ make
88
cd -
99

1010
# 添加到环境变量
11-
export PATH=`realpath ../pygrt/C_extension/bin`:$PATH
11+
# cp ../pygrt/C_extension/bin/* /usr/local/bin/
12+
# export PATH=$(realpath ../pygrt/C_extension/bin):$PATH
13+
# echo "export PATH=$(realpath ../pygrt/C_extension/bin):$PATH" >> ~/.bashrc
14+
cp ../pygrt/C_extension/bin/* ${READTHEDOCS_VIRTUALENV_PATH}/bin/
15+
echo "-------------------------"
16+
echo $PATH
17+
# echo "-------------------------"
18+
# echo $(ls /usr/local/bin/* -l)
19+
echo "-------------------------"
20+
echo ${READTHEDOCS_VIRTUALENV_PATH}
21+
echo ${READTHEDOCS_REPOSITORY_PATH}
22+
# if [[ $(which grt) == "" ]]; then
23+
# echo "export PATH=$(realpath ../pygrt/C_extension/bin):\$PATH" >> ~/.bashrc
24+
# source ~/.bashrc
25+
# fi
1226
grt -h
1327
# 使用PyGRT运行文档需要的示例结果
1428
cd source && chmod +x *.sh && ./run_all.sh && cd -
@@ -26,4 +40,4 @@ doxygen doxyfile_h
2640
if [[ $1 == '1' ]]; then
2741
make html
2842
fi
29-
# sphinx-autobuild --port 8000 source build
43+
# sphinx-autobuild -j auto --port 8000 source build

docs/locales/en/LC_MESSAGES/Advanced/filon/linear_filon.po

Lines changed: 29 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PyGRT 0.6.1.dev17+g4521452.d20250424\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-08-05 13:28+0800\n"
11+
"POT-Creation-Date: 2025-09-22 02:12+0800\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language: en\n"
@@ -46,8 +46,8 @@ msgid ""
4646
msgstr ""
4747
"Use the fixed-interval Filon integration method with caution unless you "
4848
"fully understand its principles and sources of error. It is recommended "
49-
"to use :doc:`/Advanced/filon/self_adaptive_filon` to reduce the impact of fixed "
50-
"integration intervals."
49+
"to use :doc:`/Advanced/filon/self_adaptive_filon` to reduce the impact of"
50+
" fixed integration intervals."
5151

5252
#: ../../source/Advanced/filon/linear_filon.rst:14
5353
msgid ""
@@ -84,9 +84,9 @@ msgid ""
8484
"部分),积分第二部分将Bessel函数取渐近表达式,可将其转为以下形式"
8585
msgstr ""
8686
"The first part of the integral still uses discrete wavenumber integration"
87-
" to solve (see :doc:`/Advanced/k_integ` section), and the second part of the "
88-
"integral takes the asymptotic expression of the Bessel function, which "
89-
"can be transformed into the following form."
87+
" to solve (see :doc:`/Advanced/k_integ` section), and the second part of "
88+
"the integral takes the asymptotic expression of the Bessel function, "
89+
"which can be transformed into the following form."
9090

9191
#: ../../source/Advanced/filon/linear_filon.rst:30
9292
msgid ""
@@ -163,42 +163,16 @@ msgid "C"
163163
msgstr ""
164164

165165
#: ../../source/Advanced/filon/linear_filon.rst:63
166-
msgid ""
167-
":command:`greenfn` 和 :command:`static_greenfn` "
168-
"模块支持以下可选参数来使用Filon积分,具体说明详见 :command:`grt greenfn -h` 或 :command:`grt "
169-
"static greenfn -h`。"
166+
msgid "详见 :doc:`/Module/greenfn` 和 :doc:`/Module/static_greenfn` 模块的 **-L** 选项。"
170167
msgstr ""
171-
"The :command:`greenfn` and :command:`static_greenfn` modules support the following "
172-
"optional parameters to use Filon's integration. For detailed "
173-
"explanations, see :command:`grt greenfn -h` or :command:`grt static greenfn -h`."
168+
"Refer to the option **-L** in :doc:`/Module/greenfn` and "
169+
":doc:`/Module/static_greenfn` modules. "
174170

175171
#: ../../source/Advanced/filon/linear_filon.rst:65
176-
msgid "``-L<length>[/<Flength>/<Fcut>]``"
177-
msgstr ""
178-
179-
#: ../../source/Advanced/filon/linear_filon.rst:67
180-
msgid "``<length>`` 定义离散波数积分的积分间隔 (见 :doc:`/Advanced/k_integ` 部分)"
181-
msgstr ""
182-
"``<length>`` defines the integration interval for discrete wavenumber "
183-
"integration (see :doc:`/Advanced/k_integ` section)."
184-
185-
#: ../../source/Advanced/filon/linear_filon.rst:68
186-
msgid "``<Flength>`` 定义Filon积分间隔,公式和离散波数积分使用的一致。"
187-
msgstr ""
188-
"``<Flength>`` defines the Filon's integration interval, consistent with "
189-
"the formula used for discrete wavenumber integration."
190-
191-
#: ../../source/Advanced/filon/linear_filon.rst:69
192-
msgid "``<Fcut>`` 定义了两个积分的分割点, :math:`k^*=` ``<Fcut>`` :math:`/r_{\\text{max}}`"
193-
msgstr ""
194-
"``<Fcut>`` defines the division point of the two integrals, :math:`k^*=` "
195-
"``<Fcut>`` :math:`/r_{\\text{max}}`."
196-
197-
#: ../../source/Advanced/filon/linear_filon.rst:71
198172
msgid "Python"
199173
msgstr ""
200174

201-
#: ../../source/Advanced/filon/linear_filon.rst:73
175+
#: ../../source/Advanced/filon/linear_filon.rst:67
202176
msgid ""
203177
":func:`compute_grn() <pygrt.pymod.PyModel1D.compute_grn>` 函数和 "
204178
":func:`compute_static_grn() <pygrt.pymod.PyModel1D.compute_static_grn>` "
@@ -210,15 +184,27 @@ msgstr ""
210184
"following optional parameters to use Filon's integration. For detailed "
211185
"explanations, see the API."
212186

213-
#: ../../source/Advanced/filon/linear_filon.rst:75
214-
msgid "``filonLength:float`` 对应C选项卡中的 ``<Flength>`` 参数"
215-
msgstr "``filonLength:List`` corresponding to the ``<Flength>`` in the C tab."
187+
#: ../../source/Advanced/filon/linear_filon.rst:69
188+
msgid "``Length:float`` 定义离散波数积分的积分间隔 (见 :doc:`/Advanced/k_integ` 部分)"
189+
msgstr ""
190+
"``Length:float`` defines the integration interval for discrete wavenumber "
191+
"integration (see :doc:`/Advanced/k_integ` section)."
216192

217-
#: ../../source/Advanced/filon/linear_filon.rst:76
218-
msgid "``filonCut:float`` 对应C选项卡中的 ``<Fcut>`` 参数"
219-
msgstr "``filonCut:float`` corresponding to the ``<Fcut>`` in the C tab."
193+
#: ../../source/Advanced/filon/linear_filon.rst:70
194+
msgid "``filonLength:float`` 定义Filon积分间隔,公式和离散波数积分使用的一致。"
195+
msgstr ""
196+
"``filonLength:float`` defines the Filon's integration interval, consistent with "
197+
"the formula used for discrete wavenumber integration."
198+
199+
#: ../../source/Advanced/filon/linear_filon.rst:71
200+
msgid ""
201+
"``filonCut:float`` 定义了两个积分的分割点, :math:`k^*=` ``<filonCut>`` "
202+
":math:`/r_{\\text{max}}`"
203+
msgstr ""
204+
"``filonCut:float`` defines the division point of the two integrals, :math:`k^*=` "
205+
"``<filonCut>`` :math:`/r_{\\text{max}}`."
220206

221-
#: ../../source/Advanced/filon/linear_filon.rst:80
207+
#: ../../source/Advanced/filon/linear_filon.rst:75
222208
msgid ""
223209
"在程序中,固定间隔的Filon积分不计算近场项,即 :doc:`/Tutorial/dynamic/gfunc` 中介绍的 :math:`p=1`"
224210
" 对应的积分项。"

docs/locales/en/LC_MESSAGES/Advanced/filon/self_adaptive_filon.po

Lines changed: 44 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PyGRT 0.7.1.dev29+g6f42373.d20250505\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-08-05 13:28+0800\n"
11+
"POT-Creation-Date: 2025-09-22 02:12+0800\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language: en\n"
@@ -46,14 +46,14 @@ msgid ""
4646
"**动态分段**,在核函数变化剧烈的部分多采样,在核函数变化平缓的部分少采样。具体原理详见 :ref:`(Chen and Zhang, "
4747
"2001) <chen_2001>` :ref:`(张海明, 2021) <zhang_book_2021>` 。"
4848
msgstr ""
49-
"In the :doc:`/Advanced/filon/linear_filon` section, the process and core principles of "
50-
"Filon's integration are briefly introduced, namely **piecewise analytical"
51-
" solutions of the integral**. The following introduces the **Self-"
52-
"Adaptive Filon's Integration Method (SAFIM)**, which is **dynamic "
53-
"segmentation**, sampling more in regions where the kernel function "
54-
"changes drastically and less in regions where it changes smoothly. For "
55-
"detailed principles, see :ref:`(Chen and Zhang, 2001) <chen_2001>` "
56-
":ref:`(Zhang Haiming, 2021) <zhang_book_2021>`."
49+
"In the :doc:`/Advanced/filon/linear_filon` section, the process and core "
50+
"principles of Filon's integration are briefly introduced, namely "
51+
"**piecewise analytical solutions of the integral**. The following "
52+
"introduces the **Self-Adaptive Filon's Integration Method (SAFIM)**, "
53+
"which is **dynamic segmentation**, sampling more in regions where the "
54+
"kernel function changes drastically and less in regions where it changes "
55+
"smoothly. For detailed principles, see :ref:`(Chen and Zhang, 2001) "
56+
"<chen_2001>` :ref:`(Zhang Haiming, 2021) <zhang_book_2021>`."
5757

5858
#: ../../source/Advanced/filon/self_adaptive_filon.rst:14
5959
msgid "参数介绍"
@@ -64,88 +64,73 @@ msgid "通过以下可选参数,可使用自适应Filon积分。"
6464
msgstr "SAFIM can be used through the following optional parameters."
6565

6666
#: ../../source/Advanced/filon/self_adaptive_filon.rst:20
67-
#: ../../source/Advanced/filon/self_adaptive_filon.rst:43
67+
#: ../../source/Advanced/filon/self_adaptive_filon.rst:38
6868
msgid "C"
6969
msgstr ""
7070

7171
#: ../../source/Advanced/filon/self_adaptive_filon.rst:22
72-
msgid ""
73-
":command:`greenfn` 和 :command:`static_greenfn` "
74-
"模块支持以下可选参数来使用自适应Filon积分,具体说明详见 :command:`grt greenfn -h` 或 :command:`grt "
75-
"static greenfn -h`。"
72+
msgid "详见 :doc:`/Module/greenfn` 和 :doc:`/Module/static_greenfn` 模块的 **-L** 选项。"
7673
msgstr ""
77-
"The :command:`greenfn` and :command:`static_greenfn` modules support the following "
78-
"optional parameters to use SAFIM. For detailed explanations, see "
79-
":command:`grt greenfn -h` or :command:`grt static greenfn -h`."
74+
"Refer to the option **-L** in :doc:`/Module/greenfn` and "
75+
":doc:`/Module/static_greenfn` modules. "
8076

8177
#: ../../source/Advanced/filon/self_adaptive_filon.rst:24
82-
msgid "``-La<length>[/<Ftol>/<Fcut>]``"
78+
#: ../../source/Advanced/filon/self_adaptive_filon.rst:45
79+
msgid "Python"
8380
msgstr ""
8481

8582
#: ../../source/Advanced/filon/self_adaptive_filon.rst:26
8683
msgid ""
87-
"``<length>`` 定义离散波数积分的积分间隔 (见 :doc:`/Advanced/k_integ` 部分, "
88-
":doc:`/Advanced/filon/linear_filon` 部分)"
84+
":func:`compute_grn() <pygrt.pymod.PyModel1D.compute_grn>` 函数和 "
85+
":func:`compute_static_grn() <pygrt.pymod.PyModel1D.compute_static_grn>` "
86+
"函数支持以下可选参数来使用自适应Filon积分,具体说明详见API。"
8987
msgstr ""
90-
"``<length>`` defines the integration interval for discrete wavenumber "
91-
"integration (see :doc:`/Advanced/k_integ` section, :doc:`/Advanced/filon/linear_filon` "
92-
"section)."
88+
"The :func:`compute_grn() <pygrt.pymod.PyModel1D.compute_grn>` function "
89+
"and :func:`compute_static_grn() "
90+
"<pygrt.pymod.PyModel1D.compute_static_grn>` function support the "
91+
"following optional parameters to use SAFIM. For detailed explanations, "
92+
"see the API."
9393

94-
#: ../../source/Advanced/filon/self_adaptive_filon.rst:27
94+
#: ../../source/Advanced/filon/self_adaptive_filon.rst:28
9595
msgid ""
96-
"``<Ftol>`` 定义自适应采样精度,见 :ref:`(Chen and Zhang, 2001) <chen_2001>` "
97-
":ref:`(张海明, 2021) <zhang_book_2021>`,通常1e-2即可。"
96+
"``Length:float`` 定义离散波数积分的积分间隔 (见 :doc:`/Advanced/k_integ` 部分, "
97+
":doc:`/Advanced/filon/linear_filon` 部分)"
9898
msgstr ""
99-
"``<Ftol>`` defines the precision of self-adaptive sampling, see "
100-
":ref:`(Chen and Zhang, 2001) <chen_2001>` :ref:`(张海明, 2021) "
101-
"<zhang_book_2021>`. In general set 1e-2."
99+
"``Length:float`` defines the integration interval for discrete wavenumber "
100+
"integration (see :doc:`/Advanced/k_integ` section, "
101+
":doc:`/Advanced/filon/linear_filon` section)."
102102

103-
#: ../../source/Advanced/filon/self_adaptive_filon.rst:28
103+
#: ../../source/Advanced/filon/self_adaptive_filon.rst:29
104104
msgid ""
105-
"``<Fcut>`` 定义了两个积分的分割点, :math:`k^*=` ``<Fcut>`` :math:`/r_{\\text{max}}` "
106-
"(见 :doc:`/Advanced/filon/linear_filon` 部分)"
105+
"``safilonTol:float`` 定义自适应采样精度,见 :ref:`(Chen and Zhang, 2001) "
106+
"<chen_2001>` :ref:`(张海明, 2021) <zhang_book_2021>`,通常1e-2即可。"
107107
msgstr ""
108-
"``<Fcut>`` defines the division point of the two integrals, :math:`k^*=` "
109-
"``<Fcut>`` :math:`/r_{\\text{max}}` (see :doc:`/Advanced/filon/linear_filon` section)."
108+
"``safilonTol:float`` defines the precision of self-adaptive sampling, see "
109+
":ref:`(Chen and Zhang, 2001) <chen_2001>` :ref:`(张海明, 2021) "
110+
"<zhang_book_2021>`. In general set 1e-2."
110111

111112
#: ../../source/Advanced/filon/self_adaptive_filon.rst:30
112-
#: ../../source/Advanced/filon/self_adaptive_filon.rst:50
113-
msgid "Python"
114-
msgstr ""
115-
116-
#: ../../source/Advanced/filon/self_adaptive_filon.rst:32
117113
msgid ""
118-
":func:`compute_grn() <pygrt.pymod.PyModel1D.compute_grn>` 函数和 "
119-
":func:`compute_static_grn() <pygrt.pymod.PyModel1D.compute_static_grn>` "
120-
"函数支持以下可选参数来使用自适应Filon积分,具体说明详见API。"
114+
"``filonCut:float`` 定义了两个积分的分割点, :math:`k^*=` ``<filonCut>`` "
115+
":math:`/r_{\\text{max}}` (见 :doc:`/Advanced/filon/linear_filon` 部分)"
121116
msgstr ""
122-
"The :func:`compute_grn() <pygrt.pymod.PyModel1D.compute_grn>` function "
123-
"and :func:`compute_static_grn() "
124-
"<pygrt.pymod.PyModel1D.compute_static_grn>` function support the "
125-
"following optional parameters to use SAFIM. For detailed explanations, "
126-
"see the API."
117+
"``filonCut:float`` defines the division point of the two integrals, :math:`k^*=` "
118+
"``<filonCut>`` :math:`/r_{\\text{max}}` (see "
119+
":doc:`/Advanced/filon/linear_filon` section)."
127120

128121
#: ../../source/Advanced/filon/self_adaptive_filon.rst:34
129-
msgid "``safilonTol:float`` 对应C选项卡中的 ``<Ftol>`` 参数"
130-
msgstr "``safilonTol:List`` corresponding to the ``<Ftol>`` in the C tab."
131-
132-
#: ../../source/Advanced/filon/self_adaptive_filon.rst:35
133-
msgid "``filonCut:float`` 对应C选项卡中的 ``<Fcut>`` 参数"
134-
msgstr "``filonCut:float`` corresponding to the ``<Fcut>`` in the C tab."
135-
136-
#: ../../source/Advanced/filon/self_adaptive_filon.rst:39
137122
msgid "示例程序"
138123
msgstr "Simple run"
139124

140-
#: ../../source/Advanced/filon/self_adaptive_filon.rst:45
125+
#: ../../source/Advanced/filon/self_adaptive_filon.rst:40
141126
msgid "使用 ``-S`` 导出核函数文件,"
142127
msgstr "use ``-S`` to export kernel function files."
143128

144-
#: ../../source/Advanced/filon/self_adaptive_filon.rst:56
129+
#: ../../source/Advanced/filon/self_adaptive_filon.rst:51
145130
msgid "使用以下Python脚本绘制核函数采样点,"
146131
msgstr "Use the following Python script to plot the kernel sample points,"
147132

148-
#: ../../source/Advanced/filon/self_adaptive_filon.rst:66
133+
#: ../../source/Advanced/filon/self_adaptive_filon.rst:61
149134
msgid ""
150135
"从对比图可以清晰地看出,自适应采样用更少的点数勾勒核函数的主要特征,这显著提高了计算效率。尽管自适应过程增加了额外的计算量,在小震中距范围内计算优势不明显,"
151136
" **但随着震中距的增加,自适应Filon积分的优势将愈发显著。**"
@@ -157,7 +142,7 @@ msgstr ""
157142
" small epicentral distance range, **but as the epicentral distance "
158143
"increases, the advantage of SAFIM becomes increasingly significant.**"
159144

160-
#: ../../source/Advanced/filon/self_adaptive_filon.rst:70
145+
#: ../../source/Advanced/filon/self_adaptive_filon.rst:65
161146
msgid ""
162147
"在程序中,自适应Filon积分不计算近场项,即 :doc:`/Tutorial/dynamic/gfunc` 中介绍的 :math:`p=1` "
163148
"对应的积分项。"

docs/locales/en/LC_MESSAGES/Advanced/integ_converg/integ_converg.po

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PyGRT 0.6.1.dev1+g4641a40.d20250422\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-09-20 11:57+0800\n"
11+
"POT-Creation-Date: 2025-09-22 02:12+0800\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language: en\n"
@@ -20,8 +20,8 @@ msgstr ""
2020
"Generated-By: Babel 2.16.0\n"
2121

2222
#: ../../source/Advanced/integ_converg/integ_converg.rst:2
23-
msgid "积分收敛性与峰谷平均法"
24-
msgstr "Convergency of Integral and Peak-Trough Averaging Method"
23+
msgid "积分收敛性"
24+
msgstr "Convergency of Integral"
2525

2626
#: ../../source/Advanced/integ_converg/integ_converg.rst
2727
msgid "Author"
@@ -101,8 +101,8 @@ msgstr ""
101101
#: ../../source/Advanced/integ_converg/integ_converg.rst:42
102102
msgid ":command:`ker2asc` 模块可将单个核函数文件转为文本格式。"
103103
msgstr ""
104-
"The :command:`ker2asc` module can convert a single kernel function file into "
105-
"text format."
104+
"The :command:`ker2asc` module can convert a single kernel function file "
105+
"into text format."
106106

107107
#: ../../source/Advanced/integ_converg/integ_converg.rst:49
108108
#: ../../source/Advanced/integ_converg/integ_converg.rst:153

0 commit comments

Comments
 (0)