Seismic phase picking

From XuShuwenn/RedAct · View interactive version

Seismic phase picking is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Pick P and S wave arrival times from seismic waveform data using deep learning or signal processing methods.

How to use this skill

Skill file

Seismic Phase Picking

When to Use

Input Data

Output Format

CSV at /root/results.csv:

file_name,phase,pick_idx

Performance Requirements

Approaches

  1. Use SeisBench deep learning models (PhaseNet, EQTransformer)
  2. STA/LTA (short-term average / long-term average)
  3. Energy-based detection
  1. Recommended order under uncertainty: inspect sample files and metadata first, build a lightweight STA/LTA or energy-based baseline that can write the required CSV, then try SeisBench/ObsPy only if dependencies are already available or quick to verify.
  2. Pure NumPy/SciPy fallback: use vertical-dominant onset evidence for P and horizontal-energy or envelope increase after P for S.
  3. Prefer component-aware picking over a single collapsed trace: when channel orientation is available, use Z-like vertical channels for P candidates and N/E-like horizontal channels for S candidates.
  4. If using heuristics, score candidate onsets separately for P and S rather than detecting both phases from one fully collapsed RMS/mean signal.

Execution Workflow

Execution Workflow

  1. Inspect 1-5 .npz files first and confirm actual keys, shapes, dt, how channels is encoded, and channel ordering.
  2. Check which Python packages are already available before depending on heavy libraries; treat SeisBench and ObsPy as optional accelerators, not mandatory dependencies.
  3. Start with the lightest workable end-to-end method on one file, validate that it produces plausible pick_idx values, then scale to all files.
  4. Handle channels defensively: it may be a comma-separated string or another array/object form; normalize it once and reuse that logic.
  5. Do not assume fixed arrival windows such as "P in first half" or "S in second half" unless inspection or metadata supports them.
  6. If a method returns many candidate peaks, debug the final selection rule before changing sensitivity; do not blindly take the first detected peak or judge revisions only by total pick counts.
  7. If optional-package setup is slow, failing, or unverified after a concrete check, pivot immediately to the fallback method instead of spending the run on installs.
  8. Time-box single-file debugging: validate on a few files, then implement batch processing across all /root/data/*.npz files and write /root/results.csv in the required schema.

Tips

Tips

Validation and Finalization

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.