Skip to main content

Calculating RSAM Value

Project description

magma-rsam

Python package to calculating RSAM Value

from magma_rsam import RSAM, PlotRsam

rsam = RSAM(
    seismic_dir="G:\\Output\\Converted\\SDS",
    station='AWU1',
    channel='EHZ',
    network = 'VG',
    location = '00',
    start_date = '2024-01-01',
    end_date = '2024-07-31',
    directory_structure = 'sds' # check https://github.com/martanto/magma-converter for supported directory
)

Apply filter:

rsam.apply_filter(freq_min=5.0, freq_max=18.0)

Run RSAM calculation:

rsam.run()

Plot RSAM

plot_rsam = PlotRsam(
    station = 'AWU1',
    channel = 'EHZ',
    network = 'VG',
    location = '00',
    start_date = '2024-01-01',
    end_date = '2024-07-31',
    resample = '10min'
)

Plot using filter:

plot_rsam.with_filter(
    freq_min=5.0,
    freq_max=18.0
)

Set y_limit:

plot_rsam.set_y_lim(
    y_min=0,
    y_max=1200
)

Run plot:

plot_rsam.run(
    metrics = ['mean', 'median'],
    windows = ['1d'],
    plot_as_log = False,
    datetime_interval = 7,
    colors = ['#FFEB3B', '#F44336'] # colors must have the same length of metrics*windows
)

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

magma_rsam-1.4.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

magma_rsam-1.4.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file magma_rsam-1.4.2.tar.gz.

File metadata

  • Download URL: magma_rsam-1.4.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for magma_rsam-1.4.2.tar.gz
Algorithm Hash digest
SHA256 c20cb26fef021f443992131a71d42e64e6a475c4a19e9698e60499f2a5ab5bbb
MD5 5a87c7eb4d4f63435b2f177b8f35622e
BLAKE2b-256 8482ea9ac0e65abc7b37ce684a3a4e7061e6c820039158e18f18de11fd163e53

See more details on using hashes here.

File details

Details for the file magma_rsam-1.4.2-py3-none-any.whl.

File metadata

  • Download URL: magma_rsam-1.4.2-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for magma_rsam-1.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6499228ca61679f70a4af9850a9114c1d49ed6bf6367919f6bb7c627d8343ed2
MD5 0d17c8ab38e4404589cc8b2cd4d4a6e7
BLAKE2b-256 6a5a86f66845866f91a9cfddc9fb3b7bb9a064424ae57289adf638c44b149026

See more details on using hashes here.

Supported by

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