Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObsPy: Add introduction and install instructions #54

Merged
merged 11 commits into from
Jan 1, 2021
2 changes: 1 addition & 1 deletion source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
:caption: 数据处理
:hidden:

obspy
obspy/index
sod/index

.. toctree::
Expand Down
18 changes: 0 additions & 18 deletions source/obspy.rst

This file was deleted.

29 changes: 29 additions & 0 deletions source/obspy/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ObsPy
=====

:软件名称: ObsPy
:主页: https://www.obspy.org/
:源码地址: https://github.com/obspy/obspy
:官方文档: https://docs.obspy.org/
:作者: `Tobias Megies et al. <https://github.com/obspy/obspy/graphs/contributors>`__
:最新版本: v1.2.2 (2020-06-30)
:适用平台: Linux、macOS、Windows
:编程语言: Python
:许可协议: LGPL

----

:教程贡献者: `姚家园 <https://github.com/core-man>`__ (作者)、`田冬冬 <https://me.seisman.info/>`__ (审稿)
:教程更新日期: 2021-01-01

----

.. note::

本教程仅在 Linux 和 macOS 平台下使用 v1.2.2 测试通过,其余版本或平台可能有所差异。

.. toctree::
:hidden:

introduction
install
32 changes: 32 additions & 0 deletions source/obspy/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
安装
====

我们强烈推荐使用 Anaconda 安装 ObsPy,这也是 ObsPy 的 `官方推荐 <https://github.com/obspy/obspy/wiki#installation>`__。
core-man marked this conversation as resolved.
Show resolved Hide resolved

1. :doc:`安装 Anaconda </anaconda/index>`

2. 创建、激活虚拟环境::

# 创建虚拟环境,这里命名为 seismo-learn
$ conda create -n seismo-learn
# 激活此虚拟环境
$ conda activate seismo-learn

3. 安装 ObsPy 预编译包::

$ conda install obspy --channel conda-forge

4. 安装地图绘制包 cartopy::

$ conda install cartopy

5. 检查安装是否成功::

终端键入 ``python`` 启动 Python 解释器,若能导入 obspy 模块则表示安装成功::

$ python
Python 3.8.6 | packaged by conda-forge | (default, Oct 7 2020, 19:08:05)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import obspy
>>>
core-man marked this conversation as resolved.
Show resolved Hide resolved
51 changes: 51 additions & 0 deletions source/obspy/introduction.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
简介
====

ObsPy 是地震学数据处理的 Python 软件包,极大促进了地震学应用程序的快速开发。
其可以用来读写多种地震学数据格式,下载地震目录、台站元数据和波形数据,以及处理和分析波形数据等,
满足了日常科研中与地震学数据相关的大部分需求。

特色功能
--------

我们在日常的地震学科研工作中,需要下载、处理和分析波形数据,然后提取出有效的观测物理量 (如震相到时、振幅),
用来反演震源和地下结构。下载、处理和分析波形数据的一般步骤如下:

1. 下载地震目录
2. 下载台站元数据,如台站位置和仪器响应
3. 下载波形数据
4. 波形数据格式转换
5. 匹配地震和台站元数据
6. 波形数据处理
7. 波形数据分析

其他地震学软件 (如 SOD、SAC) 往往只具有以上一个或几个功能,ObsPy 的特色在于:

1. 可以完成以上所有步骤
2. 可以使用丰富的 Python 软件包,如 numpy、scipy、matplotlib、pandas 等
3. 支持目前绝大多数地震学数据格式的读写
4. 生态良好,已有许多基于 ObsPy 开发的软件包

引用
----

如果使用 ObsPy (直接使用或作为其他程序包的依赖包) 开展研究工作并发表了学术文章,可以引用以下参考文献的任意一篇:

- Beyreuther, M., Barsch, R., Krischer, L., Megies, T., Behr, Y., & Wassermann, J. (2010).
ObsPy: A Python Toolbox for Seismology.
*Seismological Research Letters*, 81(3), 530–533.
https://doi.org/10.1785/gssrl.81.3.530

- Megies, T., Beyreuther, M., Barsch, R., Krischer, L., & Wassermann, J. (2011).
ObsPy – What can it do for data centers and observatories?
*Annals Of Geophysics*, 54(1), 47-58
https://doi.org/10.4401/ag-4838

- Krischer, L., Megies, T., Barsch, R., Beyreuther, M., Lecocq, T., Caudron, C., & Wassermann, J. (2015).
ObsPy: a bridge for seismology into the scientific Python ecosystem.
*Computational Science & Discovery*, 8(1), 014003.
https://doi.org/10.1088/1749-4699/8/1/014003

此外,也可引用实际使用的 ObsPy 版本,
如 ObsPy 1.2.2 (`10.5281/zenodo.3921997 <http://dx.doi.org/10.5281/zenodo.3921997>`__)。
其他版本可查看 `已发布的 ObsPy 版本 <https://zenodo.org/search?ln=en&p=obspy&sort=mostrecent>`__。