Skip to content

Commit 09327bd

Browse files
authored
Merge pull request #47 from paudetseis/v021
V021
2 parents 73e7ab7 + 8d74fdb commit 09327bd

22 files changed

+942
-1266
lines changed

.github/workflows/deploy.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,22 @@ jobs:
5252
# pytest -v --cov=orientpy ../orientpy/tests/
5353
# bash <(curl -s https://codecov.io/bash)
5454

55-
- name: Make docs
56-
if: matrix.python-version == '3.12'
57-
shell: bash -l {0}
58-
run: |
59-
cd docs
60-
conda install sphinx
61-
pip install sphinx_rtd_theme
62-
make html
63-
touch _build/html/.nojekyll
64-
cd ..
55+
# - name: Make docs
56+
# if: matrix.python-version == '3.12'
57+
# shell: bash -l {0}
58+
# run: |
59+
# cd docs
60+
# conda install sphinx
61+
# pip install sphinx_rtd_theme
62+
# make html
63+
# touch _build/html/.nojekyll
64+
# cd ..
6565

66-
- name: Deploy 🚀
67-
if: matrix.python-version == '3.12'
68-
uses: JamesIves/[email protected]
69-
with:
70-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71-
BRANCH: gh-pages # The branch the action should deploy to.
72-
FOLDER: docs/_build/html # The folder the action should deploy.
73-
CLEAN: true # Automatically remove deleted files from the deploy branch
66+
# - name: Deploy 🚀
67+
# if: matrix.python-version == '3.12'
68+
# uses: JamesIves/[email protected]
69+
# with:
70+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
# BRANCH: gh-pages # The branch the action should deploy to.
72+
# FOLDER: docs/_build/html # The folder the action should deploy.
73+
# CLEAN: true # Automatically remove deleted files from the deploy branch

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# Add any Sphinx extension module names here, as strings. They can be
3030
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3131
# ones.
32-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon']
32+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.viewcode']
3333

3434
autodoc_member_order = 'bysource'
3535

docs/index.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ used in command-line scripts.
1717
:target: https://doi.org/10.5281/zenodo.3905414
1818
.. image:: https://travis-ci.com/paudetseis/RfPy.svg?branch=master
1919
:target: https://travis-ci.com/paudetseis/RfPy
20-
.. image:: https://codecov.io/gh/paudetseis/RfPy/branch/master/graph/badge.svg
21-
:target: https://codecov.io/gh/paudetseis/RfPy
2220

2321
.. note::
2422

@@ -33,9 +31,6 @@ used in command-line scripts.
3331
* ``RfData`` objects are used to calculate single-station and single-event receiver
3432
functions, whereas ``rf`` can handle multiple stations at once.
3533

36-
.. warning::
37-
``RfPy`` was recently updated to fix a problem when running the scripts under Windows OS. The consequence is that version ``0.1.1`` will throw an error if the extension .py is specified when calling the scripts. The accompanying documentation also uses version ``0.2.1`` of ``StDb`` in the Tutorials section.
38-
3934
.. toctree::
4035
:maxdepth: 1
4136
:caption: Quick Links

docs/rfpy.rst

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Install the `StDb` dependency using ``pip`` inside the ``rfpy`` environment:
5858

5959
.. sourcecode:: bash
6060

61-
pip install stdb
61+
pip install stdb@git+https://github.com/schaefferaj/stdb
6262

6363
Installing from GitHub development branch
6464
-----------------------------------------
@@ -83,6 +83,59 @@ Installing from source
8383

8484
pip install .
8585

86+
Using local data
87+
================
88+
89+
The main script packaged with ``RfPy`` uses FDSN web services through and ``ObsPy`` `Client` to load waveform data. For waveform data locally stored on your hard drive, the scripts can use a `Client` that reads a `SeisComP Data Structure <https://docs.obspy.org/packages/autogen/obspy.clients.filesystem.sds.html>`_ archive containing SAC or miniSEED waveform data. Check out the scripts ``rfpy_calc`` below and the argument ``--SDS-path`` and ``--dtype`` for more details.
90+
91+
Station Metadata
92+
----------------
93+
94+
If you have data stored locally on your drive, it is likely you also
95+
have a station `XML <https://www.fdsn.org/xml/station/>`_ file
96+
containing the metadata. The corresponding ObsPy documentation is
97+
`here <https://docs.obspy.org/packages/obspy.core.inventory.html>`_.
98+
99+
You can now use a stationXML (`.xml`) file instead of the StDb `.pkl` format.
100+
Alternatively, you can convert the stationXML file to an StDb `.pkl` file
101+
by running the command ``gen_stdb station.xml`` (these options are only
102+
available on StDb version 0.2.7. If you don't have a station `XML` file but you have
103+
a dataless SEED file, you can convert it first to XML using `this tools <https://seiscode.iris.washington.edu/projects/stationxml-converter>`_.
104+
105+
.. note::
106+
Please note that using the stationXML directly as input means you cannot
107+
correct the orientation of H1 and H2 components using the azimuth correction term stored as ``azcorr`` in the StDb file, as this information is not stored in the stationXML file.
108+
109+
Waveform Data
110+
-------------
111+
112+
The SDS folder containing the waveform data has the structure:
113+
114+
.. code-block:: python
115+
116+
archive
117+
+ year
118+
+ network code
119+
+ station code
120+
+ channel code + type
121+
+ one file per day and location, e.g. NET.STA.LOC.CHAN.TYPE.YEAR.DOY
122+
123+
124+
For example:
125+
126+
.. code-block:: python
127+
128+
SDS/
129+
2014/
130+
YH/
131+
LOBS3/
132+
HH1.D/
133+
YH.LOBS3..CH1.D.2014.332
134+
...
135+
136+
137+
Note, the filename does not include the extension (`.MSEED` or `.SAC`), and the characters `.D` (for type Data) that appear in both the channel code and the filename. Note also the two dots (`..`). If there is a location code, it should appear between those dots (e.g., for a location code `10`, the corresponding filename should be `YH.LOBS3.10.HH1.D.2014.332`). There is no location code for the YH.LOBS3 data, and this field is simply absent from the filenames. Finally, the day-of-year (DOY) field must be zero-padded to be exactly 3 characters.
138+
86139
Basic Usage
87140
===========
88141

0 commit comments

Comments
 (0)