Skip to content
/ dsar Public

Displacement Seismic Amplitude Ratio (DSAR) value

License

Notifications You must be signed in to change notification settings

martanto/dsar

Repository files navigation

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