Skip to content

Commit b043768

Browse files
authored
Merge pull request #48 from nfsi-canada/v021
V021
2 parents ca2556a + 83a54dc commit b043768

17 files changed

+1157
-849
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ can be used through command-line scripts.
1212

1313
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4281480.svg)](https://doi.org/10.5281/zenodo.4281480)
1414
[![build](https://github.com/nfsi-canada/OBStools/workflows/Build/badge.svg)](https://github.com/nfsi-canada/OBStools/actions)
15-
[![codecov](https://codecov.io/gh/nfsi-canada/OBStools/branch/master/graph/badge.svg)](https://codecov.io/gh/nfsi-canada/OBStools)
15+
<!-- [![codecov](https://codecov.io/gh/nfsi-canada/OBStools/branch/master/graph/badge.svg)](https://codecov.io/gh/nfsi-canada/OBStools) -->
1616

1717
Installation, API documentation, scripts and tutorials are described at https://nfsi-canada.github.io/OBStools/
1818

docs/atacr.rst

Lines changed: 326 additions & 198 deletions
Large diffs are not rendered by default.

docs/comply.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ Usage
103103
.. code-block::
104104
105105
$ comply_calculate -h
106+
107+
#################################################################################
108+
# _ _ _ _ #
109+
# ___ ___ _ __ ___ _ __ | |_ _ ___ __ _| | ___ _ _| | __ _| |_ ___ #
110+
# / __/ _ \| '_ ` _ \| '_ \| | | | | / __/ _` | |/ __| | | | |/ _` | __/ _ \ #
111+
# | (_| (_) | | | | | | |_) | | |_| | | (_| (_| | | (__| |_| | | (_| | || __/ #
112+
# \___\___/|_| |_| |_| .__/|_|\__, |___\___\__,_|_|\___|\__,_|_|\__,_|\__\___| #
113+
# |_| |___/_____| #
114+
# #
115+
#################################################################################
116+
106117
usage: comply_calculate [options] <Station Database>
107118
108119
Script used to calculate compliance functions between various components. The noise data can be those obtained
@@ -189,6 +200,17 @@ In this case we do not need to specify any option and type in a terminal:
189200
190201
$ comply_calculate M08A.pkl
191202
203+
#################################################################################
204+
# _ _ _ _ #
205+
# ___ ___ _ __ ___ _ __ | |_ _ ___ __ _| | ___ _ _| | __ _| |_ ___ #
206+
# / __/ _ \| '_ ` _ \| '_ \| | | | | / __/ _` | |/ __| | | | |/ _` | __/ _ \ #
207+
# | (_| (_) | | | | | | |_) | | |_| | | (_| (_| | | (__| |_| | | (_| | || __/ #
208+
# \___\___/|_| |_| |_| .__/|_|\__, |___\___\__,_|_|\___|\__,_|_|\__,_|\__\___| #
209+
# |_| |___/_____| #
210+
# #
211+
#################################################################################
212+
213+
192214
Path to COMPL_STA/7D.M08A doesn't exist - creating it
193215
194216

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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ can be used through command-line scripts.
1616
:target: https://doi.org/10.5281/zenodo.4281480
1717
.. image:: https://github.com/nfsi-canada/OBStools/workflows/Build/badge.svg
1818
:target: https://github.com/nfsi-canada/OBStools/actions
19-
.. image:: https://codecov.io/gh/nfsi-canada/OBStools/branch/master/graph/badge.svg
20-
:target: https://codecov.io/gh/nfsi-canada/OBStools
2119

2220
.. toctree::
2321
:maxdepth: 1

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project('rfpy', 'c',
2-
version : '0.2.0',
2+
version : '0.2.1',
33
license: 'MIT',
44
meson_version: '>=0.64.0',
55
)

obstools/__init__.py

Lines changed: 72 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
Licence
2525
-------
2626
27-
Copyright 2019 Pascal Audet & Helen Janiszewski
27+
Copyright 2019 Pascal Audet
2828
2929
Permission is hereby granted, free of charge, to any person obtaining a copy
3030
of this software and associated documentation files (the "Software"), to deal
@@ -50,19 +50,14 @@
5050
Dependencies
5151
++++++++++++
5252
53-
The current version has been tested using **Python 3.10** \
54-
The following package is required before install ``obstools``:
55-
56-
- `stdb <https://github.com/paudetseis/StDb>`_
57-
58-
Other required packages (e.g., ``obspy``)
59-
will be automatically installed by ``stdb``.
53+
- `stdb <https://github.com/schaefferaj/StDb>`_
54+
- `obspy <https://github.com/obspy/obspy>`_
6055
6156
Conda environment
6257
+++++++++++++++++
6358
6459
We recommend creating a custom ``conda`` environment
65-
where ``OBStools`` can be installed along with some of its dependencies.
60+
where ``OBStools`` can be installed along with its dependencies.
6661
6762
.. sourcecode:: bash
6863
@@ -78,14 +73,14 @@
7873
7974
.. sourcecode:: bash
8075
81-
pip install stdb
76+
pip install git+https://github.com/schaefferaj/stdb
8277
8378
Installing development branch on GitHub
8479
+++++++++++++++++++++++++++++++++++++++
8580
8681
.. sourcecode:: bash
8782
88-
pip install obstools@git+https://github.com/nfsi-canada/obstools
83+
pip install git+https://github.com/nfsi-canada/obstools
8984
9085
Installing from source
9186
++++++++++++++++++++++
@@ -103,11 +98,75 @@
10398
10499
pip install .
105100
101+
Using local data
102+
----------------
103+
104+
The various scripts packaged with ``OrientPy`` use FDSN web services
105+
through and ``ObsPy`` `Client` to load waveform data. For waveform
106+
data locally stored on your hard drive, the scripts can use a `Client`
107+
that reads a `SeisComP Data Structure
108+
<https://docs.obspy.org/packages/autogen/obspy.clients.filesystem.sds.html>`_
109+
archive containing SAC or miniSEED waveform data. Check out the scripts
110+
``bng_calc`` and ``dl_calc`` below and the argument ``--local-data`` and
111+
``--dtype`` for more details.
112+
113+
Station Metadata
114+
++++++++++++++++
115+
116+
If you have data stored locally on your drive, it is likely you also
117+
have a station `XML <https://www.fdsn.org/xml/station/>`_ file
118+
containing the metadata. The corresponding ObsPy documentation is
119+
`here <https://docs.obspy.org/packages/obspy.core.inventory.html>`_.
120+
121+
To convert the station `XML` file to an input that can be read by
122+
``OrientPy``, you run the command ``gen_stdb station.xml`` (only
123+
available on StDb version 0.2.7), which will create the file
124+
``station.pkl``. If you don't have a station `XML` file but you have
125+
a dataless SEED file, you can convert it first to `XML` using `this
126+
tools <https://seiscode.iris.washington.edu/projects/stationxml-converter>`_.
127+
128+
Waveform Data
129+
+++++++++++++
130+
131+
The SDS folder containing the waveform data has the structure:
132+
133+
.. code-block:: python
134+
135+
archive
136+
+ year
137+
+ network code
138+
+ station code
139+
+ channel code + type
140+
+ one file per day and location, e.g. NET.STA.LOC.CHAN.TYPE.YEAR.DOY
141+
142+
143+
For example:
144+
145+
.. code-block:: python
146+
147+
SDS/
148+
2014/
149+
YH/
150+
LOBS3/
151+
HH1.D/
152+
YH.LOBS3..CH1.D.2014.332
153+
...
154+
155+
156+
Note, the filename does not include the extension (`.MSEED` or `.SAC`),
157+
and the characters `.D` (for type Data) that appear in both the
158+
channel code and the filename. Note also the two dots (`..`). If
159+
there is a location code, it should appear between those dots (e.g.,
160+
for a location code `10`, the corresponding filename should be
161+
`YH.LOBS3.10.HH1.D.2014.332`). There is no location code for the
162+
YH.LOBS3 data, and this field is simply absent from the filenames.
163+
Finally, the day-of-year (DOY) field must be zero-padded to be exactly
164+
3 characters.
106165
"""
107166

108-
__version__ = '0.2.0'
167+
__version__ = '0.2.1'
109168

110-
__author__ = 'Pascal Audet & Helen Janiszewski'
169+
__author__ = 'Pascal Audet'
111170

112171
from . import atacr
113172
from . import comply

0 commit comments

Comments
 (0)