Skip to main content

DOI

SPRĪT

SpRIT Logo

SpRĪT (pronounced "sprite") is the Spectral Ratio Investigation Toolset, a free open-source, python-based package for basic Horizontal Vertical Spectral Ratio (HVSR) processing, using any data format readable by the Obspy python package. SpRIT also supports input from select Tromino sensors (currently, 3G, 3G+, and Blue). SpRIT allows for rapid and accurate processing of HVSR data using simple, user-friendly interfaces to the well-established HVSR algorithms. It has been developed and tested by scientists at the Illinois State Geological Survey, part of the Prairie Research Institute at the University of Illinois, and is intended for use in the classroom, by graduate and undergraduate researchers, and professionals alike. Any issues, questions, or feature requests can be submitted here.


Documentation

  • API Documentation: ReadtheDocs or Github Pages
  • See Wiki for more tips, tutorials, usage guidelines, troubleshooting, and other information here
  • Pypi repository here

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 l ike 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 we have not encountered any issues in our testing with conda environments.

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

Usage and Examples

Using SpRIT is designed to be simple for students and professionals alike. To carry out HVSR on seismic data, all that is needed is a seismic file readable by ObsPy with the proper seismometer components (usually, a Z, E, and N component).

Example HTML Report (Can also be viewed here)

SpRIT HTML Report

There are three interfaces to the SpRIT HVSR processing code:

  • Python interface: sprit.run(input_data=seisimic_data)
  • Command line interface: sprit seismic_data
  • Graphical User Interfaces (see below)

In the above examples, input_data accepts the following inputs:

Additional options and parameters available for the sprit.run() workflow can be viewed using help(sprit.run) in the python interface or sprit -h in command line, or by viewing the documentation (links above).

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
  • Cross Section Plotting

Web App

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

HVSR Background

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.

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.

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.14.1.tar.gz (67.9 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.14.1-py3-none-any.whl (68.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sprit-3.14.1.tar.gz
  • Upload date:
  • Size: 67.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sprit-3.14.1.tar.gz
Algorithm Hash digest
SHA256 66ac54ed33a88cb8ebc9e73a923b9cc7dc9bfe2b4ee6cfb75bfbea0ff90f598a
MD5 92e53d41a30c88007ac260d79769d831
BLAKE2b-256 3bc1abe5d5ae0a8d4fc1ed285320dc44bfe57ca0608191a44192368d23e20723

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sprit-3.14.1-py3-none-any.whl
  • Upload date:
  • Size: 68.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sprit-3.14.1-py3-none-any.whl
Algorithm Hash digest
SHA256 04600780790f41ee6ecd15e9c3114bbbb7bae75db9a060a81b1260555d81a4dc
MD5 f51f8d837b23975e1fbf6f6972dacc63
BLAKE2b-256 80afadf956382e8b60afd3e8cade16135685931bca83a0342f2ed4f5459cb6e3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.14.1 This release

2 files

3.14

2 files

3.13.2

2 files

3.13.1

2 files

3.13.0

2 files

3.12.3

2 files

3.12.2

2 files

3.12.1

2 files

3.12.0

2 files

3.11.2

2 files

3.11.1

2 files

3.11.0

2 files

3.10

2 files

3.9

2 files

3.8

2 files

3.7.1

2 files

3.7

2 files

3.6

2 files

3.5

2 files

3.4.4

2 files

3.4.3

2 files

3.4.0

2 files

3.3.1

2 files

3.3

2 files

3.2.3

2 files

3.2.2

2 files

3.2.1

2 files

3.2.0

2 files

3.1.3

2 files

3.1.2

2 files

3.1.1

2 files

3.1.0

2 files

3.0.1

2 files

2.9.0

2 files

2.8.9

2 files

2.8.8

2 files

2.8.7

2 files

2.8.6

2 files

2.8.4

2 files

2.8.3

2 files

2.8.2

2 files

2.8.1

2 files

2.8

2 files

2.7.3

2 files

2.7.2

2 files

2.7.1

2 files

2.7.0

2 files

2.6.5

2 files

2.6.4

2 files

2.6.3

2 files

2.6.2

2 files

2.6.1

2 files

2.6.0

2 files

2.5.0

2 files

2.4.1

2 files

2.4.0

2 files

2.3.6

2 files

2.3.5

2 files

2.3.4

2 files

2.3.3

2 files

2.3.2

2 files

2.3.1

2 files

2.3

2 files

2.2

2 files

2.0

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4

2 files

1.3.1

2 files

1.3

2 files

1.1.1

2 files

1.1.0

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.1.73.dev0

2 files

0.1.72.dev0

2 files

0.1.66

2 files

0.1.65

2 files

0.1.64

2 files

0.1.63

2 files

0.1.62

2 files

0.1.61

2 files

0.1.60

2 files

0.1.59

2 files

0.1.57

2 files

0.1.55

2 files

0.1.54

2 files

0.1.53

2 files

0.1.52

2 files

0.1.51

2 files

0.1.50

2 files

0.1.49

2 files

0.1.48

2 files

0.1.46

2 files

0.1.45

2 files

0.1.44

2 files

0.1.43

2 files

0.1.42

2 files

0.1.40

2 files

0.1.39

2 files

0.1.38

2 files

0.1.37

2 files

0.1.36

2 files

0.1.35

2 files

0.1.34

2 files

0.1.33

2 files

0.1.31

2 files

0.1.30

2 files

0.1.29

2 files

0.1.25

2 files

0.1.24

2 files

0.1.22

2 files

0.1.20

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.13

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.7

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page