Cycle-dependent seismicity-rate transitions during fluid injection: Poisson change-point detection and analysis code

Read full text
Authors: Zhiwei Wang
Cited by: 0

Abstract

This repository releases the analysis code used to detect and quantify seismicity-rate transitions using a piecewise-constant Poisson rate model with statistically controlled change-point detection and uncertainty estimation. What this code does Given an earthquake catalog (origin times and magnitudes) within a user-defined time window, the script: Bins events into fixed-width time bins (default: 60 s). Generates candidate change points from two complementary detectors: GLR-style scan with symmetric pre/post windows (exact binomial test). Optional PELT candidates using the ruptures library (Poisson model, with robust fallback). Applies segment-aware pre/post comparison, where the pre/post durations are defined by neighboring change points (previous → jump → next), rather than a fixed window. Controls false positives via Benjamini–Hochberg FDR correction. Computes effect sizes and uncertainties: Pre/post rates with Garwood (exact Poisson) confidence intervals Rate ratio and log rate ratio with Wald-type uncertainty Produces a publication-ready diagnostic plot showing: binned counts fitted piecewise rate λ^(t) Poisson CI band detected “rise/fall” transitions marked by colored vertical lines Main outputs Printed tables of detected transitions (including pre/post rates, rate ratio, FDR-corrected p-values, and confidence intervals). A figure visualizing the piecewise Poisson fit and detected change points. Input requirements The input catalog is a CSV file containing at minimum: a time column (default: isotime) a magnitude column (default: magnitude) Users can set: analysis time window (T0, T2) magnitude completeness threshold (MC) detection parameters (bin width, GLR window length, spacing, FDR level) Dependencies Core dependencies: numpy, pandas, matplotlib scipy statsmodels Optional: ruptures (enables PELT candidate detection; the script runs without it) Suggested citation / use If you use this code in publications, please cite the associated manuscript and/or the Zenodo software record for this release.

Fields of Study & Subjects

Seismology and Earthquake Studies earthquake and tectonic studies Hydraulic Fracturing and Reservoir Analysis

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
18 January 2026