[ Skip to content]
Python codes for modelling seismicity and deformation data
On this page I'm providing Python scripts to simulate and fit strain and seismicity data associated with "acceleration-to-failure" processes. If you plan to use these scripts as part of publication, please reference Bell et al. 2011 (GRL).
NEW!!! - Updated in June 2013 to include maximum-likelihood forecasting methods from Bell et al. 2013 (GJI). here
Here are two Python scripts to generate:
Two example data files are also provided.
Retrospective data analysis:
Here are Python scripts to fit power-law accelerations to failure in strain and earthquake/AE data using different methods (parameter confidence intervals to follow):
Bayesian model comparison:
Information criterion are a pragmatic tool for comparing the performance of models, taking model complexity into account. Here I provide a code for using the Akaike information criterion (AIC) for comparing a power-law and exponential model for accelerating rates of earthquakes (using Ogata's maximum likelihood method to fit the models). The preferred model is the one with the lower AIC; see Bell et al. 2011 (GJI) for examples. Note that rigorous model comparison requires calculation of the Bayesian "evidence" (see Toussaint, 2011, for discussion).
Bell et al. 2013 (GJI) outlines maximum-likelihood methods for fitting and forecasting accelerating rates of earthquakes.
These scripts are written in Python. Python is a general-purpose, readable, high-level programming language. It is open source, with community development. NumPy is an extension to Python that allows operation on multi-dimensional arrays and matrices. SciPy is a library of mathematical tools. Matplotlib is a plotting library. Together these components provide a free, open source alternative to Matlab.
For windows users I recommend the Pythonxy distribution of Python, based on Qt and Spyder.
© School of GeoSciences ---
Privacy & Cookies ---
Last modified: 25 Jun, 2013 --- Page contact: