EGU21-5772, updated on 04 Mar 2021
EGU General Assembly 2021
© Author(s) 2021. This work is distributed under
the Creative Commons Attribution 4.0 License.

Developing open-source tools for reproducible inverse problems: the PyLops journey

Matteo Ravasi1, Carlos Alberto da Costa Filho2, Ivan Vasconcelos3, and David Vargas3
Matteo Ravasi et al.
  • 1Earth Science and Engineering, King Abdullah University of Science and Technology, Saudi Arabia
  • 2CGG, Rio de Janeiro, Brazil
  • 3Utrecht University, Utrecht, Netherlands

Inverse problems lie at the core of many geophysical algorithms, from earthquake and exploration seismology, all the way to electromagnetics and gravity potential methods.

In 2018, we open-sourced PyLops, a Python-based framework for large-scale inverse problems. By leveraging the concept of matrix-free linear operators – together with the efficiency of numerical libraries such as NumPy, SciPy, and Numba – PyLops solves computationally intensive inverse problems with high-level code that is highly readable and resembles the underlying mathematical formulation. While initially aimed at researchers, its parsimonious software design choices, large test suite, and thorough documentation render PyLops a reliable and scalable software package easy to run both locally and in the cloud.

Since its initial release, PyLops has incorporated several advancements in scientific computing leading to the creation of an entire ecosystem of tools: operators can now run on GPUs via CuPy, scale to distributed computing through Dask, and be seamlessly integrated into PyTorch’s autograd to facilitate research in machine-learning-aided inverse problems. Moreover, PyLops contains a large variety of inverse solvers including least-squares, sparsity-promoting algorithms, and proximal solvers highly-suited to convex, possibly nonsmooth problems. PyLops also contains sparsifying transforms (e.g., wavelets, curvelets, seislets) which can be used in conjunction with the solvers. By offering a diverse set of tools for inverse problems under one unified framework, it expedites the use of state-of-the-art optimization methods and compressive sensing techniques in the geoscience domain.

Beyond our initial expectations, the framework is currently used to solve problems beyond geoscience, including astrophysics and medical imaging. Likewise, it has inspired the development of the occamypy framework for nonlinear inversion in geophysics. In this talk, we share our experience in building such an ecosystem and offer further insights into the needs and interests of the EGU community to help guide future development as well as achieve wider adoption.

How to cite: Ravasi, M., da Costa Filho, C. A., Vasconcelos, I., and Vargas, D.: Developing open-source tools for reproducible inverse problems: the PyLops journey, EGU General Assembly 2021, online, 19–30 Apr 2021, EGU21-5772,, 2021.

Comments on the display

to access the discussion