# resistivityVES [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/git/https%3A%2F%2Fgit.geophysik.ruhr-uni-bochum.de%2Fkasper%2FresistivityVES.git/HEAD?urlpath=%2Fdoc%2Ftree%2FVES.ipynb) Binder environment using [pyGIMLI](https://www.pygimli.org/) to do a VES (Vertical Electrical Sounding) inversion. ## Overview This repository contains a Jupyter notebook (`VES.ipynb`) that demonstrates how to perform 1D DC resistivity inversion using pyGIMLI's built-in VES forward operator. The notebook uses real field data from Bausenberg to invert for a layered earth model. ## Notebook Contents The `VES.ipynb` notebook includes the following workflow: ### 1. Setup and Imports - Imports necessary libraries: `numpy`, `matplotlib`, `pygimli`, and the `VESManager` from `pygimli.physics` ### 2. Field Data from Bausenberg - Uses real VES measurements with AB/2 distances ranging from 1.0 to 100.0 meters - Apparent resistivity values (`rhoa`) showing variations from ~64 to ~672 Ωm - Error estimates set at 2% for most measurements, increasing to 5% for deeper soundings - MN/2 spacing fixed at 0.5 meters ### 3. Inversion Setup - Configures a 3-layer earth model (`nlay=3`) - Uses regularization parameter `lam=1000` with a reduction factor of 0.8 - Inverts the apparent resistivity data to determine layer thicknesses and resistivities ### 4. Visualization The notebook provides comprehensive visualization including: - **Model plot**: Displays the inverted resistivity model as a function of depth (up to 50m) - **Data fit plot**: Compares measured apparent resistivity data with the model response - Both plots are displayed side-by-side for easy comparison ### 5. Uncertainty Analysis - Computes model covariance matrix to assess parameter uncertainties - Displays correlation matrix showing interdependencies between layer parameters - Generates error bars for both resistivities and layer thicknesses - Visualizes uncertainties at layer midpoints and boundaries ## Requirements See `environment.yml` for the complete list of dependencies. Main requirements: - pyGIMLI>=1.5.0, which requires at least: - numpy - matplotlib - suitesparse=5.10.1 - jupyterlab ## Usage Click the Binder badge above to launch an interactive session, or run locally with: ```bash jupyter notebook VES.ipynb ```