obspy-data-api

v0.1.0

An overview of the core data API of ObsPy, a Python framework for processing seismological data. It is useful for parsing common seismological file formats,...

0· 78·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for wu-uk/earthquake-phase-association-obspy-data-api.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "obspy-data-api" (wu-uk/earthquake-phase-association-obspy-data-api) from ClawHub.
Skill page: https://clawhub.ai/wu-uk/earthquake-phase-association-obspy-data-api
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install earthquake-phase-association-obspy-data-api

ClawHub CLI

Package manager switcher

npx clawhub@latest install earthquake-phase-association-obspy-data-api
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The skill name and description match the SKILL.md content (an overview of ObsPy's data API). There are no extra environment variables, binaries, or unrelated capabilities requested.
Instruction Scope
SKILL.md contains API documentation and example Python snippets referencing obspy.read(), Streams, Traces, and example URLs. It does not instruct the agent to read arbitrary host files, access unrelated system paths, exfiltrate data, or call endpoints outside typical ObsPy example URLs.
Install Mechanism
No install spec or code files are present (instruction-only). Nothing will be downloaded or written to disk by an installer.
Credentials
No environment variables, credentials, or config paths are requested. There are no disproportionate secret requests relative to the documented purpose.
Persistence & Privilege
The skill is not always-enabled and does not request elevated or persistent privileges. It does not modify other skills' configs or request system-wide changes.
Assessment
This skill is documentation-only and appears safe to install from a permissions standpoint. It does not request credentials or perform installs. Note: it only documents the ObsPy API — it does not provide the obspy package itself. If you plan to run the example Python snippets, install the official obspy package (e.g., via pip) in a controlled environment, and be cautious if an agent is given permission to execute code or read local files (the docs mention read() can load local files). Always avoid giving skills access to sensitive files or secrets unless strictly required.

Like a lobster shell, security has layers — review code before you run it.

latestvk976yxvaearwz10cf2rnkx841584vpym
78downloads
0stars
1versions
Updated 1w ago
v0.1.0
MIT-0

ObsPy Data API

Waveform Data

Summary

Seismograms of various formats (e.g. SAC, MiniSEED, GSE2, SEISAN, Q, etc.) can be imported into a Stream object using the read() function.

Streams are list-like objects which contain multiple Trace objects, i.e. gap-less continuous time series and related header/meta information.

Each Trace object has the attribute data pointing to a NumPy ndarray of the actual time series and the attribute stats which contains all meta information in a dict-like Stats object. Both attributes starttime and endtime of the Stats object are UTCDateTime objects.

A multitude of helper methods are attached to Stream and Trace objects for handling and modifying the waveform data.

Stream and Trace Class Structure

Hierarchy: StreamTrace (multiple)

Trace - DATA:

  • data → NumPy array
  • stats:
    • network, station, location, channel — Determine physical location and instrument
    • starttime, sampling_rate, delta, endtime, npts — Interrelated

Trace - METHODS:

  • taper() — Tapers the data.
  • filter() — Filters the data.
  • resample() — Resamples the data in the frequency domain.
  • integrate() — Integrates the data with respect to time.
  • remove_response() — Deconvolves the instrument response.

Example

A Stream with an example seismogram can be created by calling read() without any arguments. Local files can be read by specifying the filename, files stored on http servers (e.g. at https://examples.obspy.org) can be read by specifying their URL.

>>> from obspy import read
>>> st = read()
>>> print(st)
3 Trace(s) in Stream:
BW.RJOB..EHZ | 2009-08-24T00:20:03.000000Z - ... | 100.0 Hz, 3000 samples
BW.RJOB..EHN | 2009-08-24T00:20:03.000000Z - ... | 100.0 Hz, 3000 samples
BW.RJOB..EHE | 2009-08-24T00:20:03.000000Z - ... | 100.0 Hz, 3000 samples
>>> tr = st[0]
>>> print(tr)
BW.RJOB..EHZ | 2009-08-24T00:20:03.000000Z - ... | 100.0 Hz, 3000 samples
>>> tr.data
array([ 0.        ,  0.00694644,  0.07597424, ...,  1.93449584,
        0.98196204,  0.44196924])
>>> print(tr.stats)
         network: BW
         station: RJOB
        location:
         channel: EHZ
       starttime: 2009-08-24T00:20:03.000000Z
         endtime: 2009-08-24T00:20:32.990000Z
   sampling_rate: 100.0
           delta: 0.01
            npts: 3000
           calib: 1.0
           ...
>>> tr.stats.starttime
UTCDateTime(2009, 8, 24, 0, 20, 3)

Event Metadata

Event metadata are handled in a hierarchy of classes closely modelled after the de-facto standard format QuakeML. See read_events() and Catalog.write() for supported formats.

Event Class Structure

Hierarchy: CatalogeventsEvent (multiple)

Event contains:

  • originsOrigin (multiple)
    • latitude, longitude, depth, time, ...
  • magnitudesMagnitude (multiple)
    • mag, magnitude_type, ...
  • picks
  • focal_mechanisms

Station Metadata

Station metadata are handled in a hierarchy of classes closely modelled after the de-facto standard format FDSN StationXML which was developed as a human readable XML replacement for Dataless SEED. See read_inventory() and Inventory.write() for supported formats.

Inventory Class Structure

Hierarchy: InventorynetworksNetworkstationsStationchannelsChannel

Network:

  • code, description, ...

Station:

  • code, latitude, longitude, elevation, start_date, end_date, ...

Channel:

  • code, location_code, latitude, longitude, elevation, depth, dip, azimuth, sample_rate, start_date, end_date, response, ...

Classes & Functions

Class/FunctionDescription
readRead waveform files into an ObsPy Stream object.
StreamList-like object of multiple ObsPy Trace objects.
TraceAn object containing data of a continuous series, such as a seismic trace.
StatsA container for additional header information of an ObsPy Trace object.
UTCDateTimeA UTC-based datetime object.
read_eventsRead event files into an ObsPy Catalog object.
CatalogContainer for Event objects.
EventDescribes a seismic event which does not necessarily need to be a tectonic earthquake.
read_inventoryFunction to read inventory files.
InventoryThe root object of the NetworkStationChannel hierarchy.

Modules

ModuleDescription
obspy.core.traceModule for handling ObsPy Trace and Stats objects.
obspy.core.streamModule for handling ObsPy Stream objects.
obspy.core.utcdatetimeModule containing a UTC-based datetime class.
obspy.core.eventModule handling event metadata.
obspy.core.inventoryModule for handling station metadata.
obspy.core.utilVarious utilities for ObsPy.
obspy.core.previewTools for creating and merging previews.

Comments

Loading comments...