ObsPy: a bridge for seismology into the scientific Python ecosystem

The Python libraries NumPy and SciPy are extremely powerful tools for numerical processing and analysis well suited to a large variety of applications. We developed ObsPy (http://obspy.org), a Python library for seismology intended to facilitate the development of seismological software packages and workflows, to utilize these abilities and provide a bridge for seismology into the larger scientific Python ecosystem. Scientists in many domains who wish to convert their existing tools and applications to take advantage of a platform like the one Python provides are confronted with several hurdles such as special file formats, unknown terminology, and no suitable replacement for a non-trivial piece of software. We present an approach to implement a domain-specific time series library on top of the scientific NumPy stack. In so doing, we show a realization of an abstract internal representation of time series data permitting I/O support for a diverse collection of file formats. Then we detail the integration and repurposing of well established legacy codes, enabling them to be used in modern workflows composed in Python. Finally we present a case study on how to integrate research code into ObsPy, opening it to the broader community. While the implementations presented in this work are specific to seismology, many of the described concepts and abstractions are directly applicable to other sciences, especially to those with an emphasis on time series analysis.

[1]  Martin Knapmeyer,et al.  Numerical Accuracy of Travel-time Software in Comparison with Analytic Results , 2005 .

[2]  B. Kennett,et al.  Traveltimes for global earthquake location and phase identification , 1991 .

[3]  H. Langer,et al.  Volcanic tremor location during the 2004 Mount Etna lava effusion , 2006 .

[4]  Ramón Ortiz,et al.  On the predictability of volcano-tectonic events by low frequency seismic noise analysis at Teide-Pico Viejo volcanic complex, Canary Islands , 2006 .

[5]  Thomas Lecocq,et al.  MSNoise, a Python Package for Monitoring Seismic Velocity Changes Using Ambient Seismic Noise , 2013 .

[6]  Jeroen Tromp,et al.  Spectral-element and adjoint methods in seismology , 2008 .

[7]  C. H. Chapman,et al.  The computation of seismic travel times , 1983 .

[8]  J. Arthur Snoke,et al.  Traveltime Tables for iasp91 and ak135 , 2009 .

[9]  Peter Brezany,et al.  The Data Bonanza: Improving Knowledge Discovery in Science, Engineering, and Business , 2013 .

[10]  Tim Palmer,et al.  The real butterfly effect , 2014 .

[11]  G. Reyes-Dávila,et al.  A model to describe precursory material-failure phenomena: applications to short-term forecasting at colima volcano, Mexico , 2001 .

[12]  Andreas Fichtner,et al.  Models and Fréchet kernels for frequency-(in)dependent Q , 2014 .

[13]  Robert A. Page,et al.  Seismological aspects of the 1989-1990 eruptions at redoubt volcano, Alaska: the SSAM perspective , 1994 .

[14]  Ramón Ortiz,et al.  Tectonic earthquakes triggering volcanic seismicity and eruptions. Case studies at Tungurahua and Popocatépetl volcanoes , 2010 .

[15]  Thomas J. Owens,et al.  The TauP Toolkit: Flexible Seismic Travel-Time and Raypath Utilities , 1999 .

[16]  Travis E. Oliphant,et al.  Python for Scientific Computing , 2007, Computing in Science & Engineering.

[17]  Christoph Sens-Schönfelder,et al.  Comprehensive observation and modeling of earthquake and temperature‐related seismic velocity changes in northern Chile with passive image interferometry , 2014 .

[18]  Lion Krischer,et al.  ObsPy – What can it do for data centers and observatories? , 2011 .

[19]  Heiner Igel,et al.  Accelerated 3-D full-waveform inversion using simultaneously encoded sources in the time domain: application to Valhall ocean-bottom cable data , 2013 .

[20]  Elliot T. Endo,et al.  Real-time Seismic Amplitude Measurement (RSAM): a volcano monitoring and prediction tool , 1991 .

[21]  Lion Krischer,et al.  ObsPy: A Python Toolbox for Seismology , 2010 .

[22]  Heiner Igel,et al.  Examining ambient noise using colocated measurements of rotational and translational motion , 2012, Journal of Seismology.

[23]  Joachim Wassermann,et al.  Microseismicity observed at a non-pressure-stimulated geothermal power plant , 2014 .