Package: hvsrpy
hvsrpy- A Python package for horizontal-to-vertical spectral ratio processingJoseph P. Vantassel, The University of Texas at AustinTable of ContentsAbouthvsrpyWhy usehvsrpyA Comparison ofhvsrpywithGeopsyGetting StartedAdditional Comparisons betweenhvsrpyandGeopsyMultiple WindowsSingle WindowAbouthvsrpyhvsrpyis a Python package for performing horizontal-to-vertical spectral
ratio (HVSR) processing.hvsrpywas 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 automated frequency-domain
window-rejection algorithm and lognormal statistics implemented inhvsrpyare detailed in Cox et al. (2020). The statistical approach to incorporate
azimuth variability implemented inhvsrpyis detailed in Cheng et al. (2020).
The approach to define statistics from spatially distributed HVSR measurements
implemented inhvsrpyis detailed in Cheng et al. (2021).If you usehvsrpyin your research or consulting, we ask you please cite the
following:Joseph Vantassel. (2020). jpvantassel/hvsrpy: latest (Concept). Zenodo.http://doi.org/10.5281/zenodo.3666956Note: For software, version specific citations should be preferred to
general concept citations, such as that listed above. To generate a version
specific citation forhvsrpy, please use the citation tool on thehvsrpyarchive.These works provide background for the calculations performed byhvsrpy.Cox, B. R., Cheng, T., Vantassel, J. P., & Manuel, L. (2020). "A statistical
representation and frequency-domain window-rejection algorithm for single-station
HVSR measurements. Geophysical Journal International, 221(3), 2170–2183.https://doi.org/10.1093/gji/ggaa119Cheng, T., Cox, B. R., Vantassel, J. P., and Manuel, L. (2020). "A
statistical approach to account for azimuthal variability in single-station
HVSR measurements." Geophysical Journal International, 223(2), 1040–1053.https://doi.org/10.1093/gji/ggaa342Cheng, T., Hallal, M. M., Vantassel, J. P., and Cox, B. R., (2021).
"Estimating Unbiased Statistics for Fundamental Site Frequency Using
Spatially Distributed HVSR Measurements and Voronoi Tessellation.
J. Geotech. Geoenviron. Eng. 147, 04021068.https://doi.org/10.1061/(ASCE)GT.1943-5606.0002551SESAME. (2004). Guidelines for the Implementation of the H/V Spectral Ratio
Technique on Ambient Vibrations Measurements, Processing, and Interpretation.
European Commission - Research General Directorate, 62, European Commission -
Research General Directorate.hvsrpywould not exist without the help of many others. As a small display of
gratitude, we thank them individuallyhere.Why usehvsrpyhvsrpycontains features not currently available in any other commercial or
open-source software, including:A lognormal distribution for the fundamental site frequency (f0) so the
uncertainty inf0can be represented consistently in frequency or period.Ability to use the geometric-mean, squared-average, or any azimuth of your
choice.Easy access to the HVSR data from each time window (and azimuth in the case
of azimuthal calculations), not only the mean/median curve.A method to calculate statistics onf0that incorporates azimuthal
variability.A method for developing rigorous and unbiased spatial statistics.A fully-automated frequency-domain window-rejection algorithm.Automatic checking of the SESAME (2004) peak reliability and clarity
criteria.A command line interface for highly performant batch-style processing.Example output fromhvsrpywhen considering the geometric-mean of the horizontal componentsLognormal MedianLognormal Standard DeviationFundamental Site Frequency, f0,GM0.720.11Fundamental Site Period, T0,GM1.400.11Example output fromhvsrpywhen considering azimuthal variabilityLognormal MedianLognormal Standard DeviationFundamental Site Frequency, f0,AZ0.680.18Fundamental Site Period, T0,AZ1.480.18Example output fromhvsrpywhen considering spatial variabilityLognormal MedianLognormal Standard DeviationFundamental Site Frequency, f0,XY0.580.15Fundamental Site Period, T0,XY1.740.15A comparison ofhvsrpywithGeopsySome of the functionality available inhvsrpyoverlaps with the popular
open-source softwareGeopsy. Therefore, to encourage standardization, wherever
their functionality coincides we have sought to ensure consistency. Two such
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 StartedInstalling or UpgradinghvsrpyIf you do not have Python 3.6 or later installed, you will need to do
so. A detailed set of instructions can be foundhere.If you have not installedhvsrpypreviously usepip install hvsrpy.
If you are not familiar withpip, a useful tutorial can be foundhere. If you have
an earlier version and would like to upgrade to the latest version ofhvsrpyusepip install hvsrpy --upgrade.Confirm thathvsrpyhas installed/updated successfully by examining the
last few lines of the text displayed in the console.UsinghvsrpyDownload the contents of theexamplesdirectory to any location of your choice.Launch the Jupyter notebook (simple_hvsrpy_interface.ipynb) in the examples
directory for a no-coding-required introduction to the basics of thehvsrpypackage. If you have not installedJupyter, detailed instructions can be
foundhere.Launch the Jupyter notebook (azimuthal_hvsrpy_interface.ipynb) in the
examples directory to perform more rigorous calculations which incorporate
azimuthal variability.Enjoy!Looking for more informationMore information regarding HVSR processing andhvsrpycan be foundhere.Additional Comparisons betweenhvsrpyandGeopsyMultiple WindowsThe examples in this section use the same settings applied to different
noise records. The settings are provided in theSettingssection and the
name of each file is provided above the corresponding figure in theResultssection. The noise records (i.e.,.miniseedfiles) are provided in theexamplesdirectory
and also as part of a large published data set(Cox and Vantassel, 2018).SettingsWindow Length:60 secondsBandpass Filter Boolean:FalseCosine Taper Width:10% (i.e., 5% in Geopsy)Konno and Ohmachi Smoothing Coefficient:40Resampling:Minimum Frequency:0.3 HzMaximum Frequency:40 HzNumber of Points:2048Sampling Type:'log'Method for Combining Horizontal Components:'squared-average'Distribution for f0 from Time Windows:'normal'Distribution for Mean Curve:'log-normal'Multiple Window ResultsFile Name:UT.STN11.A2_C50.miniseedFile Name:UT.STN11.A2_C150.miniseedFile Name:UT.STN12.A2_C50.miniseedFile Name:UT.STN12.A2_C150.miniseedSingle WindowThe 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 theDefault Settingssection, with only the variations from
these settings noted for each example.Default SettingsWindow Length:60 secondsBandpass Filter Boolean:FalseCosine Taper Width:10% (i.e., 5% in Geopsy)Konno and Ohmachi Smoothing Coefficient:40Resampling:Minimum Frequency:0.3 HzMaximum Frequency:40 HzNumber of Points:2048Sampling Type:'log'Method for Combining Horizontal Components:'squared-average'Distribution for f0 from Time Windows:'normal'Distribution for Mean Curve:'log-normal'Single Window ResultsDefault 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:10Konno and Ohmachi Smoothing Coefficient:80Number of Points:512Number of Points:4096