skills/43-wentorai-research-plugins/skills/domains/geoscience/seismology-data-guide/SKILL.md
Earthquake data analysis, seismogram processing, and seismic research
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research seismology-data-guideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A skill for processing seismic data, analyzing earthquake catalogs, and working with seismograms using standard tools in observational seismology. Covers data retrieval from global networks, waveform processing with ObsPy, magnitude estimation, focal mechanism analysis, and seismic hazard assessment.
| Data Center | Abbreviation | Coverage | Access | |-------------|-------------|----------|--------| | IRIS Data Management Center | IRIS DMC | Global broadband | FDSN Web Services | | European Integrated Data Archive | EIDA | European networks | FDSN Web Services | | USGS Earthquake Hazards Program | USGS EHP | Global catalog | API + ComCat | | International Seismological Centre | ISC | Global bulletin | ISC web services | | NIED F-net | F-net | Japan broadband | NIED website |
from obspy.clients.fdsn import Client
from obspy import UTCDateTime
client = Client("IRIS")
# Fetch earthquake catalog for a region and time window
catalog = client.get_events(
starttime=UTCDateTime("2024-01-01"),
endtime=UTCDateTime("2024-12-31"),
minmagnitude=5.0,
maxmagnitude=9.0,
minlatitude=30.0, maxlatitude=45.0,
minlongitude=125.0, maxlongitude=150.0,
orderby="magnitude",
)
print(f"Found {len(catalog)} events")
for event in catalog[:5]:
origin = event.preferred_origin()
mag = event.preferred_magnitude()
print(f" M{mag.mag:.1f} {origin.time} "
f"({origin.latitude:.2f}, {origin.longitude:.2f}) "
f"depth={origin.depth/1000:.1f} km")
from obspy import UTCDateTime
from obspy.clients.fdsn import Client
client = Client("IRIS")
# Download waveform data for a specific event
t = UTCDateTime("2024-01-01T07:10:00")
st = client.get_waveforms(
network="IU", station="ANMO", location="00", channel="BHZ",
starttime=t, endtime=t + 600, # 10 minutes of data
)
# Standard preprocessing pipeline
st.detrend("demean") # Remove mean
st.detrend("linear") # Remove linear trend
st.taper(max_percentage=0.05, type="cosine") # Taper edges
st.filter("bandpass", freqmin=0.01, freqmax=5.0, corners=4)
# Remove instrument response to get ground velocity (m/s)
inv = client.get_stations(
network="IU", station="ANMO", location="00", channel="BHZ",
starttime=t, endtime=t + 600, level="response",
)
st.remove_response(inventory=inv, output="VEL", pre_filt=[0.005, 0.01, 8, 10])
import numpy as np
from scipy.signal import welch
def compute_psd(trace, nperseg=256):
"""
Compute power spectral density of a seismic trace.
Returns frequencies (Hz) and PSD (dB relative to 1 (m/s)^2/Hz).
"""
freqs, psd = welch(
trace.data,
fs=trace.stats.sampling_rate,
nperseg=nperseg,
noverlap=nperseg // 2,
)
psd_db = 10 * np.log10(psd + 1e-30)
return freqs, psd_db
from obspy.signal.trigger import recursive_sta_lta, trigger_onset
def pick_arrivals(trace, sta_seconds=1.0, lta_seconds=30.0,
threshold_on=3.5, threshold_off=1.0):
"""
STA/LTA trigger for P-wave arrival detection.
sta_seconds: short-term average window
lta_seconds: long-term average window
Returns list of (on_sample, off_sample) trigger windows.
"""
df = trace.stats.sampling_rate
cft = recursive_sta_lta(
trace.data,
int(sta_seconds * df),
int(lta_seconds * df),
)
triggers = trigger_onset(cft, threshold_on, threshold_off)
return triggers, cft
Determining earthquake hypocenter from arrival times:
# Simplified grid search earthquake location
def grid_search_locate(stations, arrival_times, velocity_model,
lat_range, lon_range, depth_range, grid_spacing):
"""
Brute-force grid search for earthquake location.
Minimizes sum of squared travel-time residuals.
"""
best_misfit = float("inf")
best_location = None
for lat in np.arange(*lat_range, grid_spacing):
for lon in np.arange(*lon_range, grid_spacing):
for depth in np.arange(*depth_range, grid_spacing):
residuals = []
for sta, obs_time in zip(stations, arrival_times):
dist = geodetic_distance(lat, lon, sta.lat, sta.lon)
pred_time = velocity_model.get_travel_time(dist, depth)
residuals.append((obs_time - pred_time) ** 2)
misfit = sum(residuals)
if misfit < best_misfit:
best_misfit = misfit
best_location = (lat, lon, depth)
return best_location, best_misfit
| Scale | Symbol | Measurement | Range | |-------|--------|------------|-------| | Local (Richter) | ML | Max amplitude on Wood-Anderson | < 6.5 | | Body wave | mb | P-wave amplitude at 1 Hz | 4-7 | | Surface wave | Ms | Rayleigh wave at 20s period | 5-8.5 | | Moment | Mw | Seismic moment from waveform | All sizes |
Moment magnitude is the standard for modern seismology:
def moment_magnitude(seismic_moment_nm: float) -> float:
"""
Compute moment magnitude from seismic moment (in Newton-meters).
Mw = (2/3) * log10(M0) - 6.07 (Hanks and Kanamori, 1979)
"""
return (2.0 / 3.0) * np.log10(seismic_moment_nm) - 6.07
Beach ball diagrams represent earthquake source geometry. The fault plane solution requires at least 8-10 well-distributed first-motion polarities (up/down) or full waveform moment tensor inversion.
Tools for focal mechanism determination:
tools
Recommend AND run open-source AI tools, agents, Claude Code / Codex skills, and MCP servers for any stage of a literature review — searching, reading, extracting, synthesizing, screening, citation-checking, and paper writing. Use when the user asks "what tool should I use to..." OR "install/run/use <tool> to ..." for research/lit-review work: automating a survey or related-work section, PDF→Markdown extraction for LLMs (MinerU/marker/docling), PRISMA / systematic review (ASReview), citation-backed Q&A over PDFs (PaperQA2), wiring papers into Claude/Cursor via MCP (arxiv/paper-search/zotero servers), or chatting with a Zotero library. Ships a launcher (scripts/litrun.py) that installs each tool in an isolated venv and runs it. Curated catalog of 70+ vetted projects. 支持中英文(用于「文献综述工具选型」与「一键安装/运行」)。
development
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
documentation
Use when the project collects primary data or runs a field, lab, or survey experiment, before the intervention begins — write the pre-analysis plan, size the sample from a power calculation, and register with the AEA RCT Registry. Apply after the design is chosen in aer-identification and before any outcome data are seen.
tools
Guide economists to authoritative data sources with explicit, confirmed data specifications before retrieval; interfaces with Playwright MCP to navigate portals and extract real data, not articles about data.