hvsrpy


Namehvsrpy JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/jpvantassel/hvsrpy
SummaryA Python package for horizontal-to-vertical spectral ratio processing
upload_time2024-07-13 03:35:05
maintainerNone
docs_urlNone
authorJoseph P. Vantassel
requires_python>=3.8
licenseNone
keywords horizontal-to-vertical spectral ratio hv hvsr
VCS
bugtrack_url
requirements numpy scipy obspy pandas shapely termcolor matplotlib click numba PyQt5 tox jupyterlab coverage sphinx sphinx_rtd_theme sphinx-click autopep8
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # _hvsrpy_ - A Python package for horizontal-to-vertical spectral ratio processing

> Joseph P. Vantassel, [jpvantassel.com](https://www.jpvantassel.com/)

[![DOI](https://zenodo.org/badge/219310971.svg)](https://zenodo.org/badge/latestdoi/219310971)
[![PyPI - License](https://img.shields.io/pypi/l/hvsrpy)](https://github.com/jpvantassel/hvsrpy/blob/main/LICENSE.txt)
[![CircleCI](https://circleci.com/gh/jpvantassel/hvsrpy.svg?style=svg)](https://circleci.com/gh/jpvantassel/hvsrpy)
[![Documentation Status](https://readthedocs.org/projects/hvsrpy/badge/?version=latest)](https://hvsrpy.readthedocs.io/en/latest/?badge=latest)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/528737ade629492e8652be369528c756)](https://www.codacy.com/gh/jpvantassel/hvsrpy/dashboard?utm_source=github.com&utm_medium=referral&utm_content=jpvantassel/hvsrpy&utm_campaign=Badge_Grade)
[![codecov](https://codecov.io/gh/jpvantassel/hvsrpy/branch/main/graph/badge.svg?token=MJ3WDNRIM0)](https://codecov.io/gh/jpvantassel/hvsrpy)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hvsrpy)

## Table of Contents

-   [About _hvsrpy_](#About-hvsrpy)
-   [Why use _hvsrpy_](#Why-use-hvsrpy)
-   [A Comparison of _hvsrpy_ with _Geopsy_](#A-comparison-of-hvsrpy-with-Geopsy)
-   [Getting Started](#Getting-Started)
-   [Additional Comparisons between _hvsrpy_ and _Geopsy_](#Additional-Comparisons-between-hvsrpy-and-Geopsy)
    -   [Multiple Windows](#Multiple-Windows)
    -   [Single Window](#Single-Window)

## About _hvsrpy_

`hvsrpy` is an open-source Python package for performing horizontal-to-vertical
spectral ratio (HVSR) processing of microtremor and earthquake recordings.
`hvsrpy` was developed by [Joseph P. Vantassel](https://www.jpvantassel.com/)
with contributions from Dana M. Brannon under the supervision of Professor
Brady R. Cox at The University of Texas at Austin. _hvsrpy_ continues to be
developed and maintained by [Joseph P. Vantassel and his research group at Virginia Tech](https://geoimaging-research.org/).

If you use `hvsrpy` in 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.3666956](http://doi.org/10.5281/zenodo.3666956)

_Note: For software, version specific citations should be preferred to
general concept citations, such as that listed above. To generate a version
specific citation for `hvsrpy`, please use the citation tool on the `hvsrpy`
[archive](http://doi.org/10.5281/zenodo.3666956)._

`hvsrpy` implements the work of many others. Therefore we strongly encourage
users to cite the original work alongside `hvsrpy`. Below we list key features
and their associated citation.

Lognormal statistics and fully-automated frequency-domain window-rejection algorithm.

> 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/ggaa119

Statistical approach to incorporate azimuthal variability.

> Cheng, 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/ggaa342

Statistical approach to incorporate spatial variability.

> Cheng, 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.0002551

SESAME clarity and reliability criteria for microtremor HVSR.

> SESAME. (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.

Computation of HVSR under the diffuse field assumption.

> Sánchez-Sesma, F.J., Rodríguez, M., Iturrarán-Viveros, U., Luzón, F.,
> Campillo, M., Margerin, L., García-Jerez, A., Suarez, M., Santoyo, M.A.,
> Rodríguez-Castellanos, A. (2011). A theory for microtremor H/V spectral
> ratio: application for a layered medium: Theory for microtremor H/V spectral
> ratio. Geophysical Journal International 186, 221–225.
> https://doi.org/10.1111/j.1365-246X.2011.05064.x

Power spectral density (PSD) calculation.

> Welch, P., (1967). The use of fast Fourier transform for the estimation
> of power spectra: a method based on time averaging over short, modified
> periodograms. IEEE Transactions on audio and electroacoustics, 15(2), pp.70-73.

New high noise model (NHNM) and new low noise model (NLNM).

> Peterson, J., (1993). Observation and Modeling of Seismic Background
> Noise (Open-File Report No. 93–322). U.S. Geologic Survey, Albuquerque, New Mexico.

`hvsrpy` would not exist without the help of many others. As a
display of our gratitude, we thank them individually
[here](https://github.com/jpvantassel/hvsrpy/blob/main/thanks.md).

## Why use _hvsrpy_

`hvsrpy` contains features not currently available in any other commercial or
open-source software, including:

-   Support of a broad range of microtremor and earthquake data formats
including: miniSEED, SAF, MiniShark, SAC, GCF, and PEER.
-   Multiple methods to combine the horizontal components including: arithmetic_mean, squared-average, quadratic-mean, geometric-mean, total-horizontal-energy, vector-summation, maximum-horizontal-value,
rotD50, or single-azimuth.
-   Ability to use a lognormal distribution for the site resonant
frequency (`fn`) so the uncertainty in `fn` can be represented consistently
in frequency and period.
-   Direct access to the raw HVSR data from each time window and azimuth
(i.e., not only the mean/median curve) through Python objects and
cross-platform text-based output format.
-   Calculate statistics on `fn` that incorporates azimuthal
variability.
-   Ability to develop rigorous and unbiased spatial statistics to
combine spatially distributed HVSR measurements.
-   Multiple automated window rejection algorithms including the
frequency-domain window-rejection algorithm by Cox et al. (2020).
-   Automated checking of the SESAME (2004) peak reliability and clarity
criteria.
-   A command line interface (CLI) for parallel batch-style processing
using multiprocessing.

### Example output from `hvsrpy` when considering the geometric-mean of the horizontal components

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/example_hvsr_figure.png?raw=true" width="775">

|                    | Lognormal Median | Lognormal Standard Deviation |
|--------------------|------------------|------------------------------|
| Site Frequency, fn | 0.67             | 0.09                         |
| Site Period, Tn    | 1.50             | 0.09                         |

### Example output from `hvsrpy` when considering azimuthal variability

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/example_hvsr_figure_az.png?raw=true" width="775">

|                       | Lognormal Median | Lognormal Standard Deviation |
|-----------------------|------------------|------------------------------|
| Site Frequency, fn,az | 0.67             | 0.07                         |
| Site Period, Tn,az    | 1.50             | 0.07                         |

### Example output from `hvsrpy` when considering spatial variability

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/example_hvsr_figure_sp.png?raw=true" width="775">

|                       | Lognormal Median | Lognormal Standard Deviation |
|-----------------------|------------------|------------------------------|
| Site Frequency, fn,xy | 0.58             | 0.15                         |
| Site Period, Tn,xy    | 1.74             | 0.15                         |

## A comparison of _hvsrpy_ with _Geopsy_

Some of the functionality available in `hvsrpy` overlaps with the popular
open-source software `geopsy`. 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 (top) and one for
multiple time windows (bottom). Additional examples are provided at the end of
this document. Additional examples and the code to reproduce all of the
examples shown are provided in the
[gallery](https://github.com/jpvantassel/hvsrpy/tree/main/gallery).

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_a.png?raw=true" width="425">

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/multiwindow_STN11_c050.png?raw=true" width="425">

## Getting Started

### Installing or Upgrading _hvsrpy_

1.  If you do not have Python 3.8 or later installed, you will need to do
so. A detailed set of instructions can be found
[here](https://jpvantassel.github.io/python3-course/#/intro/installing_python).

2.  If you have not installed `hvsrpy` previously, you can install it with
`pip` via the command `pip install hvsrpy`.
If you are not familiar with `pip`, a useful tutorial can be found
[here](https://jpvantassel.github.io/python3-course/#/intro/pip). If you have
an earlier version and would like to upgrade to the latest version of `hvsrpy`
use `pip install hvsrpy --upgrade`.

3.  Confirm that `hvsrpy` has installed/updated successfully by examining the
last few lines of the text displayed in the console.

### Using _hvsrpy_

1.  Download the contents of the [examples](https://github.com/jpvantassel/hvsrpy/tree/main/examples) directory to any location of your choice.

2.  Launch the Jupyter notebook (`example_mhvsr_traditional.ipynb`) in the examples
  directory for a no-coding-required introduction to the basics of the `hvsrpy`
  package. If you have not installed `Jupyter Lab`, detailed instructions can be
  found [here](https://jpvantassel.github.io/python3-course/#/intro/installing_jupyter).

3.  Continue to explore the other example notebooks provided. Note that each
  example notebook seeks to highlight one or two key features of `hvsrpy` and
  it may be helpful to combine multiple components together to build
  a custom workflow, this is highly encouraged.

4.  Enjoy!

### Looking for more information

More information regarding HVSR processing and `hvsrpy` can be found
[here](https://github.com/jpvantassel/hvsrpy/blob/main/additional_information.md)
and in the softwares documentation
[here](https://hvsrpy.readthedocs.io/en/latest/?badge=latest).

## 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](https://github.com/jpvantassel/hvsrpy/tree/main/examples) directory
and also as part of a large published data set
[(Cox and Vantassel, 2018)](https://www.designsafe-ci.org/data/browser/public/designsafe.storage.published//PRJ-2075/Thorndon%20Warf%20(A2)/Unprocessed%20Data/Microtremor%20Array%20Measurements%20(MAM)).

#### Settings

- __Window Length:__ 60 seconds
- __Bandpass Filter:__ No
- __Tukey Window Length:__ 10% (i.e., 5% in Geopsy)
- __Konno and Ohmachi Smoothing Coefficient:__ 40
- __Resampling Center Frequencies:__
    - __Minimum:__ 0.3 Hz
    - __Maximum:__ 40 Hz
    - __Number:__ 2048
    - __Type:__ 'log'
- __Method for Combining Horizontal Components:__ 'squared-average'
- __Distribution for f0 from Time Windows:__ 'normal'
- __Distribution for Mean Curve:__ 'lognormal'

#### Multiple Window Results

__File Name:__ _UT.STN11.A2_C50.miniseed_

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/multiwindow_STN11_c050.png?raw=true" width="425">

__File Name:__ _UT.STN11.A2_C150.miniseed_

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/multiwindow_STN11_c150.png?raw=true" width="425">

__File Name:__ _UT.STN12.A2_C50.miniseed_

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/multiwindow_STN12_c050.png?raw=true" width="425">

__File Name:__ _UT.STN12.A2_C150.miniseed_

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/multiwindow_STN12_c150.png?raw=true" width="425">

### 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:__ No
- __Tukey Window Length:__ 10% (i.e., 5% in Geopsy)
- __Konno and Ohmachi Smoothing Coefficient:__ 40
- __Resampling Center Frequencies:__
    - __Minimum:__ 0.3 Hz
    - __Maximum:__ 40 Hz
    - __Number:__ 2048
    - __Type:__ 'log'
- __Method for Combining Horizontal Components:__ 'squared-average'
- __Distribution for f0 from Time Windows:__ 'normal'
- __Distribution for Mean Curve:__ 'lognormal'

#### Single Window Results

__Default Case:__ No variation from those settings listed above.

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_a.png?raw=true" width="425">

__Window Length:__ 120 seconds.

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_b.png?raw=true" width="425">

__Cosine Taper Width:__ 20 % (i.e., 10 % in Geopsy)

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_e.png?raw=true" width="425">

__Cosine Taper Width:__ 0.2 % (i.e., 0.1 % in Geopsy)

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_f.png?raw=true" width="425">

__Konno and Ohmachi Smoothing Coefficient:__ 10

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_c.png?raw=true" width="425">

__Konno and Ohmachi Smoothing Coefficient:__ 80

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_d.png?raw=true" width="425">

__Number of Points:__ 512

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_g.png?raw=true" width="425">

__Number of Points:__ 4096

<img src="https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_h.png?raw=true" width="425">

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jpvantassel/hvsrpy",
    "name": "hvsrpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "horizontal-to-vertical spectral ratio hv hvsr",
    "author": "Joseph P. Vantassel",
    "author_email": "joseph.p.vantassel@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/29/fc/f64f6e87968dc60c3162069934515888d983beb9930b9aaf0eabf8aead0e/hvsrpy-2.0.0.tar.gz",
    "platform": null,
    "description": "# _hvsrpy_ - A Python package for horizontal-to-vertical spectral ratio processing\n\n> Joseph P. Vantassel, [jpvantassel.com](https://www.jpvantassel.com/)\n\n[![DOI](https://zenodo.org/badge/219310971.svg)](https://zenodo.org/badge/latestdoi/219310971)\n[![PyPI - License](https://img.shields.io/pypi/l/hvsrpy)](https://github.com/jpvantassel/hvsrpy/blob/main/LICENSE.txt)\n[![CircleCI](https://circleci.com/gh/jpvantassel/hvsrpy.svg?style=svg)](https://circleci.com/gh/jpvantassel/hvsrpy)\n[![Documentation Status](https://readthedocs.org/projects/hvsrpy/badge/?version=latest)](https://hvsrpy.readthedocs.io/en/latest/?badge=latest)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/528737ade629492e8652be369528c756)](https://www.codacy.com/gh/jpvantassel/hvsrpy/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=jpvantassel/hvsrpy&amp;utm_campaign=Badge_Grade)\n[![codecov](https://codecov.io/gh/jpvantassel/hvsrpy/branch/main/graph/badge.svg?token=MJ3WDNRIM0)](https://codecov.io/gh/jpvantassel/hvsrpy)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hvsrpy)\n\n## Table of Contents\n\n-   [About _hvsrpy_](#About-hvsrpy)\n-   [Why use _hvsrpy_](#Why-use-hvsrpy)\n-   [A Comparison of _hvsrpy_ with _Geopsy_](#A-comparison-of-hvsrpy-with-Geopsy)\n-   [Getting Started](#Getting-Started)\n-   [Additional Comparisons between _hvsrpy_ and _Geopsy_](#Additional-Comparisons-between-hvsrpy-and-Geopsy)\n    -   [Multiple Windows](#Multiple-Windows)\n    -   [Single Window](#Single-Window)\n\n## About _hvsrpy_\n\n`hvsrpy` is an open-source Python package for performing horizontal-to-vertical\nspectral ratio (HVSR) processing of microtremor and earthquake recordings.\n`hvsrpy` was developed by [Joseph P. Vantassel](https://www.jpvantassel.com/)\nwith contributions from Dana M. Brannon under the supervision of Professor\nBrady R. Cox at The University of Texas at Austin. _hvsrpy_ continues to be\ndeveloped and maintained by [Joseph P. Vantassel and his research group at Virginia Tech](https://geoimaging-research.org/).\n\nIf you use `hvsrpy` in your research or consulting, we ask you please cite the\nfollowing:\n\n> Joseph Vantassel. (2020). jpvantassel/hvsrpy: latest (Concept). Zenodo.\n> [http://doi.org/10.5281/zenodo.3666956](http://doi.org/10.5281/zenodo.3666956)\n\n_Note: For software, version specific citations should be preferred to\ngeneral concept citations, such as that listed above. To generate a version\nspecific citation for `hvsrpy`, please use the citation tool on the `hvsrpy`\n[archive](http://doi.org/10.5281/zenodo.3666956)._\n\n`hvsrpy` implements the work of many others. Therefore we strongly encourage\nusers to cite the original work alongside `hvsrpy`. Below we list key features\nand their associated citation.\n\nLognormal statistics and fully-automated frequency-domain window-rejection algorithm.\n\n> Cox, B. R., Cheng, T., Vantassel, J. P., & Manuel, L. (2020). \"A statistical\n> representation and frequency-domain window-rejection algorithm for single-station\n> HVSR measurements. Geophysical Journal International, 221(3), 2170\u20132183.\n> https://doi.org/10.1093/gji/ggaa119\n\nStatistical approach to incorporate azimuthal variability.\n\n> Cheng, T., Cox, B. R., Vantassel, J. P., and Manuel, L. (2020). \"A\n> statistical approach to account for azimuthal variability in single-station\n> HVSR measurements.\" Geophysical Journal International, 223(2), 1040\u20131053.\n> https://doi.org/10.1093/gji/ggaa342\n\nStatistical approach to incorporate spatial variability.\n\n> Cheng, T., Hallal, M. M., Vantassel, J. P., and Cox, B. R., (2021).\n> \"Estimating Unbiased Statistics for Fundamental Site Frequency Using\n> Spatially Distributed HVSR Measurements and Voronoi Tessellation.\n> J. Geotech. Geoenviron. Eng. 147, 04021068.\n> https://doi.org/10.1061/(ASCE)GT.1943-5606.0002551\n\nSESAME clarity and reliability criteria for microtremor HVSR.\n\n> SESAME. (2004). Guidelines for the Implementation of the H/V Spectral Ratio\n> Technique on Ambient Vibrations Measurements, Processing, and Interpretation.\n> European Commission - Research General Directorate, 62, European Commission -\n> Research General Directorate.\n\nComputation of HVSR under the diffuse field assumption.\n\n> S\u00e1nchez-Sesma, F.J., Rodr\u00edguez, M., Iturrar\u00e1n-Viveros, U., Luz\u00f3n, F.,\n> Campillo, M., Margerin, L., Garc\u00eda-Jerez, A., Suarez, M., Santoyo, M.A.,\n> Rodr\u00edguez-Castellanos, A. (2011). A theory for microtremor H/V spectral\n> ratio: application for a layered medium: Theory for microtremor H/V spectral\n> ratio. Geophysical Journal International 186, 221\u2013225.\n> https://doi.org/10.1111/j.1365-246X.2011.05064.x\n\nPower spectral density (PSD) calculation.\n\n> Welch, P., (1967). The use of fast Fourier transform for the estimation\n> of power spectra: a method based on time averaging over short, modified\n> periodograms. IEEE Transactions on audio and electroacoustics, 15(2), pp.70-73.\n\nNew high noise model (NHNM) and new low noise model (NLNM).\n\n> Peterson, J., (1993). Observation and Modeling of Seismic Background\n> Noise (Open-File Report No. 93\u2013322). U.S. Geologic Survey, Albuquerque, New Mexico.\n\n`hvsrpy` would not exist without the help of many others. As a\ndisplay of our gratitude, we thank them individually\n[here](https://github.com/jpvantassel/hvsrpy/blob/main/thanks.md).\n\n## Why use _hvsrpy_\n\n`hvsrpy` contains features not currently available in any other commercial or\nopen-source software, including:\n\n-   Support of a broad range of microtremor and earthquake data formats\nincluding: miniSEED, SAF, MiniShark, SAC, GCF, and PEER.\n-   Multiple methods to combine the horizontal components including: arithmetic_mean, squared-average, quadratic-mean, geometric-mean, total-horizontal-energy, vector-summation, maximum-horizontal-value,\nrotD50, or single-azimuth.\n-   Ability to use a lognormal distribution for the site resonant\nfrequency (`fn`) so the uncertainty in `fn` can be represented consistently\nin frequency and period.\n-   Direct access to the raw HVSR data from each time window and azimuth\n(i.e., not only the mean/median curve) through Python objects and\ncross-platform text-based output format.\n-   Calculate statistics on `fn` that incorporates azimuthal\nvariability.\n-   Ability to develop rigorous and unbiased spatial statistics to\ncombine spatially distributed HVSR measurements.\n-   Multiple automated window rejection algorithms including the\nfrequency-domain window-rejection algorithm by Cox et al. (2020).\n-   Automated checking of the SESAME (2004) peak reliability and clarity\ncriteria.\n-   A command line interface (CLI) for parallel batch-style processing\nusing multiprocessing.\n\n### Example output from `hvsrpy` when considering the geometric-mean of the horizontal components\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/example_hvsr_figure.png?raw=true\" width=\"775\">\n\n|                    | Lognormal Median | Lognormal Standard Deviation |\n|--------------------|------------------|------------------------------|\n| Site Frequency, fn | 0.67             | 0.09                         |\n| Site Period, Tn    | 1.50             | 0.09                         |\n\n### Example output from `hvsrpy` when considering azimuthal variability\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/example_hvsr_figure_az.png?raw=true\" width=\"775\">\n\n|                       | Lognormal Median | Lognormal Standard Deviation |\n|-----------------------|------------------|------------------------------|\n| Site Frequency, fn,az | 0.67             | 0.07                         |\n| Site Period, Tn,az    | 1.50             | 0.07                         |\n\n### Example output from `hvsrpy` when considering spatial variability\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/example_hvsr_figure_sp.png?raw=true\" width=\"775\">\n\n|                       | Lognormal Median | Lognormal Standard Deviation |\n|-----------------------|------------------|------------------------------|\n| Site Frequency, fn,xy | 0.58             | 0.15                         |\n| Site Period, Tn,xy    | 1.74             | 0.15                         |\n\n## A comparison of _hvsrpy_ with _Geopsy_\n\nSome of the functionality available in `hvsrpy` overlaps with the popular\nopen-source software `geopsy`. Therefore, to encourage standardization, wherever\ntheir functionality coincides we have sought to ensure consistency. Two such\ncomparisons are shown below. One for a single time window (top) and one for\nmultiple time windows (bottom). Additional examples are provided at the end of\nthis document. Additional examples and the code to reproduce all of the\nexamples shown are provided in the\n[gallery](https://github.com/jpvantassel/hvsrpy/tree/main/gallery).\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_a.png?raw=true\" width=\"425\">\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/multiwindow_STN11_c050.png?raw=true\" width=\"425\">\n\n## Getting Started\n\n### Installing or Upgrading _hvsrpy_\n\n1.  If you do not have Python 3.8 or later installed, you will need to do\nso. A detailed set of instructions can be found\n[here](https://jpvantassel.github.io/python3-course/#/intro/installing_python).\n\n2.  If you have not installed `hvsrpy` previously, you can install it with\n`pip` via the command `pip install hvsrpy`.\nIf you are not familiar with `pip`, a useful tutorial can be found\n[here](https://jpvantassel.github.io/python3-course/#/intro/pip). If you have\nan earlier version and would like to upgrade to the latest version of `hvsrpy`\nuse `pip install hvsrpy --upgrade`.\n\n3.  Confirm that `hvsrpy` has installed/updated successfully by examining the\nlast few lines of the text displayed in the console.\n\n### Using _hvsrpy_\n\n1.  Download the contents of the [examples](https://github.com/jpvantassel/hvsrpy/tree/main/examples) directory to any location of your choice.\n\n2.  Launch the Jupyter notebook (`example_mhvsr_traditional.ipynb`) in the examples\n  directory for a no-coding-required introduction to the basics of the `hvsrpy`\n  package. If you have not installed `Jupyter Lab`, detailed instructions can be\n  found [here](https://jpvantassel.github.io/python3-course/#/intro/installing_jupyter).\n\n3.  Continue to explore the other example notebooks provided. Note that each\n  example notebook seeks to highlight one or two key features of `hvsrpy` and\n  it may be helpful to combine multiple components together to build\n  a custom workflow, this is highly encouraged.\n\n4.  Enjoy!\n\n### Looking for more information\n\nMore information regarding HVSR processing and `hvsrpy` can be found\n[here](https://github.com/jpvantassel/hvsrpy/blob/main/additional_information.md)\nand in the softwares documentation\n[here](https://hvsrpy.readthedocs.io/en/latest/?badge=latest).\n\n## Additional Comparisons between _hvsrpy_ and _Geopsy_\n\n### Multiple Windows\n\nThe examples in this section use the same settings applied to different\nnoise records. The settings are provided in the __Settings__ section and the\nname of each file is provided above the corresponding figure in the __Results__\nsection. The noise records (i.e., _.miniseed_ files) are provided in the\n[examples](https://github.com/jpvantassel/hvsrpy/tree/main/examples) directory\nand also as part of a large published data set\n[(Cox and Vantassel, 2018)](https://www.designsafe-ci.org/data/browser/public/designsafe.storage.published//PRJ-2075/Thorndon%20Warf%20(A2)/Unprocessed%20Data/Microtremor%20Array%20Measurements%20(MAM)).\n\n#### Settings\n\n- __Window Length:__ 60 seconds\n- __Bandpass Filter:__ No\n- __Tukey Window Length:__ 10% (i.e., 5% in Geopsy)\n- __Konno and Ohmachi Smoothing Coefficient:__ 40\n- __Resampling Center Frequencies:__\n    - __Minimum:__ 0.3 Hz\n    - __Maximum:__ 40 Hz\n    - __Number:__ 2048\n    - __Type:__ 'log'\n- __Method for Combining Horizontal Components:__ 'squared-average'\n- __Distribution for f0 from Time Windows:__ 'normal'\n- __Distribution for Mean Curve:__ 'lognormal'\n\n#### Multiple Window Results\n\n__File Name:__ _UT.STN11.A2_C50.miniseed_\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/multiwindow_STN11_c050.png?raw=true\" width=\"425\">\n\n__File Name:__ _UT.STN11.A2_C150.miniseed_\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/multiwindow_STN11_c150.png?raw=true\" width=\"425\">\n\n__File Name:__ _UT.STN12.A2_C50.miniseed_\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/multiwindow_STN12_c050.png?raw=true\" width=\"425\">\n\n__File Name:__ _UT.STN12.A2_C150.miniseed_\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/multiwindow_STN12_c150.png?raw=true\" width=\"425\">\n\n### Single Window\n\nThe examples in this section apply different settings to the same noise\nrecord (_UT.STN11.A2_C50.miniseed_). For brevity, the default settings are\nlisted in the __Default Settings__ section, with only the variations from\nthese settings noted for each example.\n\n#### Default Settings\n\n- __Window Length:__ 60 seconds\n- __Bandpass Filter:__ No\n- __Tukey Window Length:__ 10% (i.e., 5% in Geopsy)\n- __Konno and Ohmachi Smoothing Coefficient:__ 40\n- __Resampling Center Frequencies:__\n    - __Minimum:__ 0.3 Hz\n    - __Maximum:__ 40 Hz\n    - __Number:__ 2048\n    - __Type:__ 'log'\n- __Method for Combining Horizontal Components:__ 'squared-average'\n- __Distribution for f0 from Time Windows:__ 'normal'\n- __Distribution for Mean Curve:__ 'lognormal'\n\n#### Single Window Results\n\n__Default Case:__ No variation from those settings listed above.\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_a.png?raw=true\" width=\"425\">\n\n__Window Length:__ 120 seconds.\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_b.png?raw=true\" width=\"425\">\n\n__Cosine Taper Width:__ 20 % (i.e., 10 % in Geopsy)\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_e.png?raw=true\" width=\"425\">\n\n__Cosine Taper Width:__ 0.2 % (i.e., 0.1 % in Geopsy)\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_f.png?raw=true\" width=\"425\">\n\n__Konno and Ohmachi Smoothing Coefficient:__ 10\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_c.png?raw=true\" width=\"425\">\n\n__Konno and Ohmachi Smoothing Coefficient:__ 80\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_d.png?raw=true\" width=\"425\">\n\n__Number of Points:__ 512\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_g.png?raw=true\" width=\"425\">\n\n__Number of Points:__ 4096\n\n<img src=\"https://github.com/jpvantassel/hvsrpy/blob/main/figs/singlewindow_h.png?raw=true\" width=\"425\">\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python package for horizontal-to-vertical spectral ratio processing",
    "version": "2.0.0",
    "project_urls": {
        "Bug Reports": "https://github.com/jpvantassel/hvsrpy/issues",
        "Docs": "https://hvsrpy.readthedocs.io/en/latest/?badge=latest",
        "Homepage": "https://github.com/jpvantassel/hvsrpy",
        "Source": "https://github.com/jpvantassel/hvsrpy"
    },
    "split_keywords": [
        "horizontal-to-vertical",
        "spectral",
        "ratio",
        "hv",
        "hvsr"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c44355970690828acef4dbaac76cf1fdc0899966ed40d67023c35600c90c6b21",
                "md5": "3624951b25aacfe93d1801267c5f25fb",
                "sha256": "73ce3b6f8b1fc6a6ace37a9d6ed45731e18890760d16240152ee489b999692ba"
            },
            "downloads": -1,
            "filename": "hvsrpy-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3624951b25aacfe93d1801267c5f25fb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 129670,
            "upload_time": "2024-07-13T03:35:03",
            "upload_time_iso_8601": "2024-07-13T03:35:03.236640Z",
            "url": "https://files.pythonhosted.org/packages/c4/43/55970690828acef4dbaac76cf1fdc0899966ed40d67023c35600c90c6b21/hvsrpy-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "29fcf64f6e87968dc60c3162069934515888d983beb9930b9aaf0eabf8aead0e",
                "md5": "204bdbaffe8d10375b94421e0270041a",
                "sha256": "af87efb1900e34d357dbabf65b14378270f41e1a060317c3375fe16cd28bd5a6"
            },
            "downloads": -1,
            "filename": "hvsrpy-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "204bdbaffe8d10375b94421e0270041a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 91583,
            "upload_time": "2024-07-13T03:35:05",
            "upload_time_iso_8601": "2024-07-13T03:35:05.207496Z",
            "url": "https://files.pythonhosted.org/packages/29/fc/f64f6e87968dc60c3162069934515888d983beb9930b9aaf0eabf8aead0e/hvsrpy-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-13 03:35:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jpvantassel",
    "github_project": "hvsrpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.22"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": []
        },
        {
            "name": "obspy",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "shapely",
            "specs": []
        },
        {
            "name": "termcolor",
            "specs": []
        },
        {
            "name": "matplotlib",
            "specs": []
        },
        {
            "name": "click",
            "specs": [
                [
                    ">",
                    "8.0.0"
                ]
            ]
        },
        {
            "name": "numba",
            "specs": []
        },
        {
            "name": "PyQt5",
            "specs": []
        },
        {
            "name": "tox",
            "specs": []
        },
        {
            "name": "jupyterlab",
            "specs": []
        },
        {
            "name": "coverage",
            "specs": []
        },
        {
            "name": "sphinx",
            "specs": []
        },
        {
            "name": "sphinx_rtd_theme",
            "specs": []
        },
        {
            "name": "sphinx-click",
            "specs": []
        },
        {
            "name": "autopep8",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "hvsrpy"
}
        
Elapsed time: 0.27105s