Skip to main content

Calculating Displacement Seismic Amplitude Ratio (DSAR) Value

Project description

Displacement Seismic Amplitude Ratio (DSAR)

How to Use

Install using pip:

pip install dsar

Import dsar module

from dsar import DSAR, PlotDsar

Initiate DSAR

dsar = DSAR(
    input_dir="G:\\Output\\Converted\\SDS",
    directory_structure='SDS',
    start_date="2024-01-01",
    end_date="2024-04-22",
    station="RUA3",
    channel="EHZ",
    resample="10min" # default
)

See https://github.com/martanto/magma-converter for supported directory_structure.

Run DSAR

dsar.run()

Results/Output directory

Output directory would be as the same folder where DSAR code is running. It will create output directory.

Plot DSAR

Initiate DSAR plot

plot = PlotDsar(
    start_date="2024-01-01",
    end_date="2024-04-22",
    station="RUA3",
    channel="EHZ"
)

Get combined dataframe to plot

df = plot.df

The output of dataframe will be saved as CSV:

✅ Saved to D:\Project\dsar\output\dsar\VG.RUA3.00.EHZ\combined_10min_VG.RUA3.00.EHZ.csv

Plot DSAR:

plot.plot(
    interval_day=7,
    y_min=85,
    y_max=225,
    save=True,
    file_type='jpg',
)

Output:

✅ Saved to D:\Project\dsar\output\dsar\VG.RUA3.00.EHZ\combined_10min_VG.RUA3.00.EHZ.csv
📷 Figure saved to: D:\Project\dsar\output\figures\dsar\VG.RUA3.00.EHZ\VG.RUA3.00.EHZ_10min_2024-01-01-2024-04-22.jpg

Figures: output.png

References

Caudron, C., et al., 2019, Change in seismic attenuation as a long-term precursor of gas-driven eruptions: Geology, https://doi.org/10.1130/G46107.1

Chardot, L., Jolly, A. D., Kennedy, B. M., Fournier, N., & Sherburn, S. (2015). Using volcanic tremor for eruption forecasting at White Island volcano (Whakaari), New Zealand. Journal of Volcanology and Geothermal Research, 302, 11–23. https://doi.org/10.1016/j.jvolgeores.2015.06.001

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

dsar-1.3.0.tar.gz (573.1 kB view details)

Uploaded Source

Built Distribution

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

dsar-1.3.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file dsar-1.3.0.tar.gz.

File metadata

  • Download URL: dsar-1.3.0.tar.gz
  • Upload date:
  • Size: 573.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dsar-1.3.0.tar.gz
Algorithm Hash digest
SHA256 718f123201d8654d0c32d7182213abab632016443cb24f56e6da1665d5ec33af
MD5 f65d3f265f495b7cc43456e6be7d5ed5
BLAKE2b-256 d6ec5a14dc01a09a70f8dc9edf6815937231f4dd757b9c78d2ef82088add098e

See more details on using hashes here.

File details

Details for the file dsar-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: dsar-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dsar-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 142171a59f2c856626a9020fdb30136d89a3da3864362f76c81ea3ce11bd1e66
MD5 9e3daf3a1fae2e14e9529e06bc6ed52a
BLAKE2b-256 17a780b5b7047973be058d1bfa3ecbf6f56068a5e8638abf6d9689b22e86f572

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