├── .github └── workflows │ └── build.yml ├── .gitignore ├── Makefile ├── README.md ├── requirements.txt └── source ├── computer ├── LinuxmacOS-basis.rst ├── command-lines.rst ├── file-manage.rst ├── index.rst └── operating-systems.rst ├── conf.py ├── data-analysis ├── index.rst ├── phase-picking │ └── index.rst └── plot │ ├── index.rst │ └── seis.SAC ├── data-fetch ├── HinetPy │ └── index.rst ├── ObsPy │ └── index.rst ├── SOD │ └── index.rst ├── data-centers.rst ├── fetch-tools.rst └── index.rst ├── data-process └── index.rst ├── download ├── exercises │ ├── bash-solution.tar │ ├── python-solution.tar │ ├── seismic-source-solution.tar │ └── seismic-wave-solution.tar └── lectures │ ├── 20201207-command-lines.tar │ ├── 20201207-programming.pptx │ ├── 20201207-programming.tar │ ├── 20201207-seismology-file-management.pptx │ ├── 20201214-seismic-data.pptx │ ├── 20201214-seismic-data.tar │ └── 20201221-tomography.pdf ├── exercises ├── data-analysis │ └── index.rst ├── data-fetch │ └── index.rst ├── data-process │ └── index.rst ├── programming │ └── index.rst └── seismology │ ├── index.rst │ ├── seismic-source.rst │ └── seismic-wave.rst ├── index.rst ├── programming ├── compiled-languages.rst ├── index.rst └── scripting-languages.rst ├── seismology ├── index.rst ├── intro │ ├── global-eqs-station.png │ ├── global-waves.png │ ├── index.rst │ └── seismic-key-obs.png ├── seismic-data │ ├── 12Z.png │ ├── NEZ.png │ ├── RTZ.png │ ├── coordinate-systems.rst │ ├── index.rst │ ├── rotate-SAC_Docs_zh.png │ └── seismic-time-series-data.rst ├── seismic-source │ ├── earthquake-catalogs.rst │ ├── index.rst │ └── intro.rst ├── seismic-station │ ├── az-baz.png │ ├── how-station-work.png │ ├── incidence.png │ ├── index.rst │ └── seismograph-illustration.png ├── seismic-wave │ ├── Fig1.1-3-An-Introduction-to-Seismology-Earthquakes-and-Earth-Structure.png │ ├── Fig1.1-Introduction-to-seismology.png │ ├── Fig2.4-3-An-Introduction-to-Seismology-Earthquakes-and-Earth-Structure.png │ ├── Fig4.14-Introduction-to-seismology.png │ ├── crustal-phases.png │ ├── index.rst │ ├── intro.rst │ └── seismic-phases.rst └── seismological-tools │ ├── GMT.rst │ ├── ObsPy.rst │ ├── SAC.rst │ ├── SOD.rst │ ├── TauP.rst │ └── index.rst ├── tomo-theory └── index.rst └── tomo-workflow └── index.rst /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Workflow to build the website and deploy to gh-pages 3 | # 4 | name: build 5 | 6 | on: 7 | push: 8 | branches: 9 | - main 10 | pull_request: 11 | branches: 12 | - main 13 | 14 | jobs: 15 | deploy: 16 | runs-on: ubuntu-latest 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v2 20 | with: 21 | fetch-depth: 0 # Fetch all history so that Hugo .GitInfo and .Lastmod work 22 | 23 | - name: Set up Python 24 | uses: actions/setup-python@v2 25 | with: 26 | python-version: '3.8' 27 | 28 | - name: Set up conda 29 | uses: s-weigand/setup-conda@v1 30 | with: 31 | activate-conda: false 32 | - run: | 33 | conda --version 34 | which python 35 | 36 | - name: Install dependencies 37 | run: | 38 | python -m pip install --upgrade pip 39 | pip install -r requirements.txt 40 | conda install gmt -c conda-forge 41 | gmt --version 42 | sudo git clone --branch release --depth 1 'https://github.com/adobe-fonts/source-code-pro.git' /usr/share/fonts/opentype 43 | fc-cache -f -v 44 | 45 | # - name: Install GMT 46 | # run: | 47 | # conda install gmt -c conda-forge 48 | # gmt --version 49 | 50 | - name: Build sphinx document 51 | run: | 52 | make html 53 | 54 | - name: Deploy 55 | uses: peaceiris/actions-gh-pages@v3 56 | with: 57 | github_token: ${{ secrets.GITHUB_TOKEN }} 58 | publish_dir: ./build/html 59 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | build 3 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 21 | 22 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 23 | 24 | help: 25 | @echo "Please use \`make ' where is one of" 26 | @echo " html to make standalone HTML files" 27 | @echo " dirhtml to make HTML files named index.html in directories" 28 | @echo " singlehtml to make a single large HTML file" 29 | @echo " pickle to make pickle files" 30 | @echo " json to make JSON files" 31 | @echo " htmlhelp to make HTML files and a HTML help project" 32 | @echo " qthelp to make HTML files and a qthelp project" 33 | @echo " devhelp to make HTML files and a Devhelp project" 34 | @echo " epub to make an epub" 35 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 36 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 37 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 38 | @echo " text to make text files" 39 | @echo " man to make manual pages" 40 | @echo " texinfo to make Texinfo files" 41 | @echo " info to make Texinfo files and run them through makeinfo" 42 | @echo " gettext to make PO message catalogs" 43 | @echo " changes to make an overview of all changed/added/deprecated items" 44 | @echo " xml to make Docutils-native XML files" 45 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 46 | @echo " linkcheck to check all external links for integrity" 47 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 48 | 49 | clean: 50 | rm -rf $(BUILDDIR)/* 51 | 52 | html: 53 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 54 | @echo 55 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 56 | 57 | dirhtml: 58 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 59 | @echo 60 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 61 | 62 | singlehtml: 63 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 64 | @echo 65 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 66 | 67 | pickle: 68 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 69 | @echo 70 | @echo "Build finished; now you can process the pickle files." 71 | 72 | json: 73 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 74 | @echo 75 | @echo "Build finished; now you can process the JSON files." 76 | 77 | htmlhelp: 78 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 79 | @echo 80 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 81 | ".hhp project file in $(BUILDDIR)/htmlhelp." 82 | 83 | qthelp: 84 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 85 | @echo 86 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 87 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 88 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/SeisTomo_Tutorials.qhcp" 89 | @echo "To view the help file:" 90 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/SeisTomo_Tutorials.qhc" 91 | 92 | devhelp: 93 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 94 | @echo 95 | @echo "Build finished." 96 | @echo "To view the help file:" 97 | @echo "# mkdir -p $$HOME/.local/share/devhelp/SeisTomo_Tutorials" 98 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/SeisTomo_Tutorials" 99 | @echo "# devhelp" 100 | 101 | epub: 102 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 103 | @echo 104 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 105 | 106 | latex: 107 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 108 | @echo 109 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 110 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 111 | "(use \`make latexpdf' here to do that automatically)." 112 | 113 | latexpdf: 114 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 115 | @echo "Running LaTeX files through pdflatex..." 116 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 117 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 118 | 119 | latexpdfja: 120 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 121 | @echo "Running LaTeX files through platex and dvipdfmx..." 122 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 123 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 124 | 125 | text: 126 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 127 | @echo 128 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 129 | 130 | man: 131 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 132 | @echo 133 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 134 | 135 | texinfo: 136 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 137 | @echo 138 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 139 | @echo "Run \`make' in that directory to run these through makeinfo" \ 140 | "(use \`make info' here to do that automatically)." 141 | 142 | info: 143 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 144 | @echo "Running Texinfo files through makeinfo..." 145 | make -C $(BUILDDIR)/texinfo info 146 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 147 | 148 | gettext: 149 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 150 | @echo 151 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 152 | 153 | changes: 154 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 155 | @echo 156 | @echo "The overview file is in $(BUILDDIR)/changes." 157 | 158 | linkcheck: 159 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 160 | @echo 161 | @echo "Link check complete; look for any errors in the above output " \ 162 | "or in $(BUILDDIR)/linkcheck/output.txt." 163 | 164 | doctest: 165 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 166 | @echo "Testing of doctests in the sources finished, look at the " \ 167 | "results in $(BUILDDIR)/doctest/output.txt." 168 | 169 | xml: 170 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 171 | @echo 172 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 173 | 174 | pseudoxml: 175 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 176 | @echo 177 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 178 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Seismic Body-wave Traveltime Tomography Tutorials 2 | 3 | **From 2021/07/03, the tutorials are maintained on [Seismology101](https://seismo-learn.org/seismology101/), 4 | which are tutorials for absolute beginners in Seismology in Chinese.** 5 | 6 | **From 2021/07/03, the tutorials on this website are not maintained any more.** 7 | 8 | ---- 9 | 10 | This repository contain tutorials for seismic body-wave traveltime tomography. 11 | 12 | ## Contributors 13 | 14 | - [core-man](https://github.com/core-man) 15 | - [HouseJaay](https://github.com/HouseJaay) 16 | - [Tianjueli](https://github.com/tianjueli) 17 | - [Shucheng-Wu](https://github.com/Shucheng-Wu) 18 | 19 | Huge thanks to [seisman](https://github.com/seisman) for some suggestions and instructions. 20 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx 2 | sphinx_rtd_theme 3 | sphinx-gmt==0.1.1 4 | -------------------------------------------------------------------------------- /source/computer/LinuxmacOS-basis.rst: -------------------------------------------------------------------------------- 1 | Linux/macOS Basis 2 | ================= 3 | 4 | Resources 5 | --------- 6 | 7 | You may refer to one of those resources to learn more about Linux. 8 | 9 | - `UNIX Tutorial for Beginners `__: One of the most popular online tutorials by electronic engineers 10 | - `Introduction to Unix `__: by Andrew Newman (a geophysics professor at Georgia Tech) 11 | - `Introduction to Computing `__: by Peter Shearere (a geophysics professor at USCD) 12 | - `Basics of Linux and the vim editor `_: by Dr. Allen McNamara (a geophysics professor at MSU EES) 13 | - `The Missing Semester of Your CS Education `__: `中文版 `__ 14 | - `The Linux Command Line `__: `中文版 `__ (Github翻译项目) | `中文版 `__ (看云) 15 | - `Linux 101 `__: by USTC LUG (**recommended**) 16 | - `Linux学习笔记 `__: by 华为工程师 (提取码 7v19) 17 | - 鸟哥的 Linux 私房菜 (CentOS): `基础学习篇 第三版 `__ | `基础学习篇 第四版 `__ 18 | 19 | 20 | Checklist 21 | --------- 22 | 23 | Below is a checklist of what you should know about Linux/macOS and command lines: 24 | 25 | 1. Familiar with the file system, and especially the **HOME** directory 26 | 2. Commands for files and directories: ``cd``, ``ls``, ``pwd``, ``mkdir``, ``rmdir``, ``cp``, ``rm``, ``mv`` 27 | 3. Commands for files: ``cat``, ``touch``, ``head``, ``tail``, ``which`` 28 | 4. Meaning of file permissions ``rwx`` and ``chmod`` command 29 | 5. Absolute paths and relative paths 30 | 6. The environment variable ``PATH`` 31 | 7. Understand what's purpose of file ``~/.bashrc`` 32 | 8. How to use input/output redirection ``>``, ``>>``, ``<<`` 33 | 9. How to use PIPE ``|`` 34 | 10. How to use wildcards ``?``, ``*``, ``[]`` to match mutiple files or directories 35 | 11. How to compress and uncompress files using ``tar``, ``gzip``, ``bzip2`` 36 | 12. Command for data processing ``awk``, ``cut``, ``grep``, ``wc``, ``sort``, ``uniq`` 37 | 13. What is a Shell (bash/csh) script? https://www.tutorialspoint.com/unix/unix-what-is-shell.htm 38 | 14. Learn the vim editor, which is the only text editor available on Linux servers. 39 | 40 | -------------------------------------------------------------------------------- /source/computer/command-lines.rst: -------------------------------------------------------------------------------- 1 | Command Lines 2 | ============= 3 | 4 | Seismologists usually use command lines (CLI) rather than Graphic User Interface (GUI) to navigate around different folders/directories, run programs, process data and almost everything you can imagine, because using CLI is usually much efficient than using GUI. 5 | 6 | 7 | Resources 8 | --------- 9 | 10 | - `Commonly-used Unix commands `__ 11 | - `Linux 命令手册 `__ 12 | - `Linux 命令大全 `__ 13 | - `Linux 命令大全 `__ 14 | 15 | 16 | Commands for files and directories 17 | ---------------------------------- 18 | 19 | 20 | pwd 21 | +++ 22 | `pwd `__ is a command to find out the path of the current working directory (folder) you’re in. The command will return an absolute (full) path. 23 | 24 | .. code-block:: console 25 | 26 | # show the absolute (full) path where you are 27 | $ pwd 28 | /Users/litianjue/Documents/EOS/help/Tutorial/Example 29 | 30 | 31 | cd 32 | ++ 33 | `cd `__ is a command to navigate through the Linux files and directories. It requires either the full path or the name of the directory, depending on the current working directory that you’re in. 34 | 35 | .. code-block:: console 36 | 37 | $ cd /Users/litianjue/Documents/EOS/help/Tutorial/Example # Your destination folder. 38 | $ pwd 39 | /Users/litianjue/Documents/EOS/Help/Tutorial/Example 40 | 41 | 42 | ls 43 | ++ 44 | `ls `__ is a command to view the contents of a directory. By default, this command will display the contents of your current working directory. 45 | 46 | .. code-block:: console 47 | 48 | # show the contents under the current folder 49 | $ ls 50 | TauP-2.4.5.tar Time.temp1 Time.temp2 events-selected.dat 51 | 52 | 53 | mkdir 54 | +++++ 55 | `mkdir `__ is a command allowing the user to create directories (also referred to as folders in some operating systems). 56 | 57 | .. code-block:: console 58 | 59 | $ mkdir temp 60 | $ ls 61 | TauP-2.4.5.tar Time.temp1 Time.temp2 events-selected.dat temp 62 | 63 | 64 | cp 65 | +++ 66 | `cp `__ is a command standing for copy. It is used to copy files (as default) or group of files or directory (with ``-R``). 67 | 68 | .. code-block:: console 69 | 70 | $ mkdir temp2 71 | $ cp events-selected.dat temp/events # copy file events-selected.dat into folder temp renamed as events 72 | $ cp -R temp2 temp/ # copy folder temp2 into folder temp 73 | $ cd temp 74 | $ ls 75 | events temp2 76 | 77 | 78 | mv 79 | +++ 80 | `mv `__ is a command standing for move. It is used to move one or more files or directories from one place to another. It has two distinct functions:(i) It rename a file or folder; (ii) It moves group of files to different directory. 81 | 82 | .. code-block:: console 83 | 84 | $ mkdir temp3 85 | $ mv events-selected.dat temp/events # move file events-selected.dat into folder temp renamed as events 86 | $ mv temp3 temp/ # move folder temp3 into folder temp 87 | $ cd temp 88 | $ ls 89 | events events-selected.dat temp2 temp3 90 | 91 | 92 | rm 93 | +++ 94 | `rm `__ is a command standing for remove. It is used to remove objects such as files (default) and directories (with ``-R``). 95 | 96 | .. code-block:: console 97 | 98 | $ cd temp 99 | $ ls 100 | events events-selected.dat temp2 temp3 101 | $ rm events 102 | $ rm -r temp2 103 | $ ls 104 | events-selected.dat temp3 105 | 106 | 107 | 108 | Data Processing 109 | --------------- 110 | 111 | 112 | cat 113 | +++ 114 | 115 | `cat `__ is a command used very frequently in Linux. It reads data from the file and gives their content as output. It helps us to create, view, concatenate files. 116 | 117 | .. code-block:: console 118 | 119 | # show the content of a catalog file, e.g., events-selected.dat 120 | $ cat events-selected.dat 121 | year month day hour minute second event ID latitude (decimal degrees), longitude (decimal degrees), depth (km) event magnitude 122 | 2019 07 06 03 47 52.980 38457687 35.90800 -117.74833 7.290 5.50 57 2.700 0.100 0.300 0.090 le 3d 123 | 2019 07 06 03 19 52.260 38457511 35.76883 -117.59717 1.860 7.10 48 4.800 0.100 0.400 0.090 le 3d 124 | 2019 07 04 17 33 48.530 38443183 35.70750 -117.50150 11.780 6.40 58 7.400 0.100 0.300 0.080 le 3d 125 | 126 | 127 | paste 128 | +++++ 129 | 130 | `paste `__ is one of the most useful commands used to join files horizontally (parallel merging) by outputting lines consisting of lines from each file specified, separated by tab as delimiter, to the standard output. 131 | 132 | .. code-block:: console 133 | 134 | # paste two files together 135 | $ cat Time.temp1 136 | 20190706 137 | 20190706 138 | 20190704 139 | $ cat Time.temp2 140 | 0347 141 | 0319 142 | 1733 143 | $ paste Time.temp1 Time.temp2 > Time # Here, ``>`` is Standard Output, it redirects the output content to a file. 144 | $ cat Time 145 | 20190706 0347 146 | 20190706 0319 147 | 20190704 1733 148 | 149 | 150 | awk 151 | +++ 152 | 153 | `awk `__ is a domain-specific language designed for text processing and typically used as a data extraction and reporting tool. It is used to extract certain columns or sections in an ASCII-format file given a specified field separator. By default, fields are separated by a space. We can change that with the --field-separator option, which sets the ``-F``‘S’ variable S to whatever you want it to be. 154 | 155 | .. code-block:: console 156 | 157 | # extract the depth (fourth) and magnitude (fifth) columns 158 | $ awk 'FNR>1{print $10,$11}' events-selected.dat # Here, the division character is the default setting ``empty space``; ``FNR > 1`` means skipping the first line. 159 | 7.290 5.50 160 | 1.860 7.10 161 | 11.780 6.40 162 | 163 | .. code-block:: console 164 | 165 | # extract the origin time (first) column and reformat it into yyyymmdd hhmmss.sss 166 | $ awk 'FNR>1{print $1$2$3}' events-selected.dat > origin.temp1 # Here, ``|`` is pipelines, using it, the standard output of one command is fed into the standard input of another. 167 | $ cat origin.temp1 168 | 20190706 169 | 20190706 170 | 20190704 171 | $ awk 'FNR>1{print $4$5$6}' events-selected.dat > origin.temp2 172 | $ cat origin.temp2 173 | 034752.980 174 | 031952.260 175 | 173348.530 176 | $ paste origin.temp1 origin.temp2 > origin 177 | $ cat origin 178 | 20190706 034752.980 179 | 20190706 031952.260 180 | 20190704 173348.530 181 | 182 | 183 | printf 184 | ++++++ 185 | 186 | `printf `__ is a command in Linux used to display the given string, number or any other format specifier on the terminal window. It works the same way as “printf” works in programming languages like C. 187 | 188 | .. code-block:: console 189 | 190 | # extract the depth (fourth) columns with keeping one decimal place 191 | $ awk 'FNR>1{printf"%.1f\n",$10}' events-selected.dat 192 | 7.3 193 | 1.9 194 | 11.8 195 | 196 | 197 | cut 198 | +++ 199 | 200 | `cut `__ is a command for cutting out the sections from each line of files and writing the result to standard output. It can be used to cut parts of a line by byte position, character and field. Often used options include column indicator ``-c``, and combination of ``-d`` (seperator) and ``-f`` (field number) to realise the extraction of certain sections in the ASCII-format file. 201 | 202 | .. code-block:: console 203 | 204 | # extract the origin time (first) column and reformat it into yyyymmdd hhmmss.sss 205 | $ awk 'FNR>1{print}' events-selected.dat | cut -c 1-4,6-7,9-10 > origin.temp1 206 | $ cat origin.temp1 207 | 20190706 208 | 20190706 209 | 20190704 210 | $ awk 'FNR>1{print}' events-selected.dat | cut -c 12-13,15-16,18-23 > origin.temp2 211 | $ cat origin.temp2 212 | 034752.980 213 | 031952.260 214 | 173348.530 215 | $ paste origin.temp1 origin.temp2 > origin 216 | $ cat origin 217 | 20190706 034752.980 218 | 20190706 031952.260 219 | 20190704 173348.530 220 | 221 | 222 | grep 223 | ++++ 224 | 225 | `grep `__ is a filter command for searching for a particular pattern of characters in a file, and displaying all lines that contain that pattern. 226 | 227 | .. code-block:: console 228 | 229 | # extract the lines containing ``3d`` in catalog file events-selected.dat 230 | $ cat events-selected.dat | grep "3d" # Note the capital case is different from the lower case. 231 | 2019 07 06 03 47 52.980 38457687 35.90800 -117.74833 7.290 5.50 57 2.700 0.100 0.300 0.090 le 3d 232 | 2019 07 06 03 19 52.260 38457511 35.76883 -117.59717 1.860 7.10 48 4.800 0.100 0.400 0.090 le 3d 233 | 2019 07 04 17 33 48.530 38443183 35.70750 -117.50150 11.780 6.40 58 7.400 0.100 0.300 0.080 le 3d 234 | 235 | 236 | sort 237 | ++++ 238 | 239 | `sort `__ is a command for sorting a file, arranging the records in a particular order. Often used options include ``-k`` (column number), ``-g`` (in numerical order), ``-r`` (in decreasing order, default is increasing order), ``-u`` (sort and remove duplicates) and ``-o`` (output to a new file). 240 | 241 | .. code-block:: console 242 | 243 | # sort the events in decreasing order within the catalog file events-selected.dat according to their magnitudes. 244 | $ awk 'FNR>1{print}' events-selected.dat | sort -nk11,11 -r -o events-ordered.dat 245 | $ cat events-ordered.dat 246 | 2019 07 06 03 19 52.260 38457511 35.76883 -117.59717 1.860 7.10 48 4.800 0.100 0.400 0.090 le 3d 247 | 2019 07 04 17 33 48.530 38443183 35.70750 -117.50150 11.780 6.40 58 7.400 0.100 0.300 0.080 le 3d 248 | 2019 07 06 03 47 52.980 38457687 35.90800 -117.74833 7.290 5.50 57 2.700 0.100 0.300 0.090 le 3d 249 | 250 | 251 | uniq 252 | ++++ 253 | 254 | `uniq `__ is a command for reporting or filtering out the repeated lines in a file. Often used options include ``-c`` (count, how many times a line was repeated), ``-d`` (only print the repeated lines) and ``-u`` (only print unique lines). 255 | 256 | 257 | wc 258 | ++ 259 | 260 | `wc `__ is used to find out number of lines, word count, byte and characters count in the files specified in the file arguments. 261 | 262 | 263 | 264 | File Compressing 265 | ---------------- 266 | 267 | tar 268 | +++ 269 | 270 | `tar `__ is a command standing for tape archive, used to create compressed or uncompressed archive files and also maintain and modify them. Often used commands include ``-x`` (extract the archive), ``-c`` (create the archive), ``-v`` (displays verbose information), ``-f`` (creates archive with given filename), ``-z`` (zip, tells tar command that create tar file using gzip), ``-j`` (filter archive tar file using tbzip). 271 | 272 | .. code-block:: console 273 | 274 | # decompress a file 275 | $ ls 276 | TauP-2.4.5.tar 277 | $ tar -zxvf TauP-2.4.5.tar 278 | # or use the following command line 279 | $ tar -jxvf TauP-2.4.5.tar 280 | $ ls 281 | TauP-2.4.5 282 | 283 | .. code-block:: console 284 | 285 | # compress a file 286 | $ ls 287 | TauP-2.4.5 288 | $ tar -zcvf TauP-2.4.5.tar TauP-2.4.5 289 | # or use the following command line 290 | $ tar -jcvf TauP-2.4.5.tar TauP-2.4.5 291 | $ ls 292 | TauP-2.4.5 TauP-2.4.5.tar 293 | 294 | 295 | gzip 296 | ++++ 297 | `gzip `__ is a command for compressing files. Often used commands include ``-k`` (compression while keep the original file), ``-r`` (compress every file in a folder and its subfolders), ``-d`` (decompress a file using the “gzip” command), ``-v`` (display the name and percentage reduction for each file compressed or decompressed). 298 | 299 | .. code-block:: console 300 | 301 | # compress the file 302 | $ ls 303 | events-selected.dat 304 | $ gzip -v events-selected.dat 305 | events-selected.dat: 57.3% -- replaced with events-selected.dat.gz 306 | $ ls 307 | events-selected.dat.gz 308 | 309 | .. code-block:: console 310 | 311 | # or compress the file while keeping the original one 312 | $ gzip -kv events-selected.dat 313 | events-selected.dat: 57.3% -- replaced with events-selected.dat.gz 314 | $ ls 315 | events-selected.dat events-selected.dat.gz 316 | 317 | .. code-block:: console 318 | 319 | # decompress the file 320 | $ gzip -dv events-selected.dat.gz 321 | events-selected.dat.gz: 57.3% -- replaced with events-selected.dat 322 | $ ls 323 | events-selected.dat 324 | 325 | .. code-block:: console 326 | 327 | # compress each file in folder temp 328 | $ mkdir temp 329 | $ cp events-selected.dat ./temp/ 330 | $ cd ./temp/ 331 | $ ls 332 | events-selected.dat 333 | $ cd ../ 334 | $ gzip -rv temp 335 | temp/events-selected.dat: 57.3% -- replaced with temp/events-selected.dat.gz 336 | $ cd ./temp 337 | $ ls 338 | events-selected.dat.gz 339 | 340 | 341 | 342 | bzip2 343 | +++++ 344 | 345 | `bzip2 `__ is a command used to compress and decompress the files i.e. it helps in binding the files into a single file which takes less storage space as the original file use to take. It has a slower decompression time and higher memory use. 346 | 347 | 348 | Non-classified Commands 349 | ----------------------- 350 | 351 | 352 | touch 353 | +++++ 354 | 355 | `touch `__ is a command used to create a file without any content (empty file). 356 | 357 | 358 | 359 | head 360 | ++++ 361 | 362 | `head `__ is the complementary of Tail command, it prints the top N number of data of the given input. By default, it prints the first 10 lines of the specified files. Often used option is ``-n num`` (Prints the first ‘num’ lines instead of first 10 lines. num is mandatory to be specified in command otherwise it displays an error). 363 | 364 | .. code-block:: console 365 | 366 | # show the first two lines of content of a catalog file, e.g., events-selected.dat 367 | $ cat events-selected.dat | head -n 2 368 | year month day hour minute second event ID latitude (decimal degrees), longitude (decimal degrees), depth (km) event magnitude 369 | 2019 07 06 03 47 52.980 38457687 35.90800 -117.74833 7.290 5.50 57 2.700 0.100 0.300 0.090 le 3d 370 | 371 | 372 | tail 373 | ++++ 374 | 375 | `tail `__ is the complementary of Head command, it prints the last N number of data of the given input. By default it prints the last 10 lines of the specified files. Often used option is ``-n num`` (Prints the last ‘num’ lines instead of last 10 lines. num is mandatory to be specified in command otherwise it displays an error). 376 | 377 | .. code-block:: console 378 | 379 | # show the last two lines of content of a catalog file, e.g., events-selected.dat 380 | $ cat events-selected.dat | tail -n 2 381 | 2019 07 06 03 19 52.260 38457511 35.76883 -117.59717 1.860 7.10 48 4.800 0.100 0.400 0.090 le 3d 382 | 2019 07 04 17 33 48.530 38443183 35.70750 -117.50150 11.780 6.40 58 7.400 0.100 0.300 0.080 le 3d 383 | 384 | 385 | which 386 | +++++ 387 | `which `__ is the command used to locate the executable file associated with the given command by searching it in the path environment variable. 388 | 389 | .. code-block:: console 390 | 391 | # show the location of installed sac 392 | $ which sac 393 | /usr/local/MyCode/sac/bin/sac 394 | 395 | 396 | locate 397 | ++++++ 398 | `locate `__ is the command used to find the files by name. There're two most widely used file searching utilities accessible to users are called find and locate. The locate utility works better and faster than find command counterpart. 399 | 400 | 401 | sed 402 | +++ 403 | `sed `__ is the command standing for stream editor and it can perform lots of functions on file, e.g., searching, find and replace, insertion or deletion. 404 | 405 | .. code-block:: console 406 | 407 | # delete the line containing 11.780 408 | $ cat events-selected.dat 409 | year month day hour minute second event ID latitude (decimal degrees), longitude (decimal degrees), depth (km) event magnitude 410 | 2019 07 06 03 47 52.980 38457687 35.90800 -117.74833 7.290 5.50 57 2.700 0.100 0.300 0.090 le 3d 411 | 2019 07 06 03 19 52.260 38457511 35.76883 -117.59717 1.860 7.10 48 4.800 0.100 0.400 0.090 le 3d 412 | 2019 07 04 17 33 48.530 38443183 35.70750 -117.50150 11.780 6.40 58 7.400 0.100 0.300 0.080 le 3d 413 | $ sed '/11.780/d' events-selected.dat 414 | year month day hour minute second event ID latitude (decimal degrees), longitude (decimal degrees), depth (km) event magnitude 415 | 2019 07 06 03 47 52.980 38457687 35.90800 -117.74833 7.290 5.50 57 2.700 0.100 0.300 0.090 le 3d 416 | 2019 07 06 03 19 52.260 38457511 35.76883 -117.59717 1.860 7.10 48 4.800 0.100 0.400 0.090 le 3d 417 | 418 | .. code-block:: console 419 | 420 | # replace le with LOCEVT in the whole file 421 | $ sed 's/le/LOCEVT/g' events-selected.dat 422 | year month day hour minute second event ID latitude (decimal degrees), longitude (decimal degrees), depth (km) event magnitude 423 | 2019 07 06 03 47 52.980 38457687 35.90800 -117.74833 7.290 5.50 57 2.700 0.100 0.300 0.090 LOCEVT 3d 424 | 2019 07 06 03 19 52.260 38457511 35.76883 -117.59717 1.860 7.10 48 4.800 0.100 0.400 0.090 LOCEVT 3d 425 | 2019 07 04 17 33 48.530 38443183 35.70750 -117.50150 11.780 6.40 58 7.400 0.100 0.300 0.080 LOCEVT 3d 426 | 427 | 428 | diff 429 | ++++ 430 | `diff `__ is the command standing for difference. It is used to display the differences in the files by comparing the files line by line. 431 | 432 | 433 | echo 434 | ++++ 435 | `echo `__ is the command in Linux used to display line of text/string that are passed as an argument . This is a built in command that is mostly used in shell scripts and batch files to output status text to the screen or a file. 436 | -------------------------------------------------------------------------------- /source/computer/file-manage.rst: -------------------------------------------------------------------------------- 1 | File Management 2 | =============== 3 | 4 | File Management 5 | --------------- 6 | 7 | - **File Management:** https://blog.seisman.info/file-organization/ 8 | 9 | I'd like to introduce how I manage the files in my computers. I have two computers: 10 | 11 | 1. HP workstation: CentOS 7 installed and for researches only. 12 | 2. macOS: reading, writing, entertainment and some simple researches 13 | 14 | 15 | Files and Fold in Linux 16 | +++++++++++++++++++++++ 17 | 18 | ``$HOME`` directory: 19 | 20 | .. code-block:: bash 21 | 22 | $ tree -dlC -L 1 ~/ 23 | /home/coreman/ 24 | ├── backup # original codes downloaded from websites 25 | ├── bin # some simple binary files and scripts 26 | ├── Codes # codes written by myself 27 | ├── Datas # dataset that will not usually revised 28 | ├── Desktop # my desktop 29 | ├── Downloads # default downloading directory for web browser 30 | ├── Nutstore # Nustore folder 31 | ├── Nutstore Files # Nustore folder 32 | ├── Projects # I put all my projects here 33 | ├── Scripts # some general scripts written by myself 34 | ├── src.import # codes downloaded from websites 35 | ├── Trash # I move files here and then removing them 36 | └── workspace # I perform some tests in this directory 37 | 38 | 39 | ``/opt/`` directory: I put some large softwares here. 40 | 41 | .. code-block:: bash 42 | 43 | $ tree -dlC -L 1 /opt 44 | /opt 45 | ├── GMT-4.5.13 46 | ├── GMT-5.4.4 47 | ├── GMT6 48 | ├── julia-1.4.2 49 | ├── Matlab2019a 50 | ├── SAC 51 | ├── sod-3.2.10 52 | └── TauP-2.4.5 53 | 54 | 55 | Sometimes, I have to download many data which are to large to be stored in my computer. I will put them in a portable drive. 56 | 57 | 58 | Files and Fold in macOS 59 | +++++++++++++++++++++++ 60 | 61 | .. code-block:: bash 62 | 63 | $ tree -L 1 ~/work 64 | /Users/coreman/work 65 | ├── 1-book # books 66 | ├── 2-paper # papers 67 | ├── 3-course # materials of courses and workshops 68 | ├── 4-research # some notes and ideas about my researches 69 | ├── 5-report # ppts of others' and my reports 70 | ├── 6-publication # all my publications 71 | ├── 7-meeting # conferences 72 | ├── 8-software # some codes 73 | ├── 9-websites # my websites 74 | ├── 10-document # my documents 75 | ├── 11-collections # some useful and funny resources 76 | └── 12-projects # my projects 77 | 78 | 79 | File Backup 80 | ----------- 81 | 82 | - **File backup:** https://core-man.github.io/blog/post/backup/ 83 | 84 | It is very dangerous to play with codes and data without backup. We may sometimes remove the files by mistakes or the computer may be broken. Please refer to the above reference when you think you have to backup your files. 85 | 86 | 87 | Reading & Writing 88 | ----------------- 89 | 90 | - **Scientific reading and writing experience:** https://core-man.github.io/blog/post/reading-writing/ 91 | 92 | You may refer the above reference for scientific reading and writing. 93 | 94 | -------------------------------------------------------------------------------- /source/computer/index.rst: -------------------------------------------------------------------------------- 1 | Computer 2 | ======== 3 | 4 | .. toctree:: 5 | 6 | operating-systems 7 | LinuxmacOS-basis 8 | file-manage 9 | command-lines 10 | -------------------------------------------------------------------------------- /source/computer/operating-systems.rst: -------------------------------------------------------------------------------- 1 | Operating Systems 2 | ================= 3 | 4 | Commonly-used Operation Systems 5 | ------------------------------- 6 | 7 | There are three most commonly used operation systems for personal computers: 8 | 9 | - Microsoft Windows 10 | - Apple macOS 11 | - Linux (Ubuntu, Fedora, CentOS, Red Hat, Debian, ...) 12 | 13 | Most seismologists choose macOS or Linux as their primary operation system for daily researches, because both macOS and Linux provide easy access to toolchains needed in programming, and most existing programs/codes/packages for seismological researches were written on Linux and only work on Linux and macOS. As a beginner, you should use macOS or Linux. For Windows 10 users, you can install Windows Subsystem for Linux (WSL) on your Windows 10, just like installing any other Windows softwares. It may behave very similar to the pure Linux OS, but I have never tried it. 14 | 15 | 16 | macOS 17 | ----- 18 | 19 | For people who have a MacBook, MacBook Pro or iMac, you need to install the "Command Line Tools for Xcode" and Homebrew, then you're almost all set. Please refer to `setting macOS `__ 20 | 21 | 22 | Free Linux Distributions 23 | ------------------------ 24 | 25 | - `Some free Linux distributions `__ 26 | - `Ubuntu `__ 27 | 28 | - `Community `__: `Tutorial `__ | `DOC `__ 29 | - `Download Ubuntu Desktop `__: `Install Ubuntu Desktop `__ 30 | 31 | - `Fedora `__: `Workstation `__ 32 | - `CentOS `__ 33 | 34 | - `DOC `__ 35 | - `wiki `__ | `CentosHelp.org `__ | `blog `__ 36 | - `Installing and Setting CentOS 7 `__ 37 | 38 | 39 | Windows Subsystem for Linux 40 | --------------------------- 41 | 42 | We can use Linux subsystem in Windows10, i.e., Windows Subsystem for Linux (WSL). Firstly, we have to update the windows system. Please check the following official document for the system version requirement. If the system version is a too low, please refer to `Update Assistant `_. 43 | 44 | WSL now has two versions, WSL1 and WLS2. Please check their difference (`Microsoft DOC `__ & `USTC LUG `__). You can use WSL2. Please refer to the `Microsoft DOC `_ and `Chinese DOC `_ to install WSL. 45 | 46 | When WSL is installed, type ``wsl`` in **Windows Terminal** to start WSL. You can get access to filesystems of Windows and WSL from each other. When you are using WSL, you can get access to files in Windows. For example, ``Disk C`` is at ``/mnt/c``. When you are at Windows, you can get access to files in WSL by typing ``explorer.exe .`` in the terminal. The last dot means the current path. 47 | 48 | You can use WSL as you are using a Linux system. If you'd like to plot figures, you have to set ``Xserver`` referring to the `manual `__. 49 | 50 | -------------------------------------------------------------------------------- /source/conf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | # 4 | # SeisTomo_Tutorials documentation build configuration file, created by 5 | # sphinx-quickstart on Tue Nov 3 17:30:23 2020. 6 | # 7 | # This file is execfile()d with the current directory set to its 8 | # containing dir. 9 | # 10 | # Note that not all possible configuration values are present in this 11 | # autogenerated file. 12 | # 13 | # All configuration values have a default; values that are commented out 14 | # serve to show the default. 15 | 16 | import sys 17 | import os 18 | 19 | # If extensions (or modules to document with autodoc) are in another directory, 20 | # add these directories to sys.path here. If the directory is relative to the 21 | # documentation root, use os.path.abspath to make it absolute, like shown here. 22 | #sys.path.insert(0, os.path.abspath('.')) 23 | 24 | # -- General configuration ------------------------------------------------ 25 | 26 | # If your documentation needs a minimal Sphinx version, state it here. 27 | #needs_sphinx = '1.0' 28 | 29 | # Add any Sphinx extension module names here, as strings. They can be 30 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 31 | # ones. 32 | extensions = [ 33 | 'sphinx.ext.autodoc', 34 | 'sphinx.ext.githubpages', 35 | 'sphinx_gmt.gmtplot', 36 | ] 37 | 38 | # Add any paths that contain templates here, relative to this directory. 39 | templates_path = ['_templates'] 40 | 41 | # The suffix of source filenames. 42 | source_suffix = '.rst' 43 | 44 | # The encoding of source files. 45 | #source_encoding = 'utf-8-sig' 46 | 47 | # The master toctree document. 48 | master_doc = 'index' 49 | 50 | # General information about the project. 51 | project = 'SeisTomo_Tutorials' 52 | copyright = '2020, MIG' 53 | 54 | # The version info for the project you're documenting, acts as replacement for 55 | # |version| and |release|, also used in various other places throughout the 56 | # built documents. 57 | # 58 | # The short X.Y version. 59 | version = '0.1' 60 | # The full version, including alpha/beta/rc tags. 61 | release = '0.1' 62 | 63 | # The language for content autogenerated by Sphinx. Refer to documentation 64 | # for a list of supported languages. 65 | #language = None 66 | 67 | # There are two options for replacing |today|: either, you set today to some 68 | # non-false value, then it is used: 69 | #today = '' 70 | # Else, today_fmt is used as the format for a strftime call. 71 | #today_fmt = '%B %d, %Y' 72 | 73 | # List of patterns, relative to source directory, that match files and 74 | # directories to ignore when looking for source files. 75 | exclude_patterns = [] 76 | 77 | # The reST default role (used for this markup: `text`) to use for all 78 | # documents. 79 | #default_role = None 80 | 81 | # If true, '()' will be appended to :func: etc. cross-reference text. 82 | #add_function_parentheses = True 83 | 84 | # If true, the current module name will be prepended to all description 85 | # unit titles (such as .. function::). 86 | #add_module_names = True 87 | 88 | # If true, sectionauthor and moduleauthor directives will be shown in the 89 | # output. They are ignored by default. 90 | #show_authors = False 91 | 92 | # The name of the Pygments (syntax highlighting) style to use. 93 | pygments_style = 'sphinx' 94 | 95 | # A list of ignored prefixes for module index sorting. 96 | #modindex_common_prefix = [] 97 | 98 | # If true, keep warnings as "system message" paragraphs in the built documents. 99 | #keep_warnings = False 100 | 101 | 102 | # -- Options for HTML output ---------------------------------------------- 103 | 104 | # The theme to use for HTML and HTML Help pages. See the documentation for 105 | # a list of builtin themes. 106 | #html_theme = 'default' 107 | import sphinx_rtd_theme 108 | html_theme = 'sphinx_rtd_theme' 109 | 110 | # Theme options are theme-specific and customize the look and feel of a theme 111 | # further. For a list of options available for each theme, see the 112 | # documentation. 113 | #html_theme_options = {} 114 | 115 | # Add any paths that contain custom themes here, relative to this directory. 116 | #html_theme_path = [] 117 | 118 | # The name for this set of Sphinx documents. If None, it defaults to 119 | # " v documentation". 120 | #html_title = None 121 | 122 | # A shorter title for the navigation bar. Default is the same as html_title. 123 | #html_short_title = None 124 | 125 | # The name of an image file (relative to this directory) to place at the top 126 | # of the sidebar. 127 | #html_logo = None 128 | 129 | # The name of an image file (within the static path) to use as favicon of the 130 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 131 | # pixels large. 132 | #html_favicon = None 133 | 134 | # Add any paths that contain custom static files (such as style sheets) here, 135 | # relative to this directory. They are copied after the builtin static files, 136 | # so a file named "default.css" will overwrite the builtin "default.css". 137 | html_static_path = ['_static'] 138 | 139 | # Add any extra paths that contain custom files (such as robots.txt or 140 | # .htaccess) here, relative to this directory. These files are copied 141 | # directly to the root of the documentation. 142 | #html_extra_path = [] 143 | 144 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 145 | # using the given strftime format. 146 | #html_last_updated_fmt = '%b %d, %Y' 147 | 148 | 149 | # added by core-man on Nov. 3 2020 150 | html_context = { 151 | 'display_github': True, 152 | 'github_user': 'MIGG-NTU', 153 | 'github_repo': 'SeisTomo_Tutorials', 154 | 'github_version': 'main', 155 | 'conf_py_path': '/source/', 156 | 'theme_vcs_pageview_mode': 'blob', 157 | } 158 | 159 | # If true, SmartyPants will be used to convert quotes and dashes to 160 | # typographically correct entities. 161 | #html_use_smartypants = True 162 | 163 | # Custom sidebar templates, maps document names to template names. 164 | #html_sidebars = {} 165 | 166 | # Additional templates that should be rendered to pages, maps page names to 167 | # template names. 168 | #html_additional_pages = {} 169 | 170 | # If false, no module index is generated. 171 | #html_domain_indices = True 172 | 173 | # If false, no index is generated. 174 | #html_use_index = True 175 | 176 | # If true, the index is split into individual pages for each letter. 177 | #html_split_index = False 178 | 179 | # If true, links to the reST sources are added to the pages. 180 | #html_show_sourcelink = True 181 | 182 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 183 | #html_show_sphinx = True 184 | 185 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 186 | #html_show_copyright = True 187 | 188 | # If true, an OpenSearch description file will be output, and all pages will 189 | # contain a tag referring to it. The value of this option must be the 190 | # base URL from which the finished HTML is served. 191 | #html_use_opensearch = '' 192 | 193 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 194 | #html_file_suffix = None 195 | 196 | # Output file base name for HTML help builder. 197 | htmlhelp_basename = 'SeisTomo_Tutorialsdoc' 198 | 199 | 200 | # -- Options for LaTeX output --------------------------------------------- 201 | 202 | latex_elements = { 203 | # The paper size ('letterpaper' or 'a4paper'). 204 | #'papersize': 'letterpaper', 205 | 206 | # The font size ('10pt', '11pt' or '12pt'). 207 | #'pointsize': '10pt', 208 | 209 | # Additional stuff for the LaTeX preamble. 210 | #'preamble': '', 211 | } 212 | 213 | # Grouping the document tree into LaTeX files. List of tuples 214 | # (source start file, target name, title, 215 | # author, documentclass [howto, manual, or own class]). 216 | latex_documents = [ 217 | ('index', 'SeisTomo_Tutorials.tex', 'SeisTomo\\_Tutorials Documentation', 218 | 'MIG', 'manual'), 219 | ] 220 | 221 | # The name of an image file (relative to this directory) to place at the top of 222 | # the title page. 223 | #latex_logo = None 224 | 225 | # For "manual" documents, if this is true, then toplevel headings are parts, 226 | # not chapters. 227 | #latex_use_parts = False 228 | 229 | # If true, show page references after internal links. 230 | #latex_show_pagerefs = False 231 | 232 | # If true, show URL addresses after external links. 233 | #latex_show_urls = False 234 | 235 | # Documents to append as an appendix to all manuals. 236 | #latex_appendices = [] 237 | 238 | # If false, no module index is generated. 239 | #latex_domain_indices = True 240 | 241 | 242 | # -- Options for manual page output --------------------------------------- 243 | 244 | # One entry per manual page. List of tuples 245 | # (source start file, name, description, authors, manual section). 246 | man_pages = [ 247 | ('index', 'seistomo_tutorials', 'SeisTomo_Tutorials Documentation', 248 | ['MIG'], 1) 249 | ] 250 | 251 | # If true, show URL addresses after external links. 252 | #man_show_urls = False 253 | 254 | 255 | # -- Options for Texinfo output ------------------------------------------- 256 | 257 | # Grouping the document tree into Texinfo files. List of tuples 258 | # (source start file, target name, title, author, 259 | # dir menu entry, description, category) 260 | texinfo_documents = [ 261 | ('index', 'SeisTomo_Tutorials', 'SeisTomo_Tutorials Documentation', 262 | 'MIG', 'SeisTomo_Tutorials', 'One line description of project.', 263 | 'Miscellaneous'), 264 | ] 265 | 266 | # Documents to append as an appendix to all manuals. 267 | #texinfo_appendices = [] 268 | 269 | # If false, no module index is generated. 270 | #texinfo_domain_indices = True 271 | 272 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 273 | #texinfo_show_urls = 'footnote' 274 | 275 | # If true, do not generate a @detailmenu in the "Top" node's menu. 276 | #texinfo_no_detailmenu = False 277 | -------------------------------------------------------------------------------- /source/data-analysis/index.rst: -------------------------------------------------------------------------------- 1 | Data Analysis 2 | ============= 3 | 4 | 5 | .. toctree:: 6 | 7 | phase-picking/index 8 | plot/index 9 | -------------------------------------------------------------------------------- /source/data-analysis/phase-picking/index.rst: -------------------------------------------------------------------------------- 1 | Phase Picking 2 | ============= 3 | 4 | 5 | Hand-Picking 6 | ------------ 7 | 8 | Please refer to the lecture resources on 2020-12-14. 9 | 10 | - pick arrival times via SAC 101.6a 11 | - check arrival times 12 | 13 | 14 | Automatic Picking 15 | ----------------- 16 | 17 | We may use some automatic picking methods to save time, e.g., STA/LTA (`ObsPy Trigger/Picker Tutorial `__). However, we may come back to this issue after we are familiar with seismic data and tools. 18 | 19 | -------------------------------------------------------------------------------- /source/data-analysis/plot/index.rst: -------------------------------------------------------------------------------- 1 | Plot Seismograms 2 | ================ 3 | 4 | Plot a single seismogram generated by SAC. The positive and nagetive parts are denoted by different colors. 5 | 6 | .. code-block:: console 7 | 8 | $ SAC> funcgen seismogram 9 | $ SAC> w seis.SAC 10 | $ SAC> q 11 | 12 | .. gmtplot:: 13 | :language: bash 14 | :width: 80% 15 | :caption: Seismograms generated by "funcgen seismogram" using SAC 16 | 17 | gmt begin sac png,pdf 18 | gmt sac seis.SAC -JX10c/5c -R9/20/-2/2 -Baf -Fr -Gp+gblack -Gn+gred 19 | gmt end show 20 | 21 | -------------------------------------------------------------------------------- /source/data-analysis/plot/seis.SAC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/data-analysis/plot/seis.SAC -------------------------------------------------------------------------------- /source/data-fetch/HinetPy/index.rst: -------------------------------------------------------------------------------- 1 | HinetPy 2 | ======= 3 | 4 | We can use `HinetPy `__ to download seismic data at Hinet. 5 | 6 | Please refer to the lecture resources on 2020-12-14. 7 | -------------------------------------------------------------------------------- /source/data-fetch/ObsPy/index.rst: -------------------------------------------------------------------------------- 1 | ObsPy 2 | ===== 3 | 4 | Please refer to the lecture resources on 2020-12-14. 5 | 6 | -------------------------------------------------------------------------------- /source/data-fetch/SOD/index.rst: -------------------------------------------------------------------------------- 1 | SOD 2 | === 3 | 4 | Please refer to the lecture resources on 2020-12-14. 5 | -------------------------------------------------------------------------------- /source/data-fetch/data-centers.rst: -------------------------------------------------------------------------------- 1 | Data Centers 2 | ============ 3 | 4 | Nowadays, there are terabytes/petabytes of seismic data collected every years. Most oil & gas companies have their own data centers to store this data. In academia, some international and regional data centers provide seismic data to researches, e.g., IRIS DMC. 5 | 6 | Different data centers provide data via different ways. Now, most data centers support `FDSN web service `__. Thus, we can use tools, e.g., SOD and ObsPy, to download data from those data centers. 7 | 8 | **Data Centers Supporting FDSN Web Services:** https://www.fdsn.org/webservices/datacenters/ 9 | 10 | 11 | IRIS DMC 12 | -------- 13 | 14 | IRIS DMC (Data Management Center of Incorporated Research Institutions for Seismology) is the largest data center in the world and has provided a lot of seismic data to reseacheres for many years. Most data at the IRIS DMC is open to public immediately or after an embargo of a period of time (e.g. 2 years). 15 | 16 | - Homepage: http://ds.iris.edu/ds/nodes/dmc/ 17 | - Data at IRIS: https://ds.iris.edu/ds/nodes/dmc/data/ 18 | - IRIS DMC web service: http://service.iris.edu 19 | 20 | 21 | USA 22 | ---- 23 | 24 | - Northern California Earthquake Data Center: `Homepage `__ | `web service `__ 25 | - Southern California Earthquake Data Center: `Homepage `__ | `web service `__ 26 | 27 | 28 | European Integrated Data Archive 29 | -------------------------------- 30 | 31 | ORFEUS is the non-profit foundation to coordinate and promote digital, broadband seismology in the European-Mediterranean area. 32 | 33 | EIDA is the European Integrated Data Archive infrastructure within ORFEUS to provide access to seismic waveform data in European archives. You can think ORFEUS is IRIS, and EIDA is IRIS-DMC. 34 | 35 | - ORFEUS: `Homepage `__ 36 | - EIDA: `Homepage `__ | `web service `__ 37 | 38 | There are also many regional data centers in Europe. They send their data to EIDA, but they may also have some data that are sent to EIDA. 39 | 40 | - Data centers in EIDA: http://www.orfeus-eu.org/data/eida/webservices/ 41 | - Regional data centers in Europe: https://www.fdsn.org/webservices/datacenters/ 42 | 43 | 44 | Japan 45 | ----- 46 | 47 | - Hinet: https://www.hinet.bosai.go.jp/ 48 | - Fnet: https://www.fnet.bosai.go.jp/top.php 49 | 50 | 51 | -------------------------------------------------------------------------------- /source/data-fetch/fetch-tools.rst: -------------------------------------------------------------------------------- 1 | Fetching Tools 2 | ============== 3 | 4 | - https://seisman.github.io/SAC_Docs_zh/appendix/data-fetch/fetch-tools/#web-service 5 | - https://github.com/MIGG-NTU/SeisData_Tools/ 6 | 7 | -------------------------------------------------------------------------------- /source/data-fetch/index.rst: -------------------------------------------------------------------------------- 1 | Data Fetching 2 | ============= 3 | 4 | 5 | .. toctree:: 6 | 7 | data-centers 8 | fetch-tools 9 | SOD/index 10 | ObsPy/index 11 | HinetPy/index 12 | -------------------------------------------------------------------------------- /source/data-process/index.rst: -------------------------------------------------------------------------------- 1 | Data Processing 2 | =============== 3 | 4 | Please refer to the lecture resources on 2020-12-14. 5 | 6 | -------------------------------------------------------------------------------- /source/download/exercises/bash-solution.tar: -------------------------------------------------------------------------------- 1 | bash-solution/0000755000175000017500000000000013763155761013625 5ustar tomoboytomoboybash-solution/events-selected.dat0000644000175000017500000000125513762432037017405 0ustar tomoboytomoboyyear month day hour minute second event ID latitude (decimal degrees), longitude (decimal degrees), depth (km) event magnitude 2 | 2019 07 06 03 47 52.980 38457687 35.90800 -117.74833 7.290 5.50 57 2.700 0.100 0.300 0.090 le 3d 3 | 2019 07 06 03 19 52.260 38457511 35.76883 -117.59717 1.860 7.10 48 4.800 0.100 0.400 0.090 le 3d 4 | 2019 07 04 17 33 48.530 38443183 35.70750 -117.50150 11.780 6.40 58 7.400 0.100 0.300 0.080 le 3d 5 | bash-solution/events.csv0000664000175000017500000000044613763155761015654 0ustar tomoboytomoboytime, latitude, longitude, depth, depthUnits, magnitude, magnitudeType 6 | 20190706T03:47:52.980Z, 35.90800, -117.74833, 7.290, KILOMETER, 5.50, mww 7 | 20190706T03:19:52.260Z, 35.76883, -117.59717, 1.860, KILOMETER, 7.10, mww 8 | 20190704T17:33:48.530Z, 35.70750, -117.50150, 11.780, KILOMETER, 6.40, mww 9 | bash-solution/bash-solution.sh0000644000175000017500000000126013763155644016747 0ustar tomoboytomoboy#!/bin/bash 10 | 11 | awk 'FNR>1{print}' events-selected.dat > events_info.temp 12 | echo "time, latitude, longitude, depth, depthUnits, magnitude, magnitudeType" > events.csv 13 | 14 | while read events_info 15 | do 16 | echo $events_info 17 | yyyymmdd=`echo $events_info | awk '{print $1$2$3}'` 18 | hhmmss=`echo $events_info | awk '{print $4":"$5":"$6}'` 19 | latitude=`echo $events_info | awk '{print $8}'` 20 | longitude=`echo $events_info | awk '{print $9}'` 21 | depth=`echo $events_info | awk '{print $10}'` 22 | magnitude=`echo $events_info | awk '{print $11}'` 23 | 24 | echo $depth $magnitude 25 | echo "${yyyymmdd}T${hhmmss}Z, ${latitude}, ${longitude}, ${depth}, KILOMETER, ${magnitude}, mww" >> events.csv 26 | done < events_info.temp 27 | 28 | rm events_info.temp 29 | -------------------------------------------------------------------------------- /source/download/exercises/python-solution.tar: -------------------------------------------------------------------------------- 1 | python-solution/0000755000175000017500000000000013762700234014217 5ustar tomoboytomoboypython-solution/events-selected.csv0000644000175000017500000000042413762433037020032 0ustar tomoboytomoboytime, latitude, longitude, depth, depthUnits, magnitude, magnitudeType 2 | 20190706T03:47:52.980Z,35.90800,-117.74833,7.290,KILOMETER,5.50,mww 3 | 20190706T03:19:52.260Z,35.76883,-117.59717,1.860,KILOMETER,7.10,mww 4 | 20190704T17:33:48.530Z,35.70750,-117.50150,11.780,KILOMETER,6.40,mww 5 | python-solution/table_2_csv.py0000644000175000017500000000075313762432656016773 0ustar tomoboytomoboyfilename = "events-selected.dat" 6 | csvname = "events-selected.csv" 7 | 8 | with open(filename, 'r') as f: 9 | lines = f.readlines() 10 | f = open(csvname, 'w') 11 | f.write("time, latitude, longitude, depth, depthUnits, magnitude, magnitudeType\n") 12 | for line in lines: 13 | line = line.strip() 14 | temp = line.split() 15 | time = "%s%s%sT%s:%s:%sZ" % tuple(temp[:6]) 16 | lat, lon, dep, mag = temp[7], temp[8], temp[9], temp[10] 17 | f.write(",".join([time, lat, lon, dep, "KILOMETER", mag, "mww"])+'\n') 18 | f.close() 19 | python-solution/events-selected.dat0000644000175000017500000000105613762431000017775 0ustar tomoboytomoboy2019 07 06 03 47 52.980 38457687 35.90800 -117.74833 7.290 5.50 57 2.700 0.100 0.300 0.090 le 3d 20 | 2019 07 06 03 19 52.260 38457511 35.76883 -117.59717 1.860 7.10 48 4.800 0.100 0.400 0.090 le 3d 21 | 2019 07 04 17 33 48.530 38443183 35.70750 -117.50150 11.780 6.40 58 7.400 0.100 0.300 0.080 le 3d 22 | -------------------------------------------------------------------------------- /source/download/exercises/seismic-source-solution.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/download/exercises/seismic-source-solution.tar -------------------------------------------------------------------------------- /source/download/exercises/seismic-wave-solution.tar: -------------------------------------------------------------------------------- 1 | seismic-wave-solution/0000775000175000017500000000000013763420576015305 5ustar tomoboytomoboyseismic-wave-solution/taup_time.sh0000775000175000017500000000150613762716671017640 0ustar tomoboytomoboy#!/bin/bash 2 | # calculate travel time of P and S waves using ak135 (a 1D Earth velocity model) 3 | 4 | echo "earthquake depth: 1 km" 5 | echo "earthuake-station distance: 50 km" 6 | echo "seismic phases: ttp (a list of standard P phases)" 7 | taup_time -mod ak135 -h 1 -km 50 -ph ttp 8 | 9 | echo 10 | echo "earthquake depth: 1 km" 11 | echo "earthuake-station distance: 50 km" 12 | echo "seismic phases: ttp+ (a list of standard P phases including depth phases)" 13 | taup_time -mod ak135 -h 1 -km 50 -ph ttp+ 14 | 15 | echo 16 | echo "earthquake depth: 1 km" 17 | echo "earthuake-station distance: 50 km" 18 | echo "seismic phases: tts (a list of standard S phases)" 19 | taup_time -mod ak135 -h 1 -km 50 -ph tts 20 | 21 | echo 22 | echo "earthquake depth: 1 km" 23 | echo "earthuake-station distance: 50 km" 24 | echo "seismic phases: tts+ (a list of standard S phases including depth phases)" 25 | taup_time -mod ak135 -h 1 -km 50 -ph tts+ 26 | -------------------------------------------------------------------------------- /source/download/lectures/20201207-command-lines.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/download/lectures/20201207-command-lines.tar -------------------------------------------------------------------------------- /source/download/lectures/20201207-programming.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/download/lectures/20201207-programming.pptx -------------------------------------------------------------------------------- /source/download/lectures/20201207-programming.tar: -------------------------------------------------------------------------------- 1 | programming/0000755000175000017500000000000013762700527013353 5ustar tomoboytomoboyprogramming/python/0000755000175000017500000000000013762427236014677 5ustar tomoboytomoboyprogramming/python/hello.py0000755000175000017500000000005413762427236016356 0ustar tomoboytomoboy#!/usr/bin/env python 2 | print("Hello World!") 3 | programming/c/0000755000175000017500000000000013762433333013573 5ustar tomoboytomoboyprogramming/c/hello.c0000644000175000017500000000020213762360035015032 0ustar tomoboytomoboy#include 4 | 5 | int main() { 6 | // printf() displays the string inside quotation 7 | printf("Hello, World!\n"); 8 | return 0; 9 | } 10 | programming/c/Makefile0000644000175000017500000000007213762424237015235 0ustar tomoboytomoboyhello_from_make : hello.c 11 | gcc -o hello_from_make hello.c 12 | -------------------------------------------------------------------------------- /source/download/lectures/20201207-seismology-file-management.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/download/lectures/20201207-seismology-file-management.pptx -------------------------------------------------------------------------------- /source/download/lectures/20201214-seismic-data.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/download/lectures/20201214-seismic-data.pptx -------------------------------------------------------------------------------- /source/download/lectures/20201214-seismic-data.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/download/lectures/20201214-seismic-data.tar -------------------------------------------------------------------------------- /source/download/lectures/20201221-tomography.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/download/lectures/20201221-tomography.pdf -------------------------------------------------------------------------------- /source/exercises/data-analysis/index.rst: -------------------------------------------------------------------------------- 1 | Data Analysis 2 | ============= 3 | 4 | **We may have some exercises to let the students to analyze seismic data.** 5 | 6 | - SAC 7 | 8 | -------------------------------------------------------------------------------- /source/exercises/data-fetch/index.rst: -------------------------------------------------------------------------------- 1 | Data Fetching 2 | ============= 3 | 4 | **We may have some exercises to let the students to download seismic data.** 5 | 6 | - SOD 7 | - ObsPy 8 | 9 | -------------------------------------------------------------------------------- /source/exercises/data-process/index.rst: -------------------------------------------------------------------------------- 1 | Data Processing 2 | =============== 3 | 4 | **We may have some exercises to let the students to process seismic data.** 5 | 6 | - SAC 7 | - ObsPy 8 | 9 | -------------------------------------------------------------------------------- /source/exercises/programming/index.rst: -------------------------------------------------------------------------------- 1 | Programming 2 | =========== 3 | 4 | 5 | Bash 6 | ---- 7 | 8 | Task 1 9 | ++++++ 10 | 11 | We have a raw earthquake catalog (``events-selected.dat``). The goal is to reformat this catalog so that it can be used in some seismological tools (e.g., ``SOD``). In this exercise, the final file has be to a csv file with seven columns, i.e., ``time``, ``latitude``, ``longitude``, ``depth``, ``depthUnits``, ``magnitude``, ``magnitudeType``. 12 | 13 | .. code-block:: console 14 | 15 | # The content of events-selected.dat 16 | $ cat events-selected.dat 17 | year month day hour minute second event ID latitude (decimal degrees), longitude (decimal degrees), depth (km) event magnitude 18 | 2019 07 06 03 47 52.980 38457687 35.90800 -117.74833 7.290 5.50 57 2.700 0.100 0.300 0.090 le 3d 19 | 2019 07 06 03 19 52.260 38457511 35.76883 -117.59717 1.860 7.10 48 4.800 0.100 0.400 0.090 le 3d 20 | 2019 07 04 17 33 48.530 38443183 35.70750 -117.50150 11.780 6.40 58 7.400 0.100 0.300 0.080 le 3d 21 | 22 | .. code-block:: console 23 | 24 | # An example of a reformatted catalog suitable as an input to SOD 25 | $ cat events.csv 26 | time, latitude, longitude, depth, depthUnits, magnitude, magnitudeType 27 | 20190706T03:19:52.260Z, 35.76883, -117.59717, 1.860, KILOMETER, 7.10, mww 28 | 20190704T17:33:48.530Z, 35.70750, -117.50150, 11.780, KILOMETER, 6.40, mww 29 | 30 | Please download the `solution `__. 31 | 32 | 33 | Python 34 | ------ 35 | 36 | Task 1 37 | ++++++ 38 | 39 | Use Python to do the above bash tasks again (`solution `__). 40 | -------------------------------------------------------------------------------- /source/exercises/seismology/index.rst: -------------------------------------------------------------------------------- 1 | Seismology 2 | ========== 3 | 4 | 5 | .. toctree:: 6 | 7 | seismic-source 8 | seismic-wave 9 | -------------------------------------------------------------------------------- /source/exercises/seismology/seismic-source.rst: -------------------------------------------------------------------------------- 1 | Seismic Source 2 | =============== 3 | 4 | Goals 5 | ----- 6 | 7 | - download earthquake catalog 8 | - find Ridgecrest earthquake sequence 9 | - plot Ridgecrest earthquake sequence on a map 10 | 11 | 12 | Task 0: preparation 13 | ------------------- 14 | 15 | 1. Download and install GMT6 on your own computer 16 | 17 | 18 | Task 1: download earthquake catalog 19 | ----------------------------------- 20 | 21 | 1. Download waveform relocated earthquake catalog for Southern California: https://scedc.caltech.edu/research-tools/alt-2011-dd-hauksson-yang-shearer.html 22 | 23 | - 1981-2019: ``1981-2019 Catalog file`` 24 | 25 | 2. Read format information: ``Format and catalog information (2019 dataset)``. Important points are indicated below. 26 | 27 | - columns `1-6`: ``year``, ``month``, ``day``, ``hour``, ``minute``, ``second`` 28 | - column `7`: ``event ID`` 29 | - column `8-10`: ``latitude (decimal degrees)``, ``longitude (decimal degrees)``, ``depth (km)`` 30 | - column `11`: ``event magnitude`` 31 | 32 | 33 | Task 2: find Ridgecrest earthquake sequence 34 | ---------------------------------------------- 35 | 36 | The main shock of Ridgecrest earthquake sequence occurs on ``2019-07-06T03:19:52.260``. 37 | 38 | 1. Find Ridgecrest earthquake sequence 39 | 40 | - location: ``35.5`` < latitude < ``36`` | ``-118`` < longitude < ``-117.3`` 41 | - time: ``2019-07-01T00:00:00.000`` ~ ``2019-08-01T00:00:00.000`` 42 | 43 | 2. Find the three largest (magnitude) earthquakes in the sequence 44 | 45 | 46 | Task 3: plot earthquakes on a map 47 | --------------------------------- 48 | 49 | 1. Plot the Ridgecrest earthquake sequence on a map (``points``) 50 | 2. Plot the three largest earthquakes in the sequence on the map (``stars``) 51 | 52 | 53 | Please download the `solution `__. 54 | 55 | -------------------------------------------------------------------------------- /source/exercises/seismology/seismic-wave.rst: -------------------------------------------------------------------------------- 1 | Seismic Wave 2 | ============ 3 | 4 | 5 | Goals 6 | ----- 7 | 8 | - learn how to calculate travle time of different seismic phases uing TauP 9 | - learn different seismic phases 10 | 11 | Task 0: preparation 12 | -------------------- 13 | 14 | 1. Download and install TauP on your own computer 15 | 16 | 17 | Task 1: calculate travel time 18 | ------------------------------ 19 | 20 | - command: ``taup_time`` 21 | - 1D Earthquake velocity model: ``ak135`` 22 | - earthquake depth: ``1 km`` 23 | - earthuake-station distance: ``50 km`` 24 | - seismic phases: 25 | 26 | - ``ttp``: a list of standard P phases 27 | - ``ttp+``: a list of standard P phases including depth phases 28 | - ``tts``: a list of standard S phases 29 | - ``tts+``: a list of standard S phases including depth phases 30 | 31 | 32 | Please download the `solution `__. 33 | -------------------------------------------------------------------------------- /source/index.rst: -------------------------------------------------------------------------------- 1 | SeisTomo Tutorials 2 | ================== 3 | 4 | .. note:: 5 | 6 | From 2021/07/03, the tutorials are maintained on `Seismology101 `__, 7 | which are tutorials for absolute beginners in Seismology in Chinese. 8 | 9 | .. note:: 10 | 11 | From 2021/07/03, the tutorials on this website and in BaiduDisk are not maintained any more. 12 | 13 | ---- 14 | 15 | This website hosts a series of introductory tutorials about seimic tomography. 16 | 17 | .. note:: 18 | 19 | The lecture resources and videos are also available in 20 | `BaiduDisk `__ with passwd ``4vgu``. 21 | 22 | Schedule 23 | -------- 24 | 25 | **Basics: 2020-12-07 14:00-16:00** 26 | 27 | =============== ============ =================== 28 | Topic Instructor Lecture Resources 29 | =============== ============ =================== 30 | Seismology Jiayuan YAO `pptx `__ 31 | File Management Jiayuan YAO pptx is included in the above pptx 32 | Command Lines Tianjue LI `command lines `__ 33 | Programming Shijie HAO `pptx `__ | `programming `__ 34 | =============== ============ =================== 35 | 36 | **Data: 2020-12-14 14:00-16:00** 37 | 38 | ==================================== ============ ======================== 39 | Topic Instructor Lecture Resources 40 | ==================================== ============ ======================== 41 | Data Fetching, Processing & Analysis Jiayuan Yao `pptx `__ | `seismic-data `__ 42 | ==================================== ============ ======================== 43 | 44 | **Seismic Tomography: 2020-12-21 14:00-16:00** 45 | 46 | =================== ============ ======================== 47 | Topic Instructor Lecture Resources 48 | =================== ============ ======================== 49 | Seismic Tomography Ping Tong `pptx `__ 50 | =================== ============ ======================== 51 | 52 | Requirements 53 | ------------ 54 | 55 | In order to follow the toturials, you have to install the following terms in your computer. 56 | 57 | 1. Linux or macOS system 58 | 59 | 2. Install Anaconda: install on `macOS `__, `Linux `__, and `Windows `__. The following is an example for ``Linux x86_64 system`` 60 | 61 | - Download ``Anaconda installer for Linux``: 64-Bit (x86) Installer (529 MB) 62 | - Enter the following to install Anaconda: ``bash ~/Downloads/Anaconda3-2020.11-Linux-x86_64.sh`` 63 | 64 | - The default install path is ``${HOME}/anaconda3``. I usually install it in ``${HOME}/.anaconda``. 65 | - Other options can be referred to the official guide: https://docs.anaconda.com/anaconda/install/linux/ 66 | 67 | - Enter ``python``, then you can see ``Python 3.8.6 | packaged by conda-forge`` 68 | 69 | .. code-block:: console 70 | 71 | $ python 72 | Python 3.8.6 | packaged by conda-forge | (default, Oct 7 2020, 19:08:05) 73 | [GCC 7.5.0] on linux 74 | Type "help", "copyright", "credits" or "license" for more information. 75 | >>> 76 | 77 | - Add package sources 78 | 79 | .. code-block:: console 80 | 81 | $ conda config --add channels conda-forge # this will reivse ~/.condarc 82 | 83 | - Update ``anaconda`` and ``conda`` 84 | 85 | .. code-block:: console 86 | 87 | $ conda update conda 88 | $ conda update anaconda 89 | 90 | - Create a new enviroment named ``seis`` 91 | 92 | .. code-block:: console 93 | 94 | $ conda create --name seis # creat a enviroment named seis 95 | $ conda activate seis # activate the environment 96 | 97 | - Get familiar with ``conda environment`` 98 | 99 | .. code-block:: console 100 | 101 | $ conda info --envs # list all the enviroments 102 | $ conda list # list all the packages in the current environment 103 | $ conda deactivate # deactivate an active environment 104 | $ conda remove --name seis --all # remove an environment 105 | 106 | - Install important python packages in the ``seis`` environment 107 | 108 | .. code-block:: console 109 | 110 | $ conda activate seis # activate the environment 111 | $ conda install numpy scipy matplotlib pandas # install the packages 112 | $ conda list | grep numpy # check numpy 113 | $ conda list | grep scipy # check scipy 114 | $ conda list | grep matplotlib # check matplotlib 115 | $ conda list | grep pandas # check pandas 116 | 117 | 3. Install ObsPy in the ``seis`` environment 118 | 119 | .. code-block:: console 120 | 121 | $ conda install obspy 122 | $ conda install cartopy 123 | 124 | 125 | 4. Install SAC 101.6a: Install binary package is **recommended**. The installed directory is recommened to be ``/opt`` instead of ``/usr/local``. 126 | 127 | - Linux: https://seisman.github.io/SAC_Docs_zh/introduction/linux-install/ 128 | - maxOS: https://seisman.github.io/SAC_Docs_zh/introduction/macOS-install/ 129 | 130 | 5. Install SOD 131 | 132 | - Download SOD: http://www.seis.sc.edu/sod/download.html 133 | - Extract SOD: ``tar -xvf sod-3.2.10.tgz`` 134 | - Install SOD: ``sudo mv sod-3.2.10 /opt`` 135 | - Update the enviroment variable ``$PATH`` 136 | 137 | .. code-block:: console 138 | 139 | $ echo 'export PATH=${PATH}:/opt/sod-3.2.10/bin'>> ~/.bashrc 140 | 141 | - Open a new terminal and run ``sod -h`` to test if SOD is installed. 142 | 143 | 6. Install TauP 144 | 145 | - Java Runtime Environment has to be installed. Run ``java -version`` to check it. If it is not installed, please refer to `seisman's blog `__ 146 | - Download TauP: https://www.seis.sc.edu/taup/ 147 | - Extract TauP: ``tar -xvf TauP-2.4.5.tgz`` 148 | - Install TauP: ``sudo mv TauP-2.4.5 /opt`` 149 | - Update the enviroment variable ``$PATH`` 150 | 151 | .. code-block:: console 152 | 153 | $ echo 'export TAUPHOME=/opt/TauP-2.4.5' >> ~/.bashrc 154 | $ echo 'export PATH=${TAUPHOME}/bin:${PATH}' >> ~/.bashrc 155 | $ source ~/.bashrc 156 | 157 | - Run ``taup`` to test if TauP is installed 158 | 159 | 160 | 7. Install GMT: https://docs.gmt-china.org/latest/install/ (I'd like to recommend installation via ``conda``) 161 | 162 | 8. Install gcc, gfortran, make 163 | 164 | - For Ubuntu, run the following command: 165 | 166 | .. code-block:: console 167 | 168 | $ sudo apt install gcc 169 | $ sudo apt install gfortran 170 | $ sudo apt install make 171 | 172 | 173 | .. toctree:: 174 | :maxdepth: 3 175 | :hidden: 176 | :caption: Basics 177 | 178 | computer/index 179 | programming/index 180 | seismology/index 181 | 182 | .. toctree:: 183 | :maxdepth: 3 184 | :hidden: 185 | :caption: Data 186 | 187 | data-fetch/index 188 | data-process/index 189 | data-analysis/index 190 | 191 | .. toctree:: 192 | :maxdepth: 3 193 | :hidden: 194 | :caption: Tomography 195 | 196 | tomo-theory/index 197 | tomo-workflow/index 198 | 199 | .. toctree:: 200 | :maxdepth: 3 201 | :hidden: 202 | :caption: Exercises 203 | 204 | exercises/programming/index 205 | exercises/seismology/index 206 | exercises/data-fetch/index 207 | exercises/data-process/index 208 | exercises/data-analysis/index 209 | -------------------------------------------------------------------------------- /source/programming/compiled-languages.rst: -------------------------------------------------------------------------------- 1 | Compiled Language 2 | ================= 3 | 4 | .. attention:: 5 | 6 | At this time, you can skip this step and come back to learn one complied language when you need it. 7 | 8 | You need at least master one compiled language. The most popular compiled languages used in seismology community are C, Fortran, C++ and Java. 9 | 10 | For beginners, C or Fortran are the best choices. You need to know the basic grammar of a programming language and how to compile/run a program. 11 | 12 | For a program written in C or Fortran, you need follow the steps to run the program: 13 | 14 | 1. Write the source codes using the correct syntax 15 | 2. Compile the source codes to a executable file, using a compiler (``gcc`` for C, ``gfortran`` for Fortran) 16 | 3. Run the executable file 17 | 18 | To compile source codes to a executable file, you need to know some commonly used options for gcc and gfortran, such as ``-c``, ``-o``, ``-g``, ``-I``, ``-L``, ``-l``. It would be easier to solve some compilation errors if you have a basic understanding of the compiling, linking and executing for compiled languages. 19 | 20 | You also need to learn how to read and write a Makefile, which is a tool to automatize the compiling process for a large source codes with multiple executable files. Please refer to `跟我一起写 Makefile `__. 21 | 22 | 23 | -------------------------------------------------------------------------------- /source/programming/index.rst: -------------------------------------------------------------------------------- 1 | Programming 2 | =========== 3 | 4 | 5 | .. toctree:: 6 | 7 | compiled-languages 8 | scripting-languages 9 | 10 | -------------------------------------------------------------------------------- /source/programming/scripting-languages.rst: -------------------------------------------------------------------------------- 1 | Scripting Languages 2 | =================== 3 | 4 | Scripting Languages can also be called as interpreted Languages. It's usually easier to write and can accomplish complex tasks using only a few lines of codes. The only disadvantage is interpreted languages are usually much slower than compiled languages. There are many interpreted languages, the most used in seismology community are bash, Python (**recommanded**) and Matlab. 5 | 6 | 7 | Bash 8 | ---- 9 | 10 | The basic concept of a bash script is a list of commands, which are listed in the order of execution. A good bash script will have comments, preceded by # sign, describing the steps. 11 | 12 | .. code-block:: bash 13 | 14 | #!/bin/bash 15 | # Author : San Zhang 16 | # Copyright (c) sanzhang@gmail.com 17 | # This is a simple demo. 18 | 19 | # print current date and time 20 | date 21 | 22 | # read your name 23 | echo "What is your name?" 24 | read PERSON 25 | echo "Hellow, $PERSON" 26 | 27 | Save the above content, make the script executable and run it: 28 | 29 | .. code-block:: console 30 | 31 | $ chmod +x hello.sh # make the script executable 32 | $ ./hello.sh # run the script 33 | 34 | **Resources** 35 | 36 | - `Shell script `__ 37 | - `Shell tutorial `__ 38 | 39 | 40 | Python 41 | ------ 42 | 43 | Python is an interpreted, high-level, general-purpose programming language. It is FREE and OPEN-SOURCE! Unlike MATLAB, the basic Python libraries have limited capability for scientific research. Seismologists need extra open-source Python libraries (e.g. numpy, scipy, matplotlib) for data analysis and plotting. 44 | 45 | Important Libraries and Packages 46 | ++++++++++++++++++++++++++++++++ 47 | 48 | - `NumPy `__: a library for large, multi-dimensinal arrays and matrices, required by any scientific research 49 | - `SciPy `__: a library for scientific computing, requiring NumPy, required by any scientific research 50 | - `Matplotlib `__: a library for plotting 51 | - `Pandas `__: a library for data structures and data analysis 52 | - `ObsPy `__: a project specifically for processing seismic data 53 | 54 | Quick Start 55 | +++++++++++ 56 | 57 | macOS and most Linux distributions have their own pre-installed Python, it's highly recommended to install the Anaconda distribution in your HOME directory. 58 | 59 | `Anaconda `__ is a FREE and OPEN-SOURCE distribution of the Python languages, designed for scientific computing that aims to simplify package installation and management. 60 | 61 | With anaconda installed, you will have full control of your Python and installed packages, avoid the risk messing up your operation system, and have more than 1000 popular Python packages available. 62 | 63 | **Install Anaconda** 64 | 65 | To install Anaconda on your own PC, please refer to the official installation guide on `macOS `__, `Linux `__, and `Windows `__. 66 | 67 | **Install packages** 68 | 69 | There are several ways to install Python packages. The most convenient ways are ``conda`` and ``pip``. If you want to install Python package, it's recommended to check if it's available from conda. If not, then you can pip. 70 | 71 | conda is the package manager provide d by Anaconda: 72 | 73 | .. code-block:: console 74 | 75 | $ conda search numpy # Search packages 76 | $ conda install numpy # Install packages 77 | 78 | pip is the built-in package manager of Python: 79 | 80 | .. code-block:: console 81 | 82 | $ pip install numpy # Search packages 83 | $ pip install numpy # Install pacakges 84 | 85 | Run following commands to install some most commonly used packages for scientific computing: 86 | 87 | .. code-block:: console 88 | 89 | $ conda install ipython numpy scipy matplotlib pandas 90 | $ conda install obspy --channel conda-forge 91 | 92 | Resources 93 | +++++++++ 94 | 95 | - `The official Python Tutorial `__ 96 | - `Scipy Lecture Notes `__ 97 | - `A Visual Intro to NumPy and Data Representation `__ 98 | 99 | 100 | Matlab 101 | ------ 102 | 103 | MATLAB is a multi-paradigm numerical computing environment and proprietary programming language developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, C#, Java, Fortran and Python. 104 | 105 | **Resources** 106 | 107 | - `MIT online course `__ 108 | - `MATLAB official website `__ 109 | 110 | -------------------------------------------------------------------------------- /source/seismology/index.rst: -------------------------------------------------------------------------------- 1 | Seismology 2 | ========== 3 | 4 | 5 | .. toctree:: 6 | 7 | intro/index 8 | seismic-source/index 9 | seismic-wave/index 10 | seismic-station/index 11 | seismic-data/index 12 | seismological-tools/index 13 | -------------------------------------------------------------------------------- /source/seismology/intro/global-eqs-station.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/intro/global-eqs-station.png -------------------------------------------------------------------------------- /source/seismology/intro/global-waves.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/intro/global-waves.png -------------------------------------------------------------------------------- /source/seismology/intro/index.rst: -------------------------------------------------------------------------------- 1 | Introduction to Seismology 2 | ========================== 3 | 4 | Introduction 5 | ------------ 6 | 7 | Keiiti Aki & Paul G. Richards, *Quantitative Seismology: Theory and Methods*: 8 | 9 | **Seismology is a science based on data called seismograms, which are records of mechanical vibrations of the Earth. These vibrations may be caused artificially by man-made explosions, or they may be caused naturally by earthquakes and volcanic eruptions.** 10 | 11 | 12 | Earthquakes create seismic waves that travel through the Earth. By analyzing these seismic waves, seismologists can explore the Earth's deep interior. 13 | 14 | On 1994 Jan. 17, a magnitude 6.9 earthquake near Northridge, California released energy equivalent to almost 2 billion kilograms of high explosive. It created seismic waves that travelled throughout the Earth's interior and were recorded at seismic stations aroung the world. The paths of some of those seismic waves and the ground motion that they caused at various locations are shown below. 15 | 16 | .. figure:: global-waves.png 17 | :alt: global waves 18 | :width: 95.0% 19 | :align: center 20 | 21 | Exploring the Earth Using Seismology (From https://www.iris.edu/hq/inclass/fact-sheet/exploring_earth_using_seismology) 22 | 23 | Although the seismic waves are generated together, they travel at different speeds. Shear waves (S waves), for example, travel through the Earth at approximately one-half the speed of compressional waves (P waves). Stations close the earthquake record strong P, S and Surface waves in quick succession just after the earthquake occurred. Stations farther away record the arrival of these waves after a few minutes, and the times between the arrivals are greater. 24 | 25 | At about 100 degrees distance from the earthquake, the travel paths of P and S waves start to touch the edge of the Earth's outer core. Beyond this distance, the first arriving wave, i.e., the P wave, decreases in size and then disappears. P waves that travel through the outer are called the PKP waves. They start to appear beyond 140 degrees. The distance between 100 and 140 degrees is often referred to as the "Shadow zone". 26 | 27 | We do not see shear (S) waves passing through the outer core. Because liquids can not be sheared, we infer that the outer core is molten. We do, however, see waves that travel through the outer core as P waves, and then transform into S waves as they go through the inner core. Because the inner core does transmit shear energy, we assume it is solid. 28 | 29 | 30 | Key Information in Seismic Data 31 | ------------------------------- 32 | 33 | The most commonly used seismic data is arrival times which are the most robust observations. Meanwhile, seismologist have also been trying to use amplitudes and waveforms to obtain more contrains on seismic sources and strutures. 34 | 35 | 36 | .. figure:: seismic-key-obs.png 37 | :alt: key information in seismic data 38 | :width: 95.0% 39 | :align: center 40 | 41 | Three key information in seismic data (Fig. 1.1 in Modern Global Seismology) 42 | 43 | 44 | Global Earthquakes and Stations 45 | ------------------------------- 46 | 47 | Global earthquakes and stations are not evenly distributed. Most earthquakes occur along the plate boundaries. The seismic stations are mostly installed on the continent. 48 | 49 | .. figure:: global-eqs-station.png 50 | :alt: global earthquakes and seismic stations 51 | :width: 95.0% 52 | :align: center 53 | 54 | All seismic stations (blue) from IRIS-DMC and events (yellow) in ISC-EHB catalog (1960-2014) 55 | 56 | 57 | Resources 58 | --------- 59 | 60 | - `Remote Online Sessions for Emerging Seismologists `__: a very good seismological course for Ph.D. students 61 | - `seisman's blog `__: the most popular Chinese blog about seismology 62 | - `Seismological Networks `__ 63 | - `Encyclopedia of Solid Earth Geophysics `__ 64 | 65 | 66 | -------------------------------------------------------------------------------- /source/seismology/intro/seismic-key-obs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/intro/seismic-key-obs.png -------------------------------------------------------------------------------- /source/seismology/seismic-data/12Z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/seismic-data/12Z.png -------------------------------------------------------------------------------- /source/seismology/seismic-data/NEZ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/seismic-data/NEZ.png -------------------------------------------------------------------------------- /source/seismology/seismic-data/RTZ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/seismic-data/RTZ.png -------------------------------------------------------------------------------- /source/seismology/seismic-data/coordinate-systems.rst: -------------------------------------------------------------------------------- 1 | Coordinate Systems 2 | ================== 3 | 4 | The ground motion can be described quantitatively as displacement, velocity or acceleration, which is a vector. Modern seismometers include three separate channels, which can record the simultaneous movement in three orthogonal directions, e.g., North, East and vertical Upward (NEZ). 5 | 6 | 7 | NEZ Coordinate System 8 | --------------------- 9 | 10 | NEZ coordinate system is the most commonly used coordinate system 11 | 12 | - ``N``: north is positive, south is negative 13 | - ``E``: east is positive, west is negative 14 | - ``Z``: vertical upward is positive, vertical downward is negative 15 | 16 | .. figure:: NEZ.png 17 | :alt: NEZ coordinate system 18 | :width: 50.0% 19 | :align: center 20 | 21 | NEZ coordinate system (From https://service.iris.edu/irisws/rotation/docs/1/help/) 22 | 23 | 24 | RTZ Coordinate System 25 | --------------------- 26 | 27 | In real researches, we usually rotate the raw three component data from NEZ system to RTZ system. The RTZ system is a coordinate system defined by locations of earthquakes and stations, which varies for different earthquake-station pairs. 28 | 29 | - ``R``: pointing from the earthquake location to the station location 30 | - ``Z``: vertical upward 31 | - ``T``: perpendicular to the plane of Z and R direction. The choice of T direction makes the RTZ coordinate system a left-handed system. 32 | 33 | .. figure:: RTZ.png 34 | :alt: RTZ coordinate system 35 | :width: 50.0% 36 | :align: center 37 | 38 | RTZ coordinate system (From https://service.iris.edu/irisws/rotation/docs/1/help/) 39 | 40 | 41 | 12Z Coordinate System 42 | --------------------- 43 | 44 | Sometimes, the two horizontal components may be not aligned with North and East. The arbitrary orientations have been assigned components of 1 & 2. The third component should still be vertical upward. 45 | 46 | .. figure:: 12Z.png 47 | :alt: 12Z coordinate system 48 | :width: 50.0% 49 | :align: center 50 | 51 | 12Z coordinate system (From https://service.iris.edu/irisws/rotation/docs/1/help/) 52 | 53 | 54 | Component Rotation 55 | ------------------ 56 | 57 | - IRISWS Rotation: https://service.iris.edu/irisws/rotation/docs/1/help/ 58 | - SAC rotate: https://seisman.github.io/SAC_Docs_zh/data-process/rotate/ 59 | 60 | We can rotate seismic waveform in one coordinate system to anther one so that we can better analyize the data. 61 | 62 | Here is an example of rotating seismic data in NEZ to RTZ. We can see noticeable P waves in R and Z components and S waves in all three components. We can also see noticeable Love wave in T component and Rayleigh wave in R and Z components. 63 | 64 | .. figure:: rotate-SAC_Docs_zh.png 65 | :alt: rotate from NEZ to RTZ 66 | :width: 95.0% 67 | :align: center 68 | 69 | Rotation from NEZ to RTZ (From https://seisman.github.io/SAC_Docs_zh/data-process/rotate/) 70 | 71 | -------------------------------------------------------------------------------- /source/seismology/seismic-data/index.rst: -------------------------------------------------------------------------------- 1 | Seismic Data 2 | ============ 3 | 4 | 5 | .. toctree:: 6 | 7 | seismic-time-series-data 8 | coordinate-systems 9 | -------------------------------------------------------------------------------- /source/seismology/seismic-data/rotate-SAC_Docs_zh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/seismic-data/rotate-SAC_Docs_zh.png -------------------------------------------------------------------------------- /source/seismology/seismic-data/seismic-time-series-data.rst: -------------------------------------------------------------------------------- 1 | Seismic Time Series Data 2 | ======================== 3 | 4 | Seismic time series data is seismogram waveforms recorded at seismic stations. We mostly use digital data, which is a time series of velocity of the ground shaking. 5 | 6 | Besides the waveform itself, metadata describes critical information of the waveform data. Metadata can include station information, earthquake information, instrument response, etc. 7 | 8 | 9 | Time Series Data Formats 10 | ------------------------ 11 | 12 | There are many different seismic data formats in seismology community. The most commonly used formats are SAC, miniSEED and SEED. 13 | 14 | - **SAC** is a good format for data analysis, though difficult for storing. This format is defined by the software SAC (Seismic Analysis Codes), although it is supported by many other tools 15 | - **SEED** (Standard for the Exchange of Earthquake Data) is a data format intended primarily for the archival and exchange of seismological time series data and related metadata. The latest `SEED 2.4 `__ is published in 2012. 16 | - **miniSEED** is the subset of the SEED standard that is used for time series data. Very limited metadata for the time series is included in miniSEED beyond time series identification and simple state-of-health flags. In particular, geographic coordinates, response/scaling information and other information needed to interpret the data values are not included. 17 | 18 | 19 | Data Naming and Channels 20 | ------------------------ 21 | 22 | **Naming Convections:** https://seisman.github.io/SAC_Docs_zh/appendix/naming-convections/ 23 | 24 | The file names of seismic data are usually like, ``BK.BKB.00.BHZ.SAC``. 25 | 26 | - ``BK``: network code 27 | - ``BKB``: station identifier 28 | - ``00``: location identifier 29 | - ``BHZ``: channel code 30 | - ``SAC``: suffix. It does not mean anything. You can even have no suffix. 31 | 32 | 33 | Location Identifier 34 | ++++++++++++++++++++ 35 | 36 | **The Location Identifier:** http://ds.iris.edu/ds/newsletter/vol1/no1/1/specification-of-seismograms-the-location-identifier/ 37 | 38 | IRIS DMC now need an additional parameter to uniquely identify a seismogram. The Location Identifier is a two character code that, when used in conjunction with the other data specifiers, uniquely identifies a data stream. 39 | 40 | In the case of GSN data the Location Identifier is employed to distinguish between multiple sensors with identical station and channel names. For example, several GSN stations are equipped with both STS-1 and STS-2 broadband high gain seismometers. Both sensors have channel names beginning with BH. Recently support for the Location Identifier was added resolve this issue of non-uniqueness. 41 | 42 | Valid characters for location identifiers are [space, 0-9, A-Z][space, 0-9, A-Z]. So space-space is a legitimate Location Identifier. 43 | 44 | Suggested usage of Location Identifiers for data from the GSN is as follows. Numbers [0-9][0-9] should be used for multiple instruments at one station. For instance if you have an STS-1 and and STS-2 BHZ channel the location id could be: 45 | 46 | - ``00`` for the STS-1 (primary stream) 47 | - ``10`` for the STS-2 ( the secondary stream) 48 | - ``20`` for other sensors, etc 49 | 50 | Channel Code 51 | ++++++++++++ 52 | 53 | - **SEED Channel Naming:** https://ds.iris.edu/ds/nodes/dmc/data/formats/seed-channel-naming/ 54 | - **Time Series Data Channels:** http://ds.iris.edu/ds/nodes/dmc/tools/data_channels/#??? 55 | 56 | The Channel Code is a 3-character code that specifies the bandwidth of the recorded signal, type, and orientation of the sensor. For instance, a channel code of ``BHZ`` is used to indicate the signal came from a broadband (B), high gain seismometer (H) and is recording ground motion in the vertical (Z) direction. 57 | 58 | **Band Code:** The first letter specifies the general sampling rate and the response band of the instrument. 59 | 60 | .. table:: Band Code 61 | 62 | +-----------------+-----------------+-----------------+---------------------+ 63 | | Band Code | Band type | Sample rate (Hz)| Corner period (sec) | 64 | +=================+=================+=================+=====================+ 65 | | F | ... | 1000-5000 | > 10 | 66 | +-----------------+-----------------+-----------------+---------------------+ 67 | | G | ... | 1000-5000 | < 10 | 68 | +-----------------+-----------------+-----------------+---------------------+ 69 | | D | ... | 250-1000 | < 10 | 70 | +-----------------+-----------------+-----------------+---------------------+ 71 | | C | ... | 250-1000 | > 10 | 72 | +-----------------+-----------------+-----------------+---------------------+ 73 | | E | Extremely Short | 80-250 | < 10 | 74 | | | Period | | | 75 | +-----------------+-----------------+-----------------+---------------------+ 76 | | S | Short Period | 10-80 | < 10 | 77 | +-----------------+-----------------+-----------------+---------------------+ 78 | | H | High Broad Band | 80-250 | < 10 | 79 | +-----------------+-----------------+-----------------+---------------------+ 80 | | B | Broad Band | 10-80 | > 10 | 81 | +-----------------+-----------------+-----------------+---------------------+ 82 | | M | Mid Period | 1-10 | > 10 | 83 | +-----------------+-----------------+-----------------+---------------------+ 84 | | L | Long Period | :math:`\approx` | | 85 | | | | 1 | | 86 | +-----------------+-----------------+-----------------+---------------------+ 87 | | V | Very Long | :math:`\approx` | | 88 | | | Period | 0.1 | | 89 | +-----------------+-----------------+-----------------+---------------------+ 90 | | U | Ultra Long | :math:`\approx` | | 91 | | | Period | 0.01 | | 92 | +-----------------+-----------------+-----------------+---------------------+ 93 | | R | Extremely Long | 0.0001-0.001 | | 94 | | | Period | | | 95 | +-----------------+-----------------+-----------------+---------------------+ 96 | | P | Order of 0.1 to | 0.00001-0.0001 | | 97 | | | 1 days | | | 98 | +-----------------+-----------------+-----------------+---------------------+ 99 | | T | Order of 1 to | 0.000001-0.0000 | | 100 | | | 10 days | 1 | | 101 | +-----------------+-----------------+-----------------+---------------------+ 102 | | Q | Greater than 10 | < 0.000001 | | 103 | | | days | | | 104 | +-----------------+-----------------+-----------------+---------------------+ 105 | | A | Administrative | variable | NA | 106 | | | Instrument | | | 107 | | | Channel | | | 108 | +-----------------+-----------------+-----------------+---------------------+ 109 | | O | Opaque | variable | NA | 110 | | | Instrument | | | 111 | | | Channel | | | 112 | +-----------------+-----------------+-----------------+---------------------+ 113 | 114 | 115 | **Instrument Code:** The second letter specifies the family to which the sensor belongs. In essence, this identifies what is being measured. 116 | 117 | .. table:: Instrument Code (Seismometer) 118 | :align: center 119 | 120 | =============== ========================= 121 | Instrument Code Notes 122 | =============== ========================= 123 | ``H`` High Gain Seismometer 124 | ``L`` Low Gain Seismometer 125 | ``G`` Gravimeter 126 | ``M`` Mass position Seismometer 127 | ``N`` Accelerometer 128 | ``P`` Geophone 129 | =============== ========================= 130 | 131 | We usually see high hain seismometer (``H``), which records the velocity of ground motion. For seismic tomography, low gain seismometer (``L``) and geophone (``P``) can also be used. 132 | 133 | 134 | **Orientation Code:** The third letter indicates the directionality of the sensor measurement. See :doc:`coordinate-systems` for details. 135 | 136 | .. table:: Orientation Code 137 | :align: center 138 | 139 | ================= ======================================================================================= 140 | Orientation Code 说明 141 | ================= ======================================================================================= 142 | ``N E Z`` Traditional (North-South, East-West, Vertial) 143 | ``1 2 3`` Orthogonal components but non traditional orientations (3: vertical; 1 & 2: horizontal) 144 | ``R T Z`` Transverse, Radial, Vertical 145 | ================= ======================================================================================= 146 | 147 | -------------------------------------------------------------------------------- /source/seismology/seismic-source/earthquake-catalogs.rst: -------------------------------------------------------------------------------- 1 | Earthquake Catalogs 2 | =================== 3 | 4 | Global Earthquake Catalog 5 | ------------------------- 6 | 7 | ISC catalog 8 | +++++++++++ 9 | 10 | ISC (International Seismological Centre) catalog is usually considered to be the final catalog of global earthquake data. In ISC catalog, earthquake information are automatically determined, and then manually checked by ISC analysts and relocated if possible (when there are sufficient data). The manually reviewed ISC catalog is typically 24 months behind real-time, and is currently (2020-11-28) up to 2018-08-01. 11 | 12 | - Homepage: http://www.isc.ac.uk/iscbulletin/ 13 | - Search: http://www.isc.ac.uk/iscbulletin/search/ 14 | - Time range: 1900 - now 15 | 16 | 17 | ISC-EHB catalog 18 | +++++++++++++++ 19 | 20 | The ISC-EHB catalog is a dataset of teleseismically well constrained events. ISC-EHB is a groomed version of the ISC catalog. Earthquake information in this catalog is more accurate. It is suitable for seismicity studies and tomographic inversion, but not for seismic hazard studies as the catalog is incomplete. 21 | 22 | - Homepage: http://www.isc.ac.uk/isc-ehb/ 23 | - Search: http://www.isc.ac.uk/isc-ehb/search/ 24 | - Time range: 1964 - 2016 (last accessed, 2020-11-28) 25 | 26 | 27 | ISC-GEM catalog 28 | +++++++++++++++ 29 | 30 | The ISC-GEM catalog is a dataset for large earthquakes (magnitude 5.5 and above, plus continental events down to magnitude 5.0). It aims to adapt and substantially extend and improve currently existing bulletin data for large earthquakes. 31 | 32 | - Homepage: http://www.isc.ac.uk/iscgem/ 33 | - Download: http://www.isc.ac.uk/iscgem/download.php/ 34 | - Time range: 1904 - 2016 (last accessed, 2020-11-28) 35 | 36 | 37 | IRIS-DMC fdsnws-event 38 | +++++++++++++++++++++ 39 | 40 | The IRIS-DMC fdsnws-event web service returns earthquake information from catalogs originating from the USGS and the ISC data centers. By default, events are retrieved from the USGS PDE catalog for recent events and then the ISC catalog when it becomes available. As it is a collection of first-run bulletins from the NEIC and ISC, the results returned should be considered **NON AUTHORITATIVE** and **NOT CURRENT** for the purposes of seismic study. 41 | 42 | - Homepage: http://service.iris.edu/fdsnws/event/1 43 | 44 | 45 | CENC Catalog 46 | ++++++++++++ 47 | 48 | The CENC (China Earthquake Networks Center) catalog is a unified and formal earthquake catalog, produced by CENC. 49 | 50 | - Homepage: http://data.earthquake.cn/datashare/report.shtml?PAGEID=earthquake_zhengshi 51 | - Time range: 2008/12/29 - now 52 | 53 | 54 | USGS ANSS ComCat 55 | ++++++++++++++++ 56 | 57 | The ANSS (Advanced National Seismic System) Comprehensive Earthquake Catalog (ComCat) is a database of earthquakes collected by USGS. `Many data centers `__ contribute to this catalog. In most cases, USGS locates and reports on earthquakes worldwide of magnitude 5.0 and larger in 30 minutes or less. Additionally, USGS locates and reports on earthquakes magnitude 4.0 and larger within the contiguous US and populated regions of Alaska within 30 minutes. The catalog should not be considered to be complete lists of all events in the US and adjacent areas and especially should not be considered to be complete lists of all events M4.5+ in the world. Historic regional seismic network catalogs have not yet been fully loaded into the ANSS ComCat and can be found in `Northern California Earthquake Data Center `__. 58 | 59 | - Homepage: https://earthquake.usgs.gov/data/comcat/ 60 | - Search: https://earthquake.usgs.gov/earthquakes/search/ 61 | - ANSS ComCat-related codes: https://github.com/usgs/devcorner/ 62 | - Time range: 1638 - now 63 | 64 | 65 | USGS PDE catalog 66 | ++++++++++++++++ 67 | 68 | PDE catalog stands for Preliminary Determination of Epicenters, produced by the National Earthquake Information Center (NEIC) of the US Geological Servey (USGS). The determination of earthquake properties is automatic and almost real-time. Thus, USGS PDE catalog may be the earliest one to give information of an earthquake occurred a few minutes ago. A brief Chinese introduction can be found `here `__. PDE catalog also contributes to the `ANSS ComCat `__. 69 | 70 | - Homepage: https://earthquake.usgs.gov/data/comcat/catalog/us/ 71 | - Time range: 1964 – now 72 | 73 | 74 | EMSC catalog 75 | ++++++++++++ 76 | 77 | The EMSC (European-Mediterranean Seismological Centre) catalog is a database of earthquakes collected by EMSC. 78 | 79 | - Homepage: https://www.emsc-csem.org/ 80 | - Search: https://www.emsc-csem.org/Earthquake/?filter=yes/ 81 | - Time range: 2004 - now 82 | 83 | 84 | Global Historical Earthquake Catalog 85 | ++++++++++++++++++++++++++++++++++++ 86 | 87 | The global historical earthquake catalog is a database of historical earthquakes. It was developed by an international consortium, comprising Istituto Nazionale di Geofisica e Vulcanologia (INGV) and the British Geological Survey (BGS), in collaboration with experts from around the globe. A detailed introduction can be found `here `__. 88 | 89 | - Homepage: https://emidius.eu/GEH/ 90 | - Time range: 1000 - 1903 91 | 92 | 93 | Regional Earthquake Catalog 94 | --------------------------- 95 | 96 | China Historical Earthquake Catalog 97 | +++++++++++++++++++++++++++++++++++ 98 | 99 | The China historical earthquake catalog is a database of historical earthquakes with magnitudes larger than 4.0 in China. 100 | 101 | - Homepage: http://data.earthquake.cn/data/data/history_query.jsp/ 102 | - Time range: 1831 BC - 1969 103 | 104 | 105 | JMA Unified Hypocenter Catalog (Preliminary) 106 | ++++++++++++++++++++++++++++++++++++++++++++ 107 | 108 | JMA (Japan Meteorological Agency) produces a single hypocenter catalog. The preliminary JMA unified hypocenter catalog can be used as a reference for using the waveform data available on Hinet website. The information in this catalog are preliminary results, and JMA sometimes revises them. A chinese brief introduction can be found `here `__. 109 | 110 | - Homepage: https://hinetwww11.bosai.go.jp/auth/JMA/jmalist.php/ 111 | - Time range: 2002/01 - now 112 | 113 | 114 | JMA Unified Hypocenter Catalog 115 | ++++++++++++++++++++++++++++++ 116 | 117 | JMA provides the final version of JMA unified hypocenter catalog. When using the JMA unified hypocenter catalogs for research, study, or job, we are strongly encouraged to use the final version instead of the preliminary version. 118 | 119 | - Homepage: http://www.data.jma.go.jp/svd/eqev/data/bulletin/hypo_e.html 120 | - Time range: 1919 - 2019/02 (last accessed on 2020-11-28) 121 | 122 | 123 | SCSN Catalog 124 | ++++++++++++ 125 | 126 | SCSN (Southern California Seismic Network) has compiled all available historic seismic data holdings in southern California to create a single earthquake catalog. 127 | 128 | - Homepage: https://scedc.caltech.edu/eq-catalogs/ 129 | - Search: https://service.scedc.caltech.edu/eq-catalogs/date_mag_loc.php 130 | - Time range: 1932 - now 131 | 132 | 133 | SC Alternate Catalogs 134 | +++++++++++++++++++++ 135 | 136 | The SCSN catalog does not account for local variations in the seismic velocity structure, which limits the accuracy of its event locations. By applying various techniques in post-processing of the data, it is possible to improve location accuracy. 137 | 138 | - Homepage: https://scedc.caltech.edu/research-tools/altcatalogs.html 139 | 140 | 141 | NCSN Catalog 142 | ++++++++++++ 143 | 144 | NCSN (Northern California Seismic Network) produces earthquake catalogs in northern California. 145 | 146 | - Homepage: https://ncedc.org/ncedc/catalog-search.html 147 | - Time range: 1967 - now 148 | 149 | 150 | Canada Catalog 151 | ++++++++++++++ 152 | 153 | - Homepage: https://www.earthquakescanada.nrcan.gc.ca/stndon/NEDB-BNDS/index-en.php 154 | - Search: https://www.earthquakescanada.nrcan.gc.ca/stndon/NEDB-BNDS/bulletin-en.php 155 | - Time range: 1985 - now 156 | 157 | 158 | European-Mediterranean Catalog 159 | ++++++++++++++++++++++++++++++ 160 | 161 | The European-Mediterranean catalog is a seismological product of the EMSC. It is based on the comprehensive collection of bulletins and arrivals provided by networks operating in the region. The EMSC 2014 General Assembly, held during the European Seismological Commission 2014 in Istanbul, decided to stop the production of the catalog. `ISC `__ is now in charge it. 162 | 163 | - Homepage: https://www.emsc-csem.org/Bulletin/ 164 | - Search: https://www.emsc-csem.org/Bulletin/search.php?filter=yes/ 165 | - Time range: 1998 - 2012 166 | 167 | 168 | SHARE European Earthquake Catalogue 169 | +++++++++++++++++++++++++++++++++++ 170 | 171 | SHEEC (1900-2006) represents a temporal and spatial excerpt of the European-Mediterranean catalog. It is compiled by GFZ Potsdam. 172 | 173 | - Homepage: https://www.gfz-potsdam.de/en/section/seismic-hazard-and-risk-dynamics/data-products-services/sheec-earthquake-catalogue/ 174 | - Time range: 1900-2006 175 | 176 | 177 | European Historical Earthquake Catalog 178 | ++++++++++++++++++++++++++++++++++++++ 179 | 180 | - Homepage: https://www.emidius.eu 181 | - European Archive of Historical Earthquake Data (AHEAD) 182 | 183 | - Homepage: https://www.emidius.eu/AHEAD 184 | - Time range: 1000 - 1899 185 | 186 | - Share European Earthquake Catalogue (SHEEC) 187 | 188 | - Homepage: https://www.emidius.eu/SHEEC 189 | - Time range: 1000 - 1899 190 | 191 | 192 | Australia Catalog 193 | +++++++++++++++++ 194 | 195 | - Homepage: https://earthquakes.ga.gov.au 196 | 197 | 198 | Slow Earthquake Catalog 199 | ----------------------- 200 | 201 | - Slow Earthquake Database: http://www-solid.eps.s.u-tokyo.ac.jp/~sloweq/ 202 | - World Tremor Database: http://www-solid.eps.s.u-tokyo.ac.jp/~idehara/wtd0/Welcome.html 203 | 204 | 205 | Focal Mechanism Catalog 206 | ----------------------- 207 | 208 | - Global CMT (Global Centroid-Moment-Tensor): global earthquakes with magnitudes larger than 5 209 | 210 | - Homepage: https://www.globalcmt.org 211 | - Chinese Introduction: https://blog.seisman.info/global-cmt 212 | 213 | - ISC Bulletin focal mechanism: http://www.isc.ac.uk/iscbulletin/search/fmechanisms 214 | - Taiwan (China) BATS CMT Catalog Search: http://tecws.earth.sinica.edu.tw/BATS/cmtbyform.php 215 | - NIED focal mechnism 216 | 217 | - NIED Moment Tensor solutions: http://www.fnet.bosai.go.jp/event/joho.php?LANG=en 218 | - NIED Earthquake Mechanism Search: http://www.fnet.bosai.go.jp/event/search.php?LANG=en 219 | 220 | - JMA focal mechnism catalog: https://www.data.jma.go.jp/svd/eqev/data/bulletin/index_e.html 221 | 222 | - JMA CMT Catalog: http://www.data.jma.go.jp/svd/eqev/data/bulletin/cmt_e.html 223 | - JMA Nodal Plane Solution: http://www.data.jma.go.jp/svd/eqev/data/bulletin/mech_e.html 224 | - JMA focal mechanism catalog: https://hinetwww11.bosai.go.jp/auth/JMA/?LANG=en: Focal mechanism based on JMA Unified Hypocenter Catalog (Preliminary) 225 | 226 | - Hi-net AUQA Focal Mechanism Catalog: http://www.hinet.bosai.go.jp/AQUA/aqua_catalogue.php?LANG=en 227 | - NCSN Moment tensor catalog: http://www.ncedc.org/ncedc/catalog-search.html 228 | - SCSN Moment tensor catalog: http://service.scedc.caltech.edu/eq-catalogs/CMTsearch.php 229 | - SLU Moment Tensor Solutions: http://www.eas.slu.edu/eqc/eqcmt.html 230 | - EMSC Moment Tensors solutions: https://www.emsc-csem.org/Earthquake/index_tensors.php 231 | - Italian Time Domain Moment Tensor Catalogue: http://cnt.rm.ingv.it/en/tdmt 232 | 233 | -------------------------------------------------------------------------------- /source/seismology/seismic-source/index.rst: -------------------------------------------------------------------------------- 1 | Seismic Source 2 | ============== 3 | 4 | .. toctree:: 5 | 6 | intro 7 | earthquake-catalogs 8 | -------------------------------------------------------------------------------- /source/seismology/seismic-source/intro.rst: -------------------------------------------------------------------------------- 1 | Introduction 2 | ============ 3 | 4 | Seismic source is the source that can cause ground motion recorded by seismic stations. Earthquake is one of the most common seismic sources. 5 | 6 | The three most fundamental source parameters of an earthquake is its origin time (when it occurs), location or hypocenter (longitude, latitude and depth), and magnitude (how big it is). 7 | 8 | 9 | Event Metadata Formats 10 | ---------------------- 11 | 12 | There are many metadata formats to record source paramters. 13 | 14 | - ``text``: plain text 15 | - ``csv``: "comma separated values" ASCII text 16 | - ``quakeml``: a flexible, extensible and modular XML representation of seismological data 17 | - ``geojson``: a format for encoding a variety of geographic data structures uses the JSON standard 18 | - ``kml``: Google's Keyhole Markup Language 19 | - ``xml``: Extensible Markup Language 20 | 21 | -------------------------------------------------------------------------------- /source/seismology/seismic-station/az-baz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/seismic-station/az-baz.png -------------------------------------------------------------------------------- /source/seismology/seismic-station/how-station-work.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/seismic-station/how-station-work.png -------------------------------------------------------------------------------- /source/seismology/seismic-station/incidence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/seismic-station/incidence.png -------------------------------------------------------------------------------- /source/seismology/seismic-station/index.rst: -------------------------------------------------------------------------------- 1 | Seismic Station 2 | =============== 3 | 4 | Seismograph 5 | ----------- 6 | 7 | A **seismograph** is a device for measuring the movement of the earth, and consists of a ground-motion detection sensor called a **seismometer**, coupled with a recording system called **data logger**. The recorded ground motion is called a **seismogram**. 8 | 9 | Seismometers used in earthquake studies are highly sensitive to ground movements, so that movements as small as 1 nanometer (distances almost as small as atomic spacing) can be detected at very quiet sites. 10 | 11 | .. figure:: seismograph-illustration.png 12 | :alt: seismograph 13 | :width: 50.0% 14 | :align: center 15 | 16 | Illustrations of a Seismometer (From https://www.iris.edu/hq/inclass/fact-sheet/how_does_a_seismometer_work) 17 | 18 | When seismic wave arrives at a seismometer, the ground motion is recorded and converted to digital records. These data are transmitted continuously to data processing center by cellular telephone, broadband Internet, or satellite communications systems. They will be made available via the Internet to researchers and the general public. 19 | 20 | .. figure:: how-station-work.png 21 | :alt: How does a station work? 22 | :width: 95.0% 23 | :align: center 24 | 25 | How does a seismic station work? (From http://www.usarray.org/public/about/how#anchor1) 26 | 27 | 28 | Station Metadata Formats 29 | ------------------------ 30 | 31 | Station metadata includes information such instrument coordinates, instrument responses, data availablity and quality etc.. 32 | 33 | - `FDSN StationXML schema `__ is a human readable XML representation of the most important and commonly used structures of **SEED 2.4 metadata** (dataless SEED) with enhancements. 34 | - `Dataless SEED `__ contains only station and channel metadata, without any time series values. It is the metadata counterpart to miniSEED, which contain seismic time series data. 35 | - text 36 | 37 | **Convertion Tools:** 38 | 39 | - Dataless SEED and FDSN StationXML: https://seiscode.iris.washington.edu/projects/stationxml-converter 40 | - read_inventory: https://docs.obspy.org/packages/autogen/obspy.core.inventory.inventory.read_inventory.html#obspy.core.inventory.inventory.read_inventory 41 | - inventory.write: https://docs.obspy.org/packages/autogen/obspy.core.inventory.inventory.Inventory.write.html#obspy.core.inventory.inventory.Inventory.write 42 | 43 | 44 | Instrument Response 45 | ------------------- 46 | 47 | At present, we don't need to know details about the instrument response: (1) it is a little complicated; (2) we don't need it for local tomographic studies. 48 | 49 | Some references can be used if the future studies need it. 50 | 51 | - `Data and Metadata in the Remote Online Sessions for Emerging Seismologists `__ 52 | - `Instrument response notes in seisman's blog `__ 53 | - `Instrument response in Chinese SAC Documentation `__ 54 | - `Instrument response in Seismo-Live `__ 55 | - `IRIS DMC Library of Nominal Responses for Seismic Instruments `__ 56 | 57 | 58 | Distance and Angles 59 | ------------------- 60 | 61 | .. figure:: az-baz.png 62 | :alt: azimuth and back azimuth 63 | :width: 50.0% 64 | :align: center 65 | 66 | azimuth and back azimuth (From https://seisman.github.io/SAC_Docs_zh/fileformat/header-variables/#gcarc-dist-az-baz) 67 | 68 | - ``great circle arc``: the great circle arc at the Earth's surface from an earthquake to a station 69 | - ``azimuth``: the direction from an earthquake to the station measured clockwise from north 70 | - ``backazimuth``: the direction from the station towards an earthquake. It's 180° off from the azimuth. 71 | - ``incidence angle``: the angle from vertical at which an incoming ray arrives. A ray arriving from directly below the station would have an incidence of 0°. 72 | 73 | 74 | .. figure:: incidence.png 75 | :alt: incidence angle 76 | :width: 50.0% 77 | :align: center 78 | 79 | incidence angle (From https://service.iris.edu/irisws/rotation/docs/1/help/) 80 | 81 | 82 | Other Seismic Instruments 83 | ------------------------- 84 | 85 | There are also some other seismic instruments which are currently widely used or under development. 86 | 87 | - Ocean Bottom Seismometer (OBS) 88 | - Rotational Seismology 89 | - Distributed Acoustic Sensing (DAS) 90 | 91 | -------------------------------------------------------------------------------- /source/seismology/seismic-station/seismograph-illustration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/seismic-station/seismograph-illustration.png -------------------------------------------------------------------------------- /source/seismology/seismic-wave/Fig1.1-3-An-Introduction-to-Seismology-Earthquakes-and-Earth-Structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/seismic-wave/Fig1.1-3-An-Introduction-to-Seismology-Earthquakes-and-Earth-Structure.png -------------------------------------------------------------------------------- /source/seismology/seismic-wave/Fig1.1-Introduction-to-seismology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/seismic-wave/Fig1.1-Introduction-to-seismology.png -------------------------------------------------------------------------------- /source/seismology/seismic-wave/Fig2.4-3-An-Introduction-to-Seismology-Earthquakes-and-Earth-Structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/seismic-wave/Fig2.4-3-An-Introduction-to-Seismology-Earthquakes-and-Earth-Structure.png -------------------------------------------------------------------------------- /source/seismology/seismic-wave/Fig4.14-Introduction-to-seismology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/seismic-wave/Fig4.14-Introduction-to-seismology.png -------------------------------------------------------------------------------- /source/seismology/seismic-wave/crustal-phases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIGG-NTU/SeisTomo_Tutorials/86b009e17dc5997cf91d16ffd09b6689b35b63df/source/seismology/seismic-wave/crustal-phases.png -------------------------------------------------------------------------------- /source/seismology/seismic-wave/index.rst: -------------------------------------------------------------------------------- 1 | Seismic Wave 2 | ============ 3 | 4 | .. toctree:: 5 | 6 | intro 7 | seismic-phases 8 | -------------------------------------------------------------------------------- /source/seismology/seismic-wave/intro.rst: -------------------------------------------------------------------------------- 1 | Introduction 2 | ============ 3 | 4 | Seismic waves are waves of energy that travel through Earth's interior, and are a result of seismic sources, e.g., earthquakes, volcanic eruptions, landslides and man-made explosions. 5 | 6 | There are two kinds of seismic waves, i.e., body wave and surface wave. Body wave is a seismic wave that moves through the interior of the earth, as opposed to surface waves that travel near the Earth's surface. 7 | 8 | .. figure:: Fig1.1-3-An-Introduction-to-Seismology-Earthquakes-and-Earth-Structure.png 9 | :alt: Fig. 1.1-3 in An Introduction to Seismology Earthquakes and Earth Structure 10 | :width: 95.5% 11 | :align: center 12 | 13 | Left: Long-period vertical component seismogram. Right: Ray paths for the seismic phases labeled on the seismogram. (Fig. 1.1-3 in An Introduction to Seismology Earthquakes and Earth Structure) 14 | 15 | There are two kinds of body waves, i.e., P wave and S wave. P wave produces displacement in the direction of wave propagation and a volume change. S wave produces displacement perpendicular to the direction of wave propagation and distort the material without any volume change. 16 | 17 | .. figure:: Fig2.4-3-An-Introduction-to-Seismology-Earthquakes-and-Earth-Structure.png 18 | :alt: Fig. 2.4-3 in An Introduction to Seismology Earthquakes and Earth Structure 19 | :width: 95.5% 20 | :align: center 21 | 22 | Displacements produced by plane compressional (P) and shear (S) waves, shown by a “snapshot” in time. (Fig. 2.4-3 in An Introduction to Seismology Earthquakes and Earth Structure) 23 | 24 | 25 | .. figure:: Fig1.1-Introduction-to-seismology.png 26 | :alt: Fig 1.1 in Introduction to Seismology (2009) 27 | :width: 50.0% 28 | :align: center 29 | 30 | Earth’s P velocity, S velocity, and density as a function of depth from the Preliminary Reference Earth Model. (Fig. 1.1 in Introduction to Seismology (2009)) 31 | 32 | -------------------------------------------------------------------------------- /source/seismology/seismic-wave/seismic-phases.rst: -------------------------------------------------------------------------------- 1 | Seismic Phases 2 | ============== 3 | 4 | - IASPEI (International Association of Seismology and Physics of the Earth's Interior) standard phase list: http://www.isc.ac.uk/standards/phases/ 5 | - Phase naming in TauP: https://docs.obspy.org/packages/obspy.taup.html#phase-naming-in-obspy-taup 6 | - Notes about multiple P-phases in TauP: https://blog.seisman.info/taup-identify-multiple-P-phases/ 7 | 8 | Please note the IASPEI phase naming is a little different from those in TauP. So, you'd better know what you really mean when you use phase names in TauP. 9 | 10 | Below show some IASPEI phase definitions (**alt**: acceptable alternative name) 11 | 12 | 13 | Crustal Phases 14 | -------------- 15 | 16 | .. figure:: Fig4.14-Introduction-to-seismology.png 17 | :alt: Ray geometries and names for crustal P phases 18 | :width: 95.0% 19 | :align: center 20 | 21 | Ray geometries and names for crustal P phases. 22 | 23 | - **Pg**: At short distances, either an upgoing P wave from a source in the upper crust or a P wave bottoming in the upper crust. At larger distances also arrivals caused by multiple P-wave reverberations inside the whole crust with a group velocity around 5.8 km/s. 24 | - **Pb**: (**alt**: P*) Either an upgoing P wave from a source in the lower crust or a P wave bottoming in the lower crust 25 | - **Pn**: Any P wave bottoming in the uppermost mantle or an upgoing P wave from a source in the uppermost mantle 26 | - **PmP**: P reflection from the outer side of the Moho 27 | - **Sg**: At short distances, either an upgoing S wave from a source in the upper crust or an S wave bottoming in the upper crust. At larger distances also arrivals caused by superposition of multiple S-wave reverberations and SV to P and/or P to SV conversions inside the whole crust. 28 | - **Sb**: (**alt**: S*) Either an upgoing S wave from a source in the lower crust or an S wave bottoming in the lower crust 29 | - **Sn**: Any S wave bottoming in the uppermost mantle or an upgoing S wave from a source in the uppermost mantle 30 | - **SmS**: S reflection from the outer side of the Moho 31 | 32 | .. figure:: crustal-phases.png 33 | :alt: crustal phases 34 | :width: 50.0% 35 | :align: center 36 | 37 | crustal phases (From http://www.isc.ac.uk/standards/phases/) 38 | 39 | 40 | Near Source Surface Reflections (Depth Phases) 41 | ---------------------------------------------- 42 | 43 | - **pP**: Reflection of an upgoing P wave at the free surface 44 | - **sP**: Reflection of an upgoing S wave at the free surface 45 | 46 | -------------------------------------------------------------------------------- /source/seismology/seismological-tools/GMT.rst: -------------------------------------------------------------------------------- 1 | GMT 2 | === 3 | 4 | GMT (Generic Mapping Tools) is the most commonly used software in geophysics community for plotting high-quality beautiful figures, especially maps. 5 | 6 | - **Homepage:** https://www.generic-mapping-tools.org/ 7 | - **Install:** 8 | 9 | - Official: https://www.generic-mapping-tools.org/download/ 10 | - GMT-China: https://docs.gmt-china.org/latest/install/ 11 | 12 | The GMT-China community has developed a very good documentation which you can follow to learn GMT. 13 | 14 | Resources 15 | --------- 16 | 17 | - GMT official documentation: https://docs.generic-mapping-tools.org/latest/ 18 | - GMT-China community: https://gmt-china.org/ 19 | - Chinese documentation: https://docs.gmt-china.org/latest/. For new GMT user, you can quickly follow the first four sections. 20 | 21 | - `GMT brief introduction `_ 22 | - `install GMT `_ 23 | - `GMT introductionary tutorials `_ 24 | - `GMT basis `_ 25 | 26 | - Examples: 27 | 28 | - GMT official examples: https://docs.generic-mapping-tools.org/latest/gallery.html 29 | - GMT-China examples: https://gmt-china.org/gallery/ 30 | - GMT-China blogs: https://gmt-china.org/#posts 31 | - MIGG-NTU examples: https://github.com/MIGG-NTU/SeisFigs_Examples 32 | 33 | -------------------------------------------------------------------------------- /source/seismology/seismological-tools/ObsPy.rst: -------------------------------------------------------------------------------- 1 | ObsPy 2 | ===== 3 | 4 | ObsPy is an open-source project dedicated to provide a Python framework for processing seismological data. It provides parsers for common file formats, clients to access data centers and seismological signal processing routines which allow the manipulation of seismological time series. It is now very popular in seismological community. 5 | 6 | - **Homepage**: https://github.com/obspy/obspy/ 7 | - **Install**: https://github.com/obspy/obspy/wiki#installation 8 | 9 | 10 | Checklist 11 | --------- 12 | 13 | - Core classes: https://docs.obspy.org/packages/obspy.core.html#module-obspy.core 14 | - obspy.taup: https://docs.obspy.org/packages/obspy.taup.html#phase-naming-in-obspy-taup 15 | - FDSN Web Services: https://docs.obspy.org/tutorial/code_snippets/retrieving_data_from_datacenters.html#the-fdsn-web-services 16 | - Waveform Import/Export Plug-ins: https://docs.obspy.org/packages/index.html 17 | 18 | 19 | Resources 20 | --------- 21 | 22 | - ObsPy Documentation: https://docs.obspy.org/contents.html 23 | 24 | - ObsPy tutorial: https://docs.obspy.org/tutorial/ 25 | - ObsPy Library Reference: https://docs.obspy.org/packages/ 26 | 27 | - Remote Online Sessions for Emerging Seismologists: https://www.iris.edu/hq/inclass/lesson/704 28 | - Jupyter Notebooks in Seismo-Live: http://www.seismo-live.org/ 29 | 30 | -------------------------------------------------------------------------------- /source/seismology/seismological-tools/SAC.rst: -------------------------------------------------------------------------------- 1 | SAC 2 | === 3 | 4 | Seismic Analysis Code (SAC) is one of the most commonly used seismic data processing and analysis software in seismological community. 5 | 6 | - **Homepage**: http://ds.iris.edu/ds/nodes/dmc/software/downloads/sac/ 7 | - **Install**: 8 | 9 | - Linux: https://seisman.github.io/SAC_Docs_zh/introduction/linux-install/ 10 | - maxOS: https://seisman.github.io/SAC_Docs_zh/introduction/macOS-install/ 11 | 12 | Those who use WSL have to install **X Window System**. Please refer to one `Chinese manual `__. You may try different X Servers, e.g., ``VcXsrv``. 13 | 14 | 15 | Checklist 16 | --------- 17 | 18 | - Understand the file format of a SAC file 19 | - Understand the meaning of important SAC headers 20 | - commonly used SAC commands: ``read``, ``write``, ``bandpass``, ``rmean``, ``rtrend``, ``taper``, ``plot1``, ``plot2``, ``plotpk`` 21 | - How to read and write SAC files in your own Python/MATLAB/C/Fortran programs 22 | 23 | 24 | Free Online Resources 25 | --------------------- 26 | 27 | - A tutorial by Dr. Dongdong Tian: `SAC-tutorial.pdf `__ and `demo data `__. 28 | - The official SAC Manual: https://ds.iris.edu/files/sac-manual/ 29 | - A tutorial by Prof. Zhigang Peng from Georgia Tech: http://geophysics.eas.gatech.edu/people/zpeng/Teaching/SAC_Tutorial/ 30 | - The Chinese SAC Reference Manual: https://seisman.github.io/SAC_Docs_zh. Although this manual is written in Chinese, it's better than the official manual, at least for some chapters and sections. The manual provides more detailed descriptions on data processing to help beginners using SAC correctly. You can use Google Translate to translate it to English. For a new SAC user, you can quickly look through the first four sections. You can learn details later when you use it to do real data processing. 31 | 32 | - `SAC brief introduction `_ 33 | - `SAC basis `_ 34 | - `SAC format `_ 35 | - `SAC data processing `_ 36 | 37 | Non-free Resources 38 | ------------------ 39 | 40 | - The Seismic Analysis Code: A Primer and User's Guide: https://www.amazon.com/Seismic-Analysis-Code-Primer-Users-ebook/dp/B00MY7K11A 41 | 42 | -------------------------------------------------------------------------------- /source/seismology/seismological-tools/SOD.rst: -------------------------------------------------------------------------------- 1 | SOD 2 | === 3 | 4 | SOD is a Java program to automatically select, download, and pre-process seismic waveform data. 5 | 6 | - **Homepage**: http://www.seis.sc.edu/sod/ 7 | - **Install**: https://blog.seisman.info/sod-notes/#%E5%AE%89%E8%A3%85-sod 8 | 9 | 10 | Checklist 11 | --------- 12 | 13 | - EventArm: How to require event catalog 14 | - NetworkArm: How to require seismic stations 15 | - WaveformArm: How to require seismic data and to do some basic processing 16 | 17 | 18 | Resources 19 | --------- 20 | 21 | - Documentation: http://www.seis.sc.edu/sod/documentation/index.html 22 | - Getting started: http://www.seis.sc.edu/sod/gettingstarted.html 23 | - Ingredient Listing: http://www.seis.sc.edu/sod/ingredients/index.html 24 | - Chinese introduction: https://blog.seisman.info/sod-notes/ 25 | - Some ready-to-use recipes: 26 | 27 | - https://github.com/seisman/SODrecipes 28 | - https://github.com/core-man/SOD.recipes 29 | 30 | -------------------------------------------------------------------------------- /source/seismology/seismological-tools/TauP.rst: -------------------------------------------------------------------------------- 1 | TauP 2 | ==== 3 | 4 | TauP is a software to calculate traveltimes of seismic waves trough the interior of the Earth. 5 | 6 | - **Homepage:** https://www.seis.sc.edu/taup/ 7 | - **Install:** https://blog.seisman.info/taup-install/ 8 | 9 | 10 | Checklist 11 | --------- 12 | 13 | - ``taup_time``: https://blog.seisman.info/taup-calculate-traveltime/ 14 | - ``Phase naming in TauP``: https://docs.obspy.org/packages/obspy.taup.html#phase-naming-in-obspy-taup 15 | 16 | 17 | Resoures 18 | -------- 19 | 20 | - Documentation: After downloading the TauP package and uncompress it, you will find the TauP manual in ``doc/taup.pdf``. 21 | - A series of Chinese blogs: https://blog.seisman.info/tags/TauP/ 22 | - Models: You can find some commonly used 1D Reference Earth Models in ``StdModels``. 23 | 24 | -------------------------------------------------------------------------------- /source/seismology/seismological-tools/index.rst: -------------------------------------------------------------------------------- 1 | Seismological Tools 2 | =================== 3 | 4 | This is a list of seismological tools you may use in your daily research. 5 | 6 | .. toctree:: 7 | 8 | ObsPy 9 | SAC 10 | SOD 11 | TauP 12 | GMT 13 | -------------------------------------------------------------------------------- /source/tomo-theory/index.rst: -------------------------------------------------------------------------------- 1 | Theory 2 | ====== 3 | 4 | Please refer to the lecture resources on 2020-12-21. 5 | -------------------------------------------------------------------------------- /source/tomo-workflow/index.rst: -------------------------------------------------------------------------------- 1 | Workflow 2 | ======== 3 | 4 | ``TODO`` 5 | 6 | --------------------------------------------------------------------------------