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.0.tar.gz (9.6 kB view hashes)

Uploaded Source

Built Distribution

magma_rsam-1.4.0-py3-none-any.whl (11.3 kB view hashes)

Uploaded Python 3

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