benchflow-ai/skillsbench/obspy-data-api
Claude Code and agent skill by benchflow-ai/skillsbench
- community
Checking that the SKILL.md file is still in the repository.
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, or manipulating custom data into standard objects for downstream use cases such as ObsPy's signal processing routines or SeisBench's modeling API.
Install
npx vskill@latest install benchflow-ai/skillsbench/obspy-data-apiSKILL.md
The same SKILL.md was published earlier as benchflow-ai/skillsbench/obspy-data-api.
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: Stream → Trace (multiple)
Trace - DATA:
data→ NumPy arraystats:network,station,location,channel— Determine physical location and instrumentstarttime,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.
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: Catalog → events → Event (multiple)
Event contains:
origins→Origin(multiple)latitude,longitude,depth,time, ...magnitudes→Magnitude(multiple)mag,magnitude_type, ...picksfocal_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: Inventory → networks → Network → stations → Station → channels → Channel
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/Function | Description | |
|---|---|---|
read | Read waveform files into an ObsPy Stream object. | |
Stream | List-like object of multiple ObsPy Trace objects. | |
Trace | An object containing data of a continuous series, such as a seismic trace. | |
Stats | A container for additional header information of an ObsPy Trace object. | |
UTCDateTime | A UTC-based datetime object. | |
read_events | Read event files into an ObsPy Catalog object. | |
Catalog | Container for Event objects. | |
Event | Describes a seismic event which does not necessarily need to be a tectonic earthquake. | |
read_inventory | Function to read inventory files. | |
Inventory | The root object of the Network → Station → Channel hierarchy. |
Modules
| Module | Description | |
|---|---|---|
obspy.core.trace | Module for handling ObsPy Trace and Stats objects. | |
obspy.core.stream | Module for handling ObsPy Stream objects. | |
obspy.core.utcdatetime | Module containing a UTC-based datetime class. | |
obspy.core.event | Module handling event metadata. | |
obspy.core.inventory | Module for handling station metadata. | |
obspy.core.util | Various utilities for ObsPy. | |
obspy.core.preview | Tools for creating and merging previews. |
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtasks/seismic-phase-picking/environment/skills/obspy-data-api/SKILL.md
Popularity
- Repository stars
- 1,474
- Repository forks
- 325
- 7-day trend score
- 36
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/benchflow-ai/skillsbench/obspy-data-api)