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(staxml_dir="./staxml"),
    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.1.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.1-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aitana_access-0.1.1.tar.gz
Algorithm Hash digest
SHA256 192106c92c3a3baf9b1324b9f9a65239df194ca23fb6fdf3fb839917a188615d
MD5 bf6d6b788b2c05d94caeab73e2078e03
BLAKE2b-256 4679aba8fa094dd1551c65a9142a4c62b18c785163aaf0885a00f3c74e7b0115

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aitana_access-0.1.1-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.13

File hashes

Hashes for aitana_access-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5fa76ea187fea0e9e9327aa36d094a2ec598a2cd84d63b36b93696a26ddc4c0b
MD5 debb3717f0066a584b32b7be2002c96e
BLAKE2b-256 ece7681daaa46d888c97714f2c7a39df96605e818c1bb73de627bc4c0f3946fd

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