Package to analyze seismic data based on obspy and spicypy packages.
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gravilab-0.1.4.tar.gz.
File metadata
- Download URL: gravilab-0.1.4.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.9 Linux/6.8.0-52-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
741907d88131be317baac41de3f97cba67ae0b523d4fd316c8ee032526fcc231
|
|
| MD5 |
0c5115c7550b6677e0fbba6daf024dbe
|
|
| BLAKE2b-256 |
793321f06bae65b05ba5e01e656ab64f21794e60e7ea77b6dccadc7eeaf30928
|
File details
Details for the file gravilab-0.1.4-py3-none-any.whl.
File metadata
- Download URL: gravilab-0.1.4-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/6.8.0-52-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6898204342431c6f65ab2c3d486843918e3aebcc1544b42b2571108eb7a40d5
|
|
| MD5 |
f1f084e5a453e945920333df38884fc6
|
|
| BLAKE2b-256 |
9bed27325b99db40115f5f2971f7123baa19d86633462d3e6793bcd1c4adaf7f
|