Skip to content

Commit 3c2fef4

Browse files
authored
Merge pull request #50 from nfsi-canada/v021
V021
2 parents 9923d06 + ce0cde1 commit 3c2fef4

17 files changed

+828
-354
lines changed

docs/atacr.rst

Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ Usage
233233
are processed one by one and the data are stored to disk.
234234
235235
positional arguments:
236-
indb Station Database to process from.
236+
indb Station Database to process from. Available formats are:
237+
StDb (.pkl or .csv) or stationXML (.xml)
237238
238239
options:
239240
-h, --help show this help message and exit
@@ -247,7 +248,7 @@ Usage
247248
Specify the Vertical Component Channel Identifier. [Default Z].
248249
249250
Server Settings:
250-
Settings associated with which datacenter to log into.
251+
Settings associated with FDSN datacenters for archived data.
251252
252253
--server SERVER Base URL of FDSN web service compatible server (e.g.
253254
“http://service.iris.edu”) or key string for recognized server (one
@@ -268,16 +269,13 @@ Usage
268269
PGP message in it. [Default None]
269270
270271
Local Data Settings:
271-
Settings associated with defining and using a local data base of pre-downloaded day-long
272-
SAC or MSEED files.
273-
274-
--local-data LOCALDATA
275-
Specify absolute path to a SeisComP Data Structure (SDS) archive
276-
containing day-long SAC or MSEED files(e.g., --local-
277-
data=/Home/username/Data/SDS). See
278-
https://www.seiscomp.de/seiscomp3/doc/applications/slarchive/SDS.html
279-
for details on the SDS format. If this option is used, it takes
280-
precedence over the --server-wf settings.
272+
Settings associated with a SeisComP database for locally archived data.
273+
274+
--SDS-path LOCALDATA Specify absolute path to a SeisComP Data Structure (SDS) archive containing
275+
day-long SAC or MSEED files(e.g., --SDS-path=/Home/username/Data/SDS). See
276+
https://www.seiscomp.de/seiscomp3/doc/applications/slarchive/SDS.html for
277+
details on the SDS format. If this option is used, it takes precedence over
278+
the --server settings.
281279
--dtype DTYPE Specify the data archive file type, either SAC or MSEED. Note the
282280
default behaviour is to search for SAC files. Local archive files
283281
must have extensions of '.SAC' or '.MSEED'. These are case dependent,
@@ -340,7 +338,8 @@ Usage
340338
look for data saved in the previous steps and use all available components.
341339
342340
positional arguments:
343-
indb Station Database to process from
341+
indb Station Database to process from. Available formats are:
342+
StDb (.pkl or .csv) or stationXML (.xml)
344343
345344
optional arguments:
346345
-h, --help show this help message and exit
@@ -445,7 +444,8 @@ Usage
445444
stations are processed one by one and the data are stored to disk.
446445
447446
positional arguments:
448-
indb Station Database to process from.
447+
indb Station Database to process from. Available formats are:
448+
StDb (.pkl or .csv) or stationXML (.xml)
449449
450450
optional arguments:
451451
-h, --help show this help message and exit
@@ -536,7 +536,8 @@ Usage
536536
processed one by one and the data are stored to disk.
537537
538538
positional arguments:
539-
indb Station Database to process from.
539+
indb Station Database to process from. Available formats are:
540+
StDb (.pkl or .csv) or stationXML (.xml)
540541
541542
optional arguments:
542543
-h, --help show this help message and exit
@@ -616,7 +617,8 @@ Usage
616617
stations are processed one by one and the data are stored to disk.
617618
618619
positional arguments:
619-
indb Station Database to process from.
620+
indb Station Database to process from. Available formats are:
621+
StDb (.pkl or .csv) or stationXML (.xml)
620622
621623
options:
622624
-h, --help show this help message and exit
@@ -629,7 +631,7 @@ Usage
629631
--zcomp ZCOMP Specify the Vertical Component Channel Identifier. [Default Z].
630632
631633
Server Settings:
632-
Settings associated with which datacenter to log into.
634+
Settings associated with FDSN datacenters for archived data.
633635
634636
--server SERVER Base URL of FDSN web service compatible server (e.g.
635637
“http://service.iris.edu”) or key string for recognized server (one
@@ -650,16 +652,13 @@ Usage
650652
PGP message in it. [Default None]
651653
652654
Local Data Settings:
653-
Settings associated with defining and using a local data base of pre-downloaded day-long
654-
SAC or MSEED files.
655-
656-
--local-data LOCALDATA
657-
Specify absolute path to a SeisComP Data Structure (SDS) archive
658-
containing day-long SAC or MSEED files(e.g., --local-
659-
data=/Home/username/Data/SDS). See
660-
https://www.seiscomp.de/seiscomp3/doc/applications/slarchive/SDS.html
661-
for details on the SDS format. If this option is used, it takes
662-
precedence over the --server-wf settings.
655+
Settings associated with a SeisComP database for locally archived data.
656+
657+
--SDS-path LOCALDATA Specify absolute path to a SeisComP Data Structure (SDS) archive containing
658+
day-long SAC or MSEED files(e.g., --SDS-path=/Home/username/Data/SDS). See
659+
https://www.seiscomp.de/seiscomp3/doc/applications/slarchive/SDS.html for
660+
details on the SDS format. If this option is used, it takes precedence over
661+
the --server settings.
663662
--dtype DTYPE Specify the data archive file type, either SAC or MSEED. Note the
664663
default behaviour is to search for SAC files. Local archive files
665664
must have extensions of '.SAC' or '.MSEED'. These are case dependent,
@@ -743,7 +742,8 @@ Usage
743742
folder.
744743
745744
positional arguments:
746-
indb Station Database to process from.
745+
indb Station Database to process from. Available formats are:
746+
StDb (.pkl or .csv) or stationXML (.xml)
747747
748748
optional arguments:
749749
-h, --help show this help message and exit
@@ -1020,6 +1020,20 @@ pass the quality control are colored red.
10201020

10211021
Figure 3b: Daily average PSD of bad (red) and good (black) windows.
10221022

1023+
You can also choose to plot the tilt estimate for DayNoise objects. For intance, you can run:
1024+
1025+
.. code-block::
1026+
1027+
$ atacr_daily_spectra -O --fig-tilt --tilt-freqs=0.,0.005 --start=2012-03-04 --end=2012-03-05 M08A.pkl > logfile
1028+
1029+
which will produce the figure:
1030+
1031+
.. figure:: ../obstools/examples/figures/Figure_tilt_064.png
1032+
:align: center
1033+
1034+
Figure 3c: Estimates of tilt direction (degrees clockwise from H1) and tilt angle. Top: coherence, phase and admittance spectra from the daily average spectra. Orange dots show the narrow bandwidth (``tilt-freqs``) used to calculate mean values (bottom row). The plots on the top row are shown at the tilt direction. Bottom: Mean coherence, phase and admittance as a function ot the tilt direction. The correct coherence peak is selected as the direction for which the phase is within +/- 90 degrees from 0. The admittance is used to calculate the tilt angle.
1035+
1036+
10231037
3. QC for clean station averages
10241038
++++++++++++++++++++++++++++++++
10251039

@@ -1098,15 +1112,15 @@ Several figures are also produced, including Figures 4, 6-9.
10981112
.. figure:: ../obstools/examples/figures/Figure_4.png
10991113
:align: center
11001114

1101-
Figure 4: The orientation of maximum coherence between the vertical and the two
1102-
horizontal components for M08A during March 2012. (Left) Coherence as a function
1103-
of angle from the H1 component. (Right) Phase as a function of the angle.
1104-
(Bottom) Tilt direction measured from the H1 component as a function of time.
1105-
In this example, the coherence is low indicating low tilt noise.
1115+
Figure 4: Tilt orientation estimates for M08A during March 2012. (Left) Coherence as a function
1116+
of azimuth measured clockwise from the H1 component. (Middle) Phase as a function of the azimuth.
1117+
(Right) Admittance and related tilt angle as a function of the azimuth. Dotted lines indicate estimates for "bad" days (i.e., with too few good windows).
1118+
(Bottom) Tilt direction, tilt angle and maximum coherence as a function of time. Symbols marked by an "x" indicate estimates for "bad" days.
1119+
The legends show the mean and 2-sigma error on the "good" estimates.
11061120

11071121
.. note ::
11081122
1109-
In the MATLAB version of ``ATaCR``, the "Angle from H1" (Figure 4 in the manual) corresponds to a counter-clockwise rotation of H1 and H2, and the orientation is chosen at the lowest phase. Here, the angle corresponds to a clockwise rotation and the estimate is chosen to lie between 0 and 180 degrees. There is therefore a 225-degree difference between those two estimates, and the plots are mirrored.
1123+
In the MATLAB version of ``ATaCR``, the "Angle from H1" (Figure 4 in the manual) corresponds to a counter-clockwise rotation of H1 and H2. Here, the angle corresponds to a clockwise rotation and the estimate is chosen to lie within +/- 90 degrees from a phase value of 0. Furthermore, we use a circular mean (as opposed to a linear mean) to calculate the phase, and consider a narrower range of tilt frequencies closer to 0 Hz, where tilt effects are most pronounced. This results in a different plot between the ``OBStools`` version and the MATLAB ``ATaCR`` version, but these differences should not affect the tilt noise removal process.
11101124
11111125
.. figure:: ../obstools/examples/figures/Figure_6.png
11121126
:align: center

docs/comply.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ Usage
123123
are stored to disk.
124124
125125
positional arguments:
126-
indb Station Database to process from.
126+
indb Station Database to process from. Available formats are:
127+
StDb (.pkl or .csv) or stationXML (.xml)
127128
128129
optional arguments:
129130
-h, --help show this help message and exit

docs/index.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ Documentation
77

88
OBStools is a package containing Python tools for processing broadband
99
ocean-bottom seismic (OBS) data. Current functionalities include removing
10-
vertical component noise from tilt and compliance effects, and calculating
11-
compliance functions from vertical displacement and pressure data. The code uses
10+
vertical component noise from tilt and compliance effects, calculating tilt orientation from three-component seismic data, and calculating compliance functions from vertical displacement and pressure data. The code uses
1211
the ``StDb`` package for querying and building a station database and
1312
can be used through command-line scripts.
1413

obstools/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
Dependencies
5151
++++++++++++
5252
53-
- `stdb <https://github.com/schaefferaj/StDb>`_
54-
- `obspy <https://github.com/obspy/obspy>`_
53+
- `StDb <https://github.com/schaefferaj/StDb>`_
54+
- `ObsPy <https://github.com/obspy/obspy>`_
5555
5656
Conda environment
5757
+++++++++++++++++
@@ -69,7 +69,7 @@
6969
7070
conda activate obs
7171
72-
Install dependency:
72+
Install StDb:
7373
7474
.. sourcecode:: bash
7575
@@ -107,7 +107,7 @@
107107
that reads a `SeisComP Data Structure
108108
<https://docs.obspy.org/packages/autogen/obspy.clients.filesystem.sds.html>`_
109109
archive containing SAC or miniSEED waveform data. Check out the scripts
110-
``bng_calc`` and ``dl_calc`` below and the argument ``--local-data`` and
110+
``bng_calc`` and ``dl_calc`` below and the argument ``--SDS-path`` and
111111
``--dtype`` for more details.
112112
113113
Station Metadata
@@ -118,11 +118,11 @@
118118
containing the metadata. The corresponding ObsPy documentation is
119119
`here <https://docs.obspy.org/packages/obspy.core.inventory.html>`_.
120120
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
121+
You can now use a stationXML (`.xml`) file instead of the StDb `.pkl` format.
122+
Alternatively, you can convert the stationXML file to an StDb `.pkl` file
123+
by running the command ``gen_stdb station.xml`` (these options are only
124+
available on StDb version 0.2.7. 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
126126
tools <https://seiscode.iris.washington.edu/projects/stationxml-converter>`_.
127127
128128
Waveform Data

0 commit comments

Comments
 (0)