The pyGIMLi tutorial at Transform 21
Instructors: Florian Wagner 1, Carsten Rücker 2, Thomas Günther3, Andrea Balza1
1 RWTH Aachen University, Applied Geophysics and Geothermal Energy, Aachen, Germany 2 Berlin University of Technology, Department of Applied Geophysics, Berlin, Germany 3 Leibniz Institute for Applied Geophysics, Hannover, Germany
Info | |
---|---|
When | Monday, April 19 • 8:00 - 10:00 UTC |
Slack (Q&A) | Software Underground channel #t21-mon-pygimli |
Recorded video | https://youtu.be/w3pu0H3dXe8 |
pyGIMLi documentation | https://www.pygimli.org/documentation.html |
pyGIMLi is an open-source library for modeling and inversion in geophysics. This tutorial is particularly suited for new users. We will start from scratch and:
- Create a subsurface geometry and explore the pyGIMLi meshtools
- Simulate the stationary 2D heat equation
- Simulate synthetic crosshole traveltime measurements
- Invert seismic traveltime and field ERT data
- Show how to build inversions with own forward operators (e.g., from other packages)
This tutorial was presented on April 19, 2021 at Transform, but you can still follow it on YouTube and ask questions. To do so please:
- Sign up for the Software Underground Slack
- Join the channel #pygimli channel to interact with other users and developers and ask questions with regard to the tutorial/software.
- Install the pyGIMLi conda environment as described below.
If you are working on Mac or Linux and have worked with conda and have git installed, you can copy & paste these lines separately. For all others, we recommend to carefully read the descriptions of individual steps below.
git clone https://github.com/gimli-org/transform2021 cd transform2021 conda env create conda activate pg-transform python -c "import pygimli; pygimli.test(show=False, onlydoctests=True)" jupyter lab
To start the tutorial setup, please follow the next steps:
There are a few things you'll need to follow the tutorial:
- A working Python installation (Anaconda or Miniconda). For details on how to install Anaconda, we refer to: https://docs.anaconda.com/anaconda/install/
- A modern web browser that works with JupyterLab or Jupyter Notebook (Internet explorer will not work)
- Intermediate experience in Python programming (Python, numpy, matplotlib, jupyter)
- Background on geophysical modeling and inversion
- Windows: Download the course material and unzip it a folder of your choice.
- Mac/Linux: You can do the same as above, or alternatively open a terminal, navigate to a folder of your choice, and execute
git clone https://github.com/gimli-org/transform2021
.
- Open a terminal (Linux & Mac) or the Anaconda Powershell Prompt (Windows). Navigate to the folder from step 2 (using the
cd
command) and type:
conda env create
- Activate the environment in the terminal by typing:
conda activate pg-transform
- To test if everything works correctly you can do the following:
python -c "import pygimli; pygimli.test(show=False, onlydoctests=True)"
If none of these commands gives an error, then your installation is working fine. If you get any errors, please let us know on Slack at #t21-mon-pygimli.
- Windows users: Make sure you set a default browser that is not Internet Explorer.
- Activate the conda environment:
conda activate pg-transform
- Start JupyterLab:
jupyter lab
- Jupyter should open in your default web browser. We'll start from here in the tutorial and create a new notebook together.
Note: Click on the notebook number to get to the respective notebook and the minutes to get to the respective position in the tutorial video.
Notebook | Topic | Time |
---|---|---|
Intro (main features, conda installer, API documentation) | 9 min. | |
1 | Creating a subsurface model (2D meshtools) | 22 min. |
2 | Modeling the 2D heat equation (equation level) | 17 min. |
3 | Simulating a crosshole traveltime experiment (modeling level) | 15 min. |
10-MINUTE BREAK | 7 min. | |
4 | Traveltime inversion (Traveltime method manager) | 10 min. |
5 | ERT field data inversion (ERT method manager) | 17 min. |
6 | Inversion with any forward operator | 17 min. |
Homepage with examples, papers, contribution guide | 5 min. |