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.8.1.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

magma_rsam-1.8.1-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for magma_rsam-1.8.1.tar.gz
Algorithm Hash digest
SHA256 c5f2ff96e6a6aa4e956786911e19734acd8678e0616008e353fe40160a6aa382
MD5 d914023404ee2b5bb9883d04249c853f
BLAKE2b-256 030b53e10114b7e187b725a279a6e5257116e9cc37f24c484942620a0a7bbb08

See more details on using hashes here.

File details

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

File metadata

  • Download URL: magma_rsam-1.8.1-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for magma_rsam-1.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d28fe07c8c159a3b9e8f44aa3d667f08fcf1038710fda053504521796321c229
MD5 5a96f0b018f49fb8da9cdadd6d8912c9
BLAKE2b-256 8c11780222cdad8d2b19fe96640109a4c23cea7388563b600c6a23bb88a02691

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