A Python package for horizontal-to-vertical spectral ratio processing
Project description
hvsrpy - A Python package for horizontal-to-vertical spectral ratio processing
Joseph P. Vantassel, The University of Texas at Austin
Table of Contents
- About hvsrpy
- Why use hvsrpy
- A Comparison of hvsrpy with Geopsy
- Getting Started
- Additional Comparisons between hvsrpy and Geopsy
About hvsrpy
hvsrpy
is a Python package for performing horizontal-to-vertical spectral ratio
(H/V) processing. hvsrpy
was developed by Joseph P. Vantassel with
contributions from Dana M. Brannon under the supervision of Professor Brady R.
Cox at The University of Texas at Austin. The fully-automated frequency-domain
rejection algorithm implemented in hvsrpy
was developed by Tianjian Cheng
under the supervision of Professor Brady R. Cox at The University of Texas at
Austin and detailed in Cox et al. (in review).
Why use hvsrpy
hvsrpy
contains features not currently available in any other commercial or
open-source software, including:
- A fully-automated frequency-domain rejection algorithm, which allows spurious time windows to be removed in a repeatable and expedient manner.
- A log-normal distribution for the fundemental site frequency (
f0
) so the uncertainty inf0
can be represented consistently regardless of whether it is described in terms of frequency or period. - Combining the two horizontal components using the geometric mean.
- Access to the H/V data from each time window, not only the mean/median curve.
- A performant framework for batch-style processing.
A comparison of hvsrpy with Geopsy
To illustrate that hvsrpy
can exactly reproduce the results from the popular
open-source software Geopsy
two comparisons are shown below. One for a single
time window (left) and one for multiple time windows (right). Additional
examples and the information necessary to reproduce them are provided at the end
of this document.
Getting Started
Installing hvsrpy
-
If you do not have Python 3.6 or later installed, you will need to do so. A detailed set of instructions can be found here.
-
pip install hvsrpy
. If you are not familiar withpip
, a useful tutorial can be found here. -
Confirm that
hvsrpy
has installed succesfully by examining the last few lines of the text displayed in the console.
Using hvsrpy
-
Download the contents of the examples directory to any location of your choice.
-
Launch the Jupyter notebook (
file with .ipynb extension
) in the examples directory for a no-coding-required introduction to thehvsrpy
package. If you have not installedJupyter
, deetailed instructions can be found here. -
Enjoy!
Additional Comparisons between hvsrpy and Geopsy
Multiple Windows
The examples in this section use the same settings applied to different
noise records. The settings are provided in the Settings section and the
name of each file is provided above the corresponding figure in the Results
section. The noise records (i.e., .miniseed files) are provided in the
examples
directory or can be found
here.
Settings
- Window Length: 60 seconds
- Bandpass Filter Boolean: False
- Cosine Taper Width: 10% (i.e., 5% in Geopsy)
- Konno and Ohmachi Smoothing Coefficient: 40
- Resampling:
- Minimum Frequency: 0.3 Hz
- Maximum Frequency: 40 Hz
- Number of Points: 2048
- Sampling Type: 'log'
- Method for Combining Horizontal Components: 'squared-average'
- Distribution for f0 from Time Windows: 'normal'
- Distribution for Mean Curve: 'log-normal'
Multiple Window Results
File Name: UT.STN11.A2_C50.miniseed
File Name: UT.STN11.A2_C150.miniseed
File Name: UT.STN12.A2_C50.miniseed
File Name: UT.STN12.A2_C150.miniseed
Single Window
The examples in this section apply different settings to the same noise record (UT.STN11.A2_C50.miniseed). For brevity, the default settings are listed in the Default Settings section, with only the variations from these settings noted for each example.
Default Settings
- Window Length: 60 seconds
- Bandpass Filter Boolean: False
- Cosine Taper Width: 10% (i.e., 5% in Geopsy)
- Konno and Ohmachi Smoothing Coefficient: 40
- Resampling:
- Minimum Frequency: 0.3 Hz
- Maximum Frequency: 40 Hz
- Number of Points: 2048
- Sampling Type: 'log'
- Method for Combining Horizontal Components: 'squared-average'
- Distribution for f0 from Time Windows: 'normal'
- Distribution for Mean Curve: 'log-normal'
Single Window Results
Default Case: No variation from those settings listed above.
Window Length: 120 seconds.
Cosine Taper Width: 20 % (i.e., 10 % in Geopsy)
Cosine Taper Width: 0.2 % (i.e., 0.1 % in Geopsy)
Konno and Ohmachi Smoothing Coefficient: 10
Konno and Ohmachi Smoothing Coefficient: 80
Number of Points: 512
Number of Points: 4096
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.