Skip to main content

A package for processing and analyzing HVSR (Horizontal to Vertical Spectral Ratio) data

Project description

DOI

SPRĪT

SpRĪT (HVSR): Spectral Ratio Investigation Toolset for basic Horizontal Vertical Spectral Ratio processing, using any data format readable by the Obspy python package.

Introduction

The Horizontal to Vertical Spectral Ratio (HVSR) technique is a method used to analyze ambient seismic noise to calculate the dominant frequency at a site.

This package will allow ambient seismic data to be read in the most common seismic data formats, and will perform Horizontal Vertical Spectral Ratio (HVSR) analysis on the data. H/V analysis was standardized and popularized by the Site EffectS assessment using AMbient Excitations (SESAME) project, with a comprehensive final report issued in 2003.1 This SESAME project and its J-SESAME pacakge were crucial in the developing of the HVSR technique, and the outputs aided in the development of this software package.

This python package is built in large part off the Incorporated Research Institutions in Seismology (IRIS) Horizontal to Vertical Spectral Ratio (HVSR) processing package.2 Specifically, the computeHVSR.py tools that enable the ability to rank HVSR peaks, calculate data quality and peak quality, and the combining of the horizontal components was adapted directly from that package. Because the SpRĪT package is intended to be used to analyze data from rapid field data acquisitions (less than an hour per site), much of the IRIS package was adapted from daily to HV curve calculations to sub-hourly and even sub-minute HV calculations. Because there is limited data, there is no baseline to compare to, so that element is excluded from this package.

That version is intended to read data from the IRIS Data Management Center (DMC) MUSTANG online service,3 which is a toolbox that provides processes for enabling data quality analysis services to data archived in the DMC. For example, a simple service query can extract power spectral density estimates, noise spectrograms, H/V plots, etc.

For guidelines on acquisition, processing, and interpration of H/V data, see: http://sesame.geopsy.org/Papers/HV_User_Guidelines.pdf.

Installation

Sprit may be installed from the pypi repository using the pip command:

pip install sprit

The sprit package is in active development. Add the --upgrade argument (pip install sprit --upgrade) to ensure you have the latest version. If there are prerelease versions newer than the latest stable version that you would like to try out, use the --pre flag, i.e., pip install sprit --pre.

This should be done using command line. It is recommended to do this in a virtual environment. For information on creating virtual environments in python, see this page. For the creation of anaconda environments, see here. Note that it is not officially recommended to use pip repositories in anaconda environments, but it often works without any issues.

For troubleshooting issues with installation or usage of the sprit package, see the Troubleshooting page of the wiki.

Examples

An example Jupyter notebook is provided in this main repository directory here.

Code examples include:

  • basic processing of sample HVSR data
  • Metadata/parameter specification
  • Data editing
  • Reading Tromino data into SpRIT
  • Reports and visualization
  • User interfaces
  • Export and import
  • Batch processing.

Documentation

  • API Documentation here
  • See Wiki for more tips, tutorials, usage guidelines, troubleshooting, and other information here
  • Pypi repository here

Web App

An experimental, browser based web app is available for use via Streamlit. you can find this at sprithvsr.streamlit.app

Dependencies

Aside from the modules in the python standard library, the following package dependencies must be installed in your environment for this package to work

  • Obspy: Python framework for processing seismological data
  • Numpy: "The fundamental package for scientific computing with Python"
  • Scipy: "Fundamental algorithms for scientific computing in Python"
  • Pandas: "A fast, powerful, flexible and easy to use open source data analysis and manipulation tool"
  • pyproj: Module for cartographic projections and coordinate transformations, a python interface to PROJ
  • Matplotlib: Comprehensive library for creating static, animated, and interactive visualizations in python
  • plotly: Open Source Graphing Library for Python that makes interactive, publication-quality graphs.

Dependencies specifically for GUIs

Jupyter Widget GUI

  • ipython
  • ipywidgets
  • nbformat

Streamlit GUI (browser based)

  • streamlit

References

Considerations

Summary from SESAME Project (from https://www.iitk.ac.in/nicee/wcee/article/13_2207.pdf): In very brief, the main learnings may be summarized as follows:

  • In situ soil / sensor coupling should be handled with care. Concrete and asphalt provide good results, whereas measuring on soft / irregular soils such as mud, grass, ploughed soil, ice, gravel, not compacted snow, etc. should be avoided. Artificial soil / sensor coupling should be avoided unless it is absolutely necessary, for example, to compensate a strong inclination of the soil. In such a case, either a pile of sand, or a trihedron should be used This soil/sensor coupling issue proves to be particularly important under windy conditions.
  • It is recommended not to measure above underground structures. Nearby surface structures should be considered with care, particularly under windy conditions.
  • Measurements under wind or strong rain should be avoided. Wind has been found to induce very significant low frequency perturbations.
  • The proximity of some specific noise sources should be considered with care (or avoided using an anti-trigger window selection to remove the transients): nearby walking, high speed car or truck traffic, industrial machinery, etc.
  • Results tend to be stable with time (if other parameters, such as weather conditions, etc. are kept constant).
  • No matter how strongly a parameter influences H/V amplitudes, the value of the frequency peak is usually not or slightly affected, with the noticeable exception of the wind in certain conditions.

Citation

If you use the sprit package in your research, please use the following citation:

Riley Balikian, Hongyu Xaio, Alexandra Sanchez. SPRIT HVSR: An open-source software package for processing, analyzing, and visualizing ambient seismic vibrations. Proceedings of the Geological Society of America, 2023. Pittsburgh, PA.

Project details


Release history Release notifications | RSS feed

This version

3.6

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sprit-3.6.tar.gz (47.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sprit-3.6-py3-none-any.whl (47.4 MB view details)

Uploaded Python 3

File details

Details for the file sprit-3.6.tar.gz.

File metadata

  • Download URL: sprit-3.6.tar.gz
  • Upload date:
  • Size: 47.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sprit-3.6.tar.gz
Algorithm Hash digest
SHA256 a0ea7cb3c01cc7d5f5b1dab1f23a1ff863d47751321e3094461ce5196ce3cf55
MD5 465c3ca8b772ba6459774d67d7bedd99
BLAKE2b-256 331cda25e24949f342d2891569c7bc9b68bbd6e140f1067b0960b97ad4518673

See more details on using hashes here.

File details

Details for the file sprit-3.6-py3-none-any.whl.

File metadata

  • Download URL: sprit-3.6-py3-none-any.whl
  • Upload date:
  • Size: 47.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sprit-3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a2119162f2e05255092950fda3395032b71f91fbd5da7108d49d89d75f604db4
MD5 f610d002e05583e5fd54f68cd982863a
BLAKE2b-256 8aad77d816f36dd26a4643949f7a8ef18c75b4f179f1d5bd2bd65fdd03dbcd74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page