Skip to main content

Pure I/O access layer for volcano monitoring data (GeoNet TILDE, WFS, seismic waveforms).

Project description

aitana-access

Pure I/O access layer for volcano monitoring data: GeoNet TILDE observations, GeoNet WFS earthquake catalogues, and seismic/acoustic waveforms (local SDS archive, FDSN web services, or GeoNet's open S3 data archive).

Installation

pip install aitana-access

Usage

TILDE observations

from datetime import datetime
from aitana.access.tilde import tilde_request

df = tilde_request(
    start_date=datetime(2019, 1, 1),
    end_date=datetime(2019, 1, 3),
    domain="envirosensor",
    name="lake-temperature",
    station="RU001",
    sensor="01",
)  # -> pandas.DataFrame indexed by datetime, columns ["obs", "err"]

WFS earthquake catalogue

from datetime import datetime
from aitana.access.wfs import wfs_request

cat = wfs_request(
    start_date=datetime(2020, 1, 1),
    end_date=datetime(2020, 2, 1),
    center_point="176.17+-39.28",
    radius=20000,   # metres
    maxdepth=30,    # km
)  # -> pandas.DataFrame indexed by origintime

Provide either radius + center_point, or polygon (as "lon1+lat1,lon2+lat2,...,lonN+latN,lon1+lat1").

Seismic waveforms

SeismicData fetches waveforms from one or more clients (tried in order, first success wins) and yields obspy.Trace/Stream objects with instrument sensitivity removed.

from obspy import UTCDateTime
from aitana.access.seismic import SeismicData, FDSNWaveforms, S3Waveforms

clients = [
    S3Waveforms(),
    FDSNWaveforms(url="https://service.geonet.org.nz"),
]
ds = SeismicData(clients)

for trace in ds.get_waveforms(
    net="NZ", site="WIZ", loc="10", comp="HHZ",
    start=UTCDateTime("2020-01-01"),
    end=UTCDateTime("2020-01-02"),
):
    print(trace)

Other waveform clients: SDSWaveforms (local SDS archive), MockSDSWaveforms (synthetic data for testing). All implement get_waveforms(net, site, loc, comp, startdate, enddate).

FastAPI service

aitana.access.api.AitanaAPI exposes /waveform and /spectrogram endpoints over HTTP.

python -m aitana.access.api --rootdir /data --port 8003

License

See the repository root for license information.

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

aitana_access-0.1.2.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

aitana_access-0.1.2-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file aitana_access-0.1.2.tar.gz.

File metadata

  • Download URL: aitana_access-0.1.2.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for aitana_access-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d8a5e65796266aaa67be6927097e50ff808b183371c91197c04d0f8f1994f8fe
MD5 f4a74165444800adf9ae621d29fd2db6
BLAKE2b-256 56ebd4ce98e868f938c2cd38408dc5ccead1b2e3d42095425d29ec9e17f8ed99

See more details on using hashes here.

File details

Details for the file aitana_access-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: aitana_access-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for aitana_access-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1d6e2e9db9929eaae150ec323eff0839b2098ae75fda1c7743c70450aefb7d80
MD5 b4c5a6cf3c5e97aca96b4630a4f83a1e
BLAKE2b-256 d543af3b635fb97339edd2c8ef3753be0a3e1a76247e1dba05f0768a505899f2

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