Skip to main content

GraviLab

Package to analyze seismic data based on obspy and spicypy packages.

Installation

pip install gravilab

Usage

The main element of the package is Seismometer class, which represents a seismic instrument. It can be created by loading seismic data with open function and specifying channels, both their names in the file and "human-readable" names. The folder is then scanned for any suitable data and only those channels are loaded. All functionality related to seismic time series data is provided by the underlying obspy package (specifically obspy.Trace).

Seismometer class also supports calculating spectrum (Seismometer.asd(), Seismometer.psd()) using spicypy package. Spectrum can be adjusted by the response of specific instrument specified by pole-zero model, and units can be converted between displacement, velocity and acceleration by specifying the omega factor. Resulting spectrum is spicypy.FrequencySeries. Additionally, time series can also be converted to spicypy.TimeSeries to profit from its rich signal processing functionality.

Minimal example:

import gravilab as gl
Seismometer1 = gl.open("seismic", channels = {"vertical":"HNZ","north":"HNY","east":"HNX"}, name="seismometer1")
Seismometer1.time_series["north"].plot()
response = {"poles" : [-0.036614 +0.037059j, -0.036614 -0.037059j, -32.55, -142, -364 +404j, -364 -404j, -1260, -4900 +5200j, -4900 -5200j, -7100 +1700j, -7100 -1700j],
            "zeros" : [0, 0, -31.63, -160, -350, -3177],
            "scale_factor" : 1202.5 * 8.31871e17 * 400000, #V/(m/s) times gain times counts/V
            "omega_exponent": -1, #convert from m/s to m
           }
Seismometer1.response = response
Seismometer1.asd()["north"].plot()

More detailed usage examples are provided in gravilab/examples folder.

Download files

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

Source Distribution

gravilab-0.1.5.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

gravilab-0.1.5-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file gravilab-0.1.5.tar.gz.

File metadata

  • Download URL: gravilab-0.1.5.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.9 Linux/7.0.0-29-generic

File hashes

Hashes for gravilab-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1d381fd862773ce86cf811d317873b58ca30f38208bb7f339d1c78b979c19b12
MD5 e5b431e9e4e97c14cc03b0d540abee45
BLAKE2b-256 e7b62e3061b1c5a5d27cfb28a4e885a0bffde0b06df447c524888b522a552489

See more details on using hashes here.

File details

Details for the file gravilab-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: gravilab-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.9 Linux/7.0.0-29-generic

File hashes

Hashes for gravilab-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d958e7ade87709c3589260a272044120a66ab8f9829da6dd882582f40ee926bf
MD5 5e767af3a9693eeb625230546ad62b50
BLAKE2b-256 d3b7f3bc13c81e4fd698fc8d9c7271747c2db3788ad781286ea69e048522e265

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.5 This release

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

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