├── .github ├── requirements-style.txt └── workflows │ ├── test.yml │ └── style.yml ├── images ├── dcr_fwd.png ├── dcr_inv.png ├── mapping_1.png ├── mapping_2.png ├── tree_mesh.png ├── active_cells.png ├── fwd_simulation.png ├── tikhonov_curve.png ├── newton_iteration.png ├── project_electrodes.png ├── true_observed_data.png ├── sphx_glr_1_mesh_overview_001.png └── DCR_DipoleDipole_Array.svg ├── .gitignore ├── environment.yml ├── Makefile ├── README.md ├── data ├── topo_2d.txt ├── dipole_dipole.obs └── pole_dipole.obs ├── live ├── 01-forward-dc-resistivity-2d.ipynb └── 02-inversion-dc-resistivity-2d.ipynb └── LICENSE /.github/requirements-style.txt: -------------------------------------------------------------------------------- 1 | nbqa==1.7.1 2 | ruff==0.1.13 3 | black==23.12.1 4 | -------------------------------------------------------------------------------- /images/dcr_fwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpeg/agrogeo24/main/images/dcr_fwd.png -------------------------------------------------------------------------------- /images/dcr_inv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpeg/agrogeo24/main/images/dcr_inv.png -------------------------------------------------------------------------------- /images/mapping_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpeg/agrogeo24/main/images/mapping_1.png -------------------------------------------------------------------------------- /images/mapping_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpeg/agrogeo24/main/images/mapping_2.png -------------------------------------------------------------------------------- /images/tree_mesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpeg/agrogeo24/main/images/tree_mesh.png -------------------------------------------------------------------------------- /images/active_cells.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpeg/agrogeo24/main/images/active_cells.png -------------------------------------------------------------------------------- /images/fwd_simulation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpeg/agrogeo24/main/images/fwd_simulation.png -------------------------------------------------------------------------------- /images/tikhonov_curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpeg/agrogeo24/main/images/tikhonov_curve.png -------------------------------------------------------------------------------- /images/newton_iteration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpeg/agrogeo24/main/images/newton_iteration.png -------------------------------------------------------------------------------- /images/project_electrodes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpeg/agrogeo24/main/images/project_electrodes.png -------------------------------------------------------------------------------- /images/true_observed_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpeg/agrogeo24/main/images/true_observed_data.png -------------------------------------------------------------------------------- /images/sphx_glr_1_mesh_overview_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpeg/agrogeo24/main/images/sphx_glr_1_mesh_overview_001.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | 7 | # Jupyter Notebook 8 | .ipynb_checkpoints 9 | 10 | # Tutorial data file 11 | fwd_dcr_2d_outputs/ 12 | 13 | # Make images file 14 | make_images.ipynb -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- 1 | name: simpeg-agrogeo24 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - python=3.11.* 6 | - pip 7 | - numpy==1.23.* 8 | - simpeg==0.20.* 9 | - discretize==0.10.* 10 | - pymatsolver==0.2.* 11 | - matplotlib==3.7.* 12 | - pooch==1.8.* 13 | - ipython 14 | - jupyter 15 | - jupyterlab 16 | # Linters 17 | - nbqa==1.7.1 18 | - ruff==0.1.13 19 | - black==23.12.1 20 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | NOTEBOOKS_DIR=notebooks 2 | 3 | .PHONY: help black ruff check format 4 | 5 | help: 6 | @echo "Commands:" 7 | @echo "" 8 | @echo " check run code style and quality checks (black and ruff)" 9 | @echo " format run black and ruff to format notebooks" 10 | @echo "" 11 | 12 | check: ruff black 13 | 14 | ruff: 15 | nbqa ruff ${NOTEBOOKS_DIR}/*.ipynb 16 | 17 | black: 18 | nbqa black --check ${NOTEBOOKS_DIR}/*.ipynb 19 | 20 | format: 21 | nbqa black ${NOTEBOOKS_DIR}/*.ipynb 22 | nbqa ruff --fix ${NOTEBOOKS_DIR}/*.ipynb 23 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | # Run notebooks to test they run without errors 2 | name: test 3 | 4 | # Only run on PRs and the main branch. Pushes to branches will only tested 5 | # when a PR is opened. 6 | on: 7 | pull_request: 8 | push: 9 | branches: 10 | - main 11 | 12 | 13 | # Use bash by default in all jobs 14 | defaults: 15 | run: 16 | shell: bash -el {0} 17 | 18 | jobs: 19 | ############################################################################# 20 | # Run tests and upload to codecov 21 | test: 22 | name: Test notebooks 23 | runs-on: ubuntu-latest 24 | steps: 25 | - name: Cancel Previous Runs 26 | uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa 27 | with: 28 | access_token: ${{ github.token }} 29 | 30 | - name: Checkout 31 | uses: actions/checkout@v2 32 | with: 33 | persist-credentials: false 34 | 35 | - name: Setup Miniconda 36 | uses: conda-incubator/setup-miniconda@v3 37 | with: 38 | activate-environment: simpeg-agrogeo24 39 | environment-file: environment.yml 40 | miniforge-version: latest 41 | 42 | - name: List installed packages 43 | run: | 44 | mamba info 45 | mamba list 46 | 47 | - name: Run notebooks 48 | run: | 49 | jupyter-nbconvert --execute --to notebook --inplace --ExecutePreprocessor.kernel_name=python3 notebooks/*.ipynb 50 | -------------------------------------------------------------------------------- /.github/workflows/style.yml: -------------------------------------------------------------------------------- 1 | # Linting and style checks with GitHub Actions 2 | # 3 | # NOTE: Pin actions to a specific commit to avoid having the authentication 4 | # token stolen if the Action is compromised. See the comments and links here: 5 | # https://github.com/pypa/gh-action-pypi-publish/issues/27 6 | # 7 | # Use nbQA to run linters and code formatters on notebooks 8 | # 9 | name: code-style 10 | 11 | # Only runs in PRs and the main branch. Pushes to branches will only be checked 12 | # when a PR is opened. 13 | on: 14 | pull_request: 15 | push: 16 | branches: 17 | - main 18 | 19 | ############################################################################### 20 | jobs: 21 | ruff: 22 | name: ruff 23 | runs-on: ubuntu-latest 24 | steps: 25 | - name: Checkout 26 | uses: actions/checkout@v2 27 | with: 28 | persist-credentials: false 29 | 30 | - name: Setup Python 31 | uses: actions/setup-python@v2 32 | with: 33 | python-version: "3.11" 34 | 35 | - name: Install requirements 36 | run: pip install -r .github/requirements-style.txt 37 | 38 | - name: List installed packages 39 | run: pip freeze 40 | 41 | - name: Check code format 42 | run: make ruff 43 | 44 | black: 45 | name: black 46 | runs-on: ubuntu-latest 47 | steps: 48 | - name: Checkout 49 | uses: actions/checkout@v2 50 | with: 51 | persist-credentials: false 52 | 53 | - name: Setup Python 54 | uses: actions/setup-python@v2 55 | with: 56 | python-version: "3.11" 57 | 58 | - name: Install requirements 59 | run: pip install -r .github/requirements-style.txt 60 | 61 | - name: List installed packages 62 | run: pip freeze 63 | 64 | - name: Check code format 65 | run: make black 66 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SimPEG tutorial for Agrogeo24 2 | 3 | **Instructors:** 4 | [Devin C. Cowan][dccowan]1 5 | and [Santiago Soler][santisoler]1 6 | 7 | **Authors of the material:** 8 | [Devin C. Cowan][dccowan]1, 9 | [Santiago Soler][santisoler]1 10 | and 11 | [Lindsey Heagy][lindsey]1 12 | 13 | **Contributors:** 14 | [Mariana G.][mgomezn]2 15 | and [Rowan Cockett][rowan]3 16 | 17 | > 1 18 | > Geophysical Inversion Facility. Earth Ocean and Atmospheric 19 | > Sciences. University of British Columbia. 20 | >
21 | > 2 22 | > Centro de Investigación Científica y de Educación Superior de Ensenada 23 | > (CICESE), Baja California 24 | >
25 | > 3 26 | > [Curvenote](https://www.curvenote.com) 27 | 28 | 29 | | **Information** | | 30 | |---|---| 31 | | Where | ETH Zürich, Switzerland | 32 | | When | Feb 1 and Feb 2, 2024 | 33 | | Organizer | [Agrogeophysics Organizing Committee][committee] | 34 | | Website of the event | [agrogeophy.github.io/agrogeo24][agrogeo24] | 35 | 36 | 37 | ## Abstract 38 | 39 | In this workshop we'll showcase how we can use the tools available in 40 | [SimPEG][simpeg], a Python library for Simulations and Parameter Estimations in 41 | Geophysics, to simulate ERT (a.k.a. DC resistivity) data from a synthetic model 42 | and then to run a deterministic inversion to recover the original model. 43 | You'll learn how to set up a DC survey, define a mesh, build a synthetic model, 44 | create a simulation that implements all the physics, and run a forward 45 | model to generate synthetic data. Lastly you'll learn how to set up an 46 | inversion to recover the resistivity of the subsurface. 47 | By the end of the tutorial you'll be able to use SimPEG to invert your own 48 | data. 49 | 50 | 51 | ## About 52 | 53 | We were invited by [Agrogeo24][agrogeo24] to give a workshop about SimPEG, to 54 | show the agrogeophysical community how we can use [SimPEG][simpeg] to run 55 | forward simulations of DC resistivity data (ERT), and how we can invert that 56 | type of data. 57 | 58 | During this workshop we'll go through two Jupyter notebooks that showcase 59 | examples on how we can run forward and inverse problems for ERT data: 60 | 61 | - [01-forward-dc-resisitivity-2d.ipynb](notebooks/01-forward-dc-resisitivity-2d.ipynb) 62 | - [02-inversion-dc-resistivity-2d.ipynb](notebooks/02-inversion-dc-resistivity-2d.ipynb) 63 | 64 | 65 | ## Setup 66 | 67 | During this workshop we'll use [Juptyer notebooks][jupyter] to run 68 | the forward and inverse modelling of DC resistivity data. 69 | 70 | To be able to follow the workshop and run these notebooks, you'll need to have 71 | access to a Python environment. This could be done through **online services** 72 | like [Google Colab][colab], or through a **local Python installation** like 73 | [Anaconda][anaconda] or [Miniforge][miniforge]. 74 | 75 | By default we'll use Google Colab. But we'll consider installing Python locally 76 | in case something goes wrong with the former. 77 | 78 | Here will provide instructions to: 79 | 80 | - [Configure Google Colab](#configure-google-colab) 81 | - or [Install Python locally](#install-python-locally) 82 | 83 | 84 | ## Configure Google Colab 85 | 86 | To be able to run the Jupyter notebooks for this tutorial in Google Colab, 87 | we'll need to follow these steps: 88 | 89 | 1. Login to our Google Colab account. 90 | 1. Create a new notebook. 91 | 1. Install some Python libraries that we'll need to use, such as 92 | [SimPEG][simpeg]. 93 | 94 | ### Step 1: Login to our Google Colab account 95 | 96 | If you don't have a Google account, create one and log in. If you do, you just 97 | need to log in. 98 | 99 | ### Step 2: Create a new notebook 100 | 101 | 1. Access to Google Colab by going to: https://colab.research.google.com 102 | 1. Find the top menu and choose `File` > `New notebook`. A new tab should open 103 | with a blank notebook in it. 104 | 105 | ### Step 3: Install some Python libraries 106 | 107 | To be able to follow this workshop we need to install some Python libraries 108 | that aren't preinstalled in the default Google Colab environment. 109 | 110 | 1. Click on the first cell of the notebook (if it's not empty, then create 111 | a new _Code_ cell and move it to the first position with the arrows icons 112 | that appear on its top-right). 113 | 1. Type the following line in the selected cell: 114 | ``` 115 | !pip install simpeg==0.20.0 discretize==0.10.0 pymatsolver==0.2.0 116 | ``` 117 | Note the `!` sign at the beginning of the line, **don't remove it**. 118 | 1. Run that cell by clicking the _Play_ button on its left or by pressing 119 | `Shift+Enter` in your keyboard. `pip` should install all the packaged listed 120 | in that line. If installation goes smoothly, you should see a line that 121 | reads `Successfully installed ...` and lists all the new packages that had 122 | been installed. 123 | 124 | > [!IMPORTANT] 125 | > Every time you open a notebook in Colab or create a new one, you'll have to 126 | > reinstall these packages (Google Colab don't save installed states across 127 | > notebooks). 128 | > 129 | > If it's a new notebook, just follow the previous instructions from the top. 130 | > 131 | > If it's an existing notebook, make sure that it has the `!pip install ...` 132 | > line at the top (add it otherwise), and run it. 133 | 134 | ## Install Python locally 135 | 136 | To be able to run the Jupyter notebooks for this tutorial in our own machines, 137 | we'll have to follow these steps: 138 | 139 | 1. Install a Python distribution (like [Anaconda][anaconda] or 140 | [miniforge][miniforge]). 141 | 1. Create a [_conda environment_][conda-environ] with all the Python packages 142 | needed (for example, SimPEG). 143 | 1. Activate this conda environment and run [JupyterLab][jupyterlab] to start 144 | coding. 145 | 146 | ### Step 1: Install a Python distribution 147 | 148 | We recommend installing a Python distribution like [miniforge][miniforge] or 149 | [Anaconda][anaconda]. 150 | 151 | Both of them will install Python and a package manager that allows us to 152 | install new Python libraries (like SimPEG for example), and also create 153 | _environments_. 154 | 155 | Anaconda uses the `conda` package manager, while Miniforge uses the new 156 | `mamba`, which works faster than `conda`. 157 | 158 | If you have either of both installed, you can skip this step. Otherwise, please 159 | follow their installation instructions: 160 | 161 | - Install miniforge: https://github.com/conda-forge/miniforge#install 162 | - Install Anaconda: https://docs.anaconda.com/anaconda/install 163 | 164 | ### Step 2: Create the `simpeg-agrogeo24` conda environment 165 | 166 | > [!IMPORTANT] 167 | > In the following steps we'll make use of the `mamba` package manager. In case 168 | > you installed Anaconda, use `conda` instead. You can simply replace `mamba` 169 | > for `conda` on every command we ask to use it and it'll work fine. 170 | 171 | 1. Download the [`environment.yml`][environment_yml] file from 172 | (right-click and select "Save page as" or similar). 173 | 1. Make sure that the file is called `environment.yml`. 174 | Windows sometimes adds a `.txt` to the end, which you should remove. 175 | 1. Open a terminal (_Anaconda Prompt_ or _Miniforge Prompt_ if you are running 176 | Windows). The following steps should be done in the terminal. 177 | 1. Navigate to the folder that has the downloaded environment file 178 | (if you don't know how to do this, take a moment to read [the Software 179 | Carpentry lesson on the Unix shell][shell-novice]). 180 | 1. Create the conda environment by running `mamba env create --file 181 | environment.yml` (this will download and install all of the packages used in 182 | the tutorial). If you installed Anaconda, then replace `mamba` for `conda` 183 | in the previous line. 184 | 185 | ### Step 3: Activate the `simpeg-agrogeo24` environment and start JupyterLab 186 | 187 | > [!TIP] 188 | > You'll need a browser that is able to run JupyterLab (basically anyone except 189 | > Internet Explorer or Edge). If you are in Windows, make sure you change your 190 | > default browser to a different one. 191 | 192 | Now we can activate the newly created `simpeg-agrogeo24` environment. 193 | 194 | 1. Open a terminal (_Anaconda Prompt_ or _Miniforge Prompt_ if you are running 195 | Windows). 196 | 1. Activate the `simpeg-agrogeo24` environment by running `mamba activate 197 | simpeg-agrogeo24`. 198 | If you installed Anaconda, then replace `mamba` for `conda` in the previous 199 | line. 200 | 1. With the `simpeg-agrogeo24` environment activated, we can start JupyterLab 201 | by running `jupyterlab` in the terminal. A new tab in our web browser should 202 | open showing JupyterLab's interface. 203 | 204 | ## License 205 | 206 | This work is licensed under a [Creative Commons Attribution 4.0 International 207 | License](http://creativecommons.org/licenses/by/4.0). 208 | 209 | [santisoler]: https://www.santisoler.com 210 | [dccowan]: https://www.github.com/dccowan 211 | [lindsey]: https://lindseyjh.ca/ 212 | [mgomezn]: https://github.com/MGomezN 213 | [rowan]: https://github.com/rowanc1 214 | [simpeg]: https://www.simpeg.xyz 215 | [jupyter]: https://jupyter.org/ 216 | [colab]: https://colab.research.google.com 217 | [anaconda]: https://www.anaconda.com/download 218 | [miniforge]: https://github.com/conda-forge/miniforge 219 | [conda-environ]: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html 220 | [jupyterlab]: https://jupyterlab.readthedocs.io 221 | [environment_yml]: https://raw.githubusercontent.com/simpeg/agrogeo24/main/environment.yml 222 | [shell-novice]: http://swcarpentry.github.io/shell-novice 223 | [agrogeo24]: https://agrogeophy.github.io/agrogeo24 224 | [committee]: https://agrogeophy.github.io/agrogeo24/committees.html 225 | -------------------------------------------------------------------------------- /images/DCR_DipoleDipole_Array.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /data/topo_2d.txt: -------------------------------------------------------------------------------- 1 | -3.0000e+02 1.9781e-02 2 | -2.9900e+02 2.0180e-02 3 | -2.9800e+02 2.0586e-02 4 | -2.9700e+02 2.1001e-02 5 | -2.9600e+02 2.1424e-02 6 | -2.9500e+02 2.1856e-02 7 | -2.9400e+02 2.2296e-02 8 | -2.9300e+02 2.2745e-02 9 | -2.9200e+02 2.3203e-02 10 | -2.9100e+02 2.3671e-02 11 | -2.9000e+02 2.4147e-02 12 | -2.8900e+02 2.4634e-02 13 | -2.8800e+02 2.5130e-02 14 | -2.8700e+02 2.5636e-02 15 | -2.8600e+02 2.6152e-02 16 | -2.8500e+02 2.6678e-02 17 | -2.8400e+02 2.7216e-02 18 | -2.8300e+02 2.7763e-02 19 | -2.8200e+02 2.8322e-02 20 | -2.8100e+02 2.8892e-02 21 | -2.8000e+02 2.9474e-02 22 | -2.7900e+02 3.0067e-02 23 | -2.7800e+02 3.0672e-02 24 | -2.7700e+02 3.1289e-02 25 | -2.7600e+02 3.1919e-02 26 | -2.7500e+02 3.2561e-02 27 | -2.7400e+02 3.3216e-02 28 | -2.7300e+02 3.3884e-02 29 | -2.7200e+02 3.4566e-02 30 | -2.7100e+02 3.5261e-02 31 | -2.7000e+02 3.5970e-02 32 | -2.6900e+02 3.6693e-02 33 | -2.6800e+02 3.7431e-02 34 | -2.6700e+02 3.8184e-02 35 | -2.6600e+02 3.8951e-02 36 | -2.6500e+02 3.9734e-02 37 | -2.6400e+02 4.0533e-02 38 | -2.6300e+02 4.1348e-02 39 | -2.6200e+02 4.2178e-02 40 | -2.6100e+02 4.3026e-02 41 | -2.6000e+02 4.3890e-02 42 | -2.5900e+02 4.4772e-02 43 | -2.5800e+02 4.5671e-02 44 | -2.5700e+02 4.6589e-02 45 | -2.5600e+02 4.7524e-02 46 | -2.5500e+02 4.8478e-02 47 | -2.5400e+02 4.9452e-02 48 | -2.5300e+02 5.0444e-02 49 | -2.5200e+02 5.1457e-02 50 | -2.5100e+02 5.2490e-02 51 | -2.5000e+02 5.3543e-02 52 | -2.4900e+02 5.4617e-02 53 | -2.4800e+02 5.5713e-02 54 | -2.4700e+02 5.6830e-02 55 | -2.4600e+02 5.7970e-02 56 | -2.4500e+02 5.9132e-02 57 | -2.4400e+02 6.0318e-02 58 | -2.4300e+02 6.1527e-02 59 | -2.4200e+02 6.2760e-02 60 | -2.4100e+02 6.4018e-02 61 | -2.4000e+02 6.5301e-02 62 | -2.3900e+02 6.6609e-02 63 | -2.3800e+02 6.7943e-02 64 | -2.3700e+02 6.9304e-02 65 | -2.3600e+02 7.0691e-02 66 | -2.3500e+02 7.2106e-02 67 | -2.3400e+02 7.3550e-02 68 | -2.3300e+02 7.5022e-02 69 | -2.3200e+02 7.6523e-02 70 | -2.3100e+02 7.8053e-02 71 | -2.3000e+02 7.9614e-02 72 | -2.2900e+02 8.1206e-02 73 | -2.2800e+02 8.2830e-02 74 | -2.2700e+02 8.4486e-02 75 | -2.2600e+02 8.6174e-02 76 | -2.2500e+02 8.7896e-02 77 | -2.2400e+02 8.9651e-02 78 | -2.2300e+02 9.1442e-02 79 | -2.2200e+02 9.3267e-02 80 | -2.2100e+02 9.5129e-02 81 | -2.2000e+02 9.7027e-02 82 | -2.1900e+02 9.8963e-02 83 | -2.1800e+02 1.0094e-01 84 | -2.1700e+02 1.0295e-01 85 | -2.1600e+02 1.0500e-01 86 | -2.1500e+02 1.0710e-01 87 | -2.1400e+02 1.0923e-01 88 | -2.1300e+02 1.1141e-01 89 | -2.1200e+02 1.1362e-01 90 | -2.1100e+02 1.1589e-01 91 | -2.1000e+02 1.1819e-01 92 | -2.0900e+02 1.2054e-01 93 | -2.0800e+02 1.2294e-01 94 | -2.0700e+02 1.2539e-01 95 | -2.0600e+02 1.2788e-01 96 | -2.0500e+02 1.3042e-01 97 | -2.0400e+02 1.3301e-01 98 | -2.0300e+02 1.3565e-01 99 | -2.0200e+02 1.3835e-01 100 | -2.0100e+02 1.4109e-01 101 | -2.0000e+02 1.4389e-01 102 | -1.9900e+02 1.4674e-01 103 | -1.9800e+02 1.4965e-01 104 | -1.9700e+02 1.5262e-01 105 | -1.9600e+02 1.5564e-01 106 | -1.9500e+02 1.5872e-01 107 | -1.9400e+02 1.6186e-01 108 | -1.9300e+02 1.6507e-01 109 | -1.9200e+02 1.6833e-01 110 | -1.9100e+02 1.7166e-01 111 | -1.9000e+02 1.7505e-01 112 | -1.8900e+02 1.7851e-01 113 | -1.8800e+02 1.8203e-01 114 | -1.8700e+02 1.8562e-01 115 | -1.8600e+02 1.8928e-01 116 | -1.8500e+02 1.9302e-01 117 | -1.8400e+02 1.9682e-01 118 | -1.8300e+02 2.0070e-01 119 | -1.8200e+02 2.0465e-01 120 | -1.8100e+02 2.0867e-01 121 | -1.8000e+02 2.1278e-01 122 | -1.7900e+02 2.1696e-01 123 | -1.7800e+02 2.2122e-01 124 | -1.7700e+02 2.2556e-01 125 | -1.7600e+02 2.2999e-01 126 | -1.7500e+02 2.3450e-01 127 | -1.7400e+02 2.3909e-01 128 | -1.7300e+02 2.4378e-01 129 | -1.7200e+02 2.4855e-01 130 | -1.7100e+02 2.5341e-01 131 | -1.7000e+02 2.5836e-01 132 | -1.6900e+02 2.6341e-01 133 | -1.6800e+02 2.6855e-01 134 | -1.6700e+02 2.7379e-01 135 | -1.6600e+02 2.7913e-01 136 | -1.6500e+02 2.8457e-01 137 | -1.6400e+02 2.9011e-01 138 | -1.6300e+02 2.9575e-01 139 | -1.6200e+02 3.0150e-01 140 | -1.6100e+02 3.0736e-01 141 | -1.6000e+02 3.1333e-01 142 | -1.5900e+02 3.1940e-01 143 | -1.5800e+02 3.2559e-01 144 | -1.5700e+02 3.3190e-01 145 | -1.5600e+02 3.3832e-01 146 | -1.5500e+02 3.4486e-01 147 | -1.5400e+02 3.5152e-01 148 | -1.5300e+02 3.5830e-01 149 | -1.5200e+02 3.6521e-01 150 | -1.5100e+02 3.7224e-01 151 | -1.5000e+02 3.7941e-01 152 | -1.4900e+02 3.8670e-01 153 | -1.4800e+02 3.9413e-01 154 | -1.4700e+02 4.0169e-01 155 | -1.4600e+02 4.0939e-01 156 | -1.4500e+02 4.1723e-01 157 | -1.4400e+02 4.2521e-01 158 | -1.4300e+02 4.3333e-01 159 | -1.4200e+02 4.4160e-01 160 | -1.4100e+02 4.5002e-01 161 | -1.4000e+02 4.5859e-01 162 | -1.3900e+02 4.6732e-01 163 | -1.3800e+02 4.7619e-01 164 | -1.3700e+02 4.8523e-01 165 | -1.3600e+02 4.9443e-01 166 | -1.3500e+02 5.0379e-01 167 | -1.3400e+02 5.1331e-01 168 | -1.3300e+02 5.2300e-01 169 | -1.3200e+02 5.3286e-01 170 | -1.3100e+02 5.4290e-01 171 | -1.3000e+02 5.5311e-01 172 | -1.2900e+02 5.6349e-01 173 | -1.2800e+02 5.7406e-01 174 | -1.2700e+02 5.8481e-01 175 | -1.2600e+02 5.9574e-01 176 | -1.2500e+02 6.0687e-01 177 | -1.2400e+02 6.1818e-01 178 | -1.2300e+02 6.2968e-01 179 | -1.2200e+02 6.4138e-01 180 | -1.2100e+02 6.5328e-01 181 | -1.2000e+02 6.6538e-01 182 | -1.1900e+02 6.7768e-01 183 | -1.1800e+02 6.9019e-01 184 | -1.1700e+02 7.0291e-01 185 | -1.1600e+02 7.1584e-01 186 | -1.1500e+02 7.2898e-01 187 | -1.1400e+02 7.4234e-01 188 | -1.1300e+02 7.5592e-01 189 | -1.1200e+02 7.6972e-01 190 | -1.1100e+02 7.8375e-01 191 | -1.1000e+02 7.9800e-01 192 | -1.0900e+02 8.1249e-01 193 | -1.0800e+02 8.2720e-01 194 | -1.0700e+02 8.4216e-01 195 | -1.0600e+02 8.5734e-01 196 | -1.0500e+02 8.7277e-01 197 | -1.0400e+02 8.8845e-01 198 | -1.0300e+02 9.0437e-01 199 | -1.0200e+02 9.2053e-01 200 | -1.0100e+02 9.3695e-01 201 | -1.0000e+02 9.5362e-01 202 | -9.9000e+01 9.7055e-01 203 | -9.8000e+01 9.8774e-01 204 | -9.7000e+01 1.0052e+00 205 | -9.6000e+01 1.0229e+00 206 | -9.5000e+01 1.0409e+00 207 | -9.4000e+01 1.0591e+00 208 | -9.3000e+01 1.0776e+00 209 | -9.2000e+01 1.0964e+00 210 | -9.1000e+01 1.1155e+00 211 | -9.0000e+01 1.1348e+00 212 | -8.9000e+01 1.1544e+00 213 | -8.8000e+01 1.1743e+00 214 | -8.7000e+01 1.1945e+00 215 | -8.6000e+01 1.2150e+00 216 | -8.5000e+01 1.2357e+00 217 | -8.4000e+01 1.2568e+00 218 | -8.3000e+01 1.2781e+00 219 | -8.2000e+01 1.2997e+00 220 | -8.1000e+01 1.3216e+00 221 | -8.0000e+01 1.3439e+00 222 | -7.9000e+01 1.3664e+00 223 | -7.8000e+01 1.3892e+00 224 | -7.7000e+01 1.4123e+00 225 | -7.6000e+01 1.4357e+00 226 | -7.5000e+01 1.4594e+00 227 | -7.4000e+01 1.4834e+00 228 | -7.3000e+01 1.5077e+00 229 | -7.2000e+01 1.5324e+00 230 | -7.1000e+01 1.5573e+00 231 | -7.0000e+01 1.5825e+00 232 | -6.9000e+01 1.6081e+00 233 | -6.8000e+01 1.6339e+00 234 | -6.7000e+01 1.6601e+00 235 | -6.6000e+01 1.6865e+00 236 | -6.5000e+01 1.7133e+00 237 | -6.4000e+01 1.7404e+00 238 | -6.3000e+01 1.7678e+00 239 | -6.2000e+01 1.7955e+00 240 | -6.1000e+01 1.8235e+00 241 | -6.0000e+01 1.8518e+00 242 | -5.9000e+01 1.8804e+00 243 | -5.8000e+01 1.9093e+00 244 | -5.7000e+01 1.9386e+00 245 | -5.6000e+01 1.9681e+00 246 | -5.5000e+01 1.9979e+00 247 | -5.4000e+01 2.0280e+00 248 | -5.3000e+01 2.0585e+00 249 | -5.2000e+01 2.0892e+00 250 | -5.1000e+01 2.1202e+00 251 | -5.0000e+01 2.1515e+00 252 | -4.9000e+01 2.1831e+00 253 | -4.8000e+01 2.2150e+00 254 | -4.7000e+01 2.2472e+00 255 | -4.6000e+01 2.2797e+00 256 | -4.5000e+01 2.3124e+00 257 | -4.4000e+01 2.3454e+00 258 | -4.3000e+01 2.3787e+00 259 | -4.2000e+01 2.4123e+00 260 | -4.1000e+01 2.4461e+00 261 | -4.0000e+01 2.4802e+00 262 | -3.9000e+01 2.5146e+00 263 | -3.8000e+01 2.5492e+00 264 | -3.7000e+01 2.5840e+00 265 | -3.6000e+01 2.6191e+00 266 | -3.5000e+01 2.6545e+00 267 | -3.4000e+01 2.6901e+00 268 | -3.3000e+01 2.7259e+00 269 | -3.2000e+01 2.7620e+00 270 | -3.1000e+01 2.7983e+00 271 | -3.0000e+01 2.8347e+00 272 | -2.9000e+01 2.8715e+00 273 | -2.8000e+01 2.9084e+00 274 | -2.7000e+01 2.9455e+00 275 | -2.6000e+01 2.9828e+00 276 | -2.5000e+01 3.0203e+00 277 | -2.4000e+01 3.0580e+00 278 | -2.3000e+01 3.0959e+00 279 | -2.2000e+01 3.1339e+00 280 | -2.1000e+01 3.1721e+00 281 | -2.0000e+01 3.2105e+00 282 | -1.9000e+01 3.2490e+00 283 | -1.8000e+01 3.2877e+00 284 | -1.7000e+01 3.3265e+00 285 | -1.6000e+01 3.3654e+00 286 | -1.5000e+01 3.4045e+00 287 | -1.4000e+01 3.4436e+00 288 | -1.3000e+01 3.4829e+00 289 | -1.2000e+01 3.5223e+00 290 | -1.1000e+01 3.5618e+00 291 | -1.0000e+01 3.6013e+00 292 | -9.0000e+00 3.6410e+00 293 | -8.0000e+00 3.6807e+00 294 | -7.0000e+00 3.7205e+00 295 | -6.0000e+00 3.7603e+00 296 | -5.0000e+00 3.8002e+00 297 | -4.0000e+00 3.8401e+00 298 | -3.0000e+00 3.8800e+00 299 | -2.0000e+00 3.9200e+00 300 | -1.0000e+00 3.9600e+00 301 | 0.0000e+00 4.0000e+00 302 | 1.0000e+00 4.0400e+00 303 | 2.0000e+00 4.0800e+00 304 | 3.0000e+00 4.1200e+00 305 | 4.0000e+00 4.1599e+00 306 | 5.0000e+00 4.1998e+00 307 | 6.0000e+00 4.2397e+00 308 | 7.0000e+00 4.2795e+00 309 | 8.0000e+00 4.3193e+00 310 | 9.0000e+00 4.3590e+00 311 | 1.0000e+01 4.3987e+00 312 | 1.1000e+01 4.4382e+00 313 | 1.2000e+01 4.4777e+00 314 | 1.3000e+01 4.5171e+00 315 | 1.4000e+01 4.5564e+00 316 | 1.5000e+01 4.5955e+00 317 | 1.6000e+01 4.6346e+00 318 | 1.7000e+01 4.6735e+00 319 | 1.8000e+01 4.7123e+00 320 | 1.9000e+01 4.7510e+00 321 | 2.0000e+01 4.7895e+00 322 | 2.1000e+01 4.8279e+00 323 | 2.2000e+01 4.8661e+00 324 | 2.3000e+01 4.9041e+00 325 | 2.4000e+01 4.9420e+00 326 | 2.5000e+01 4.9797e+00 327 | 2.6000e+01 5.0172e+00 328 | 2.7000e+01 5.0545e+00 329 | 2.8000e+01 5.0916e+00 330 | 2.9000e+01 5.1285e+00 331 | 3.0000e+01 5.1653e+00 332 | 3.1000e+01 5.2017e+00 333 | 3.2000e+01 5.2380e+00 334 | 3.3000e+01 5.2741e+00 335 | 3.4000e+01 5.3099e+00 336 | 3.5000e+01 5.3455e+00 337 | 3.6000e+01 5.3809e+00 338 | 3.7000e+01 5.4160e+00 339 | 3.8000e+01 5.4508e+00 340 | 3.9000e+01 5.4854e+00 341 | 4.0000e+01 5.5198e+00 342 | 4.1000e+01 5.5539e+00 343 | 4.2000e+01 5.5877e+00 344 | 4.3000e+01 5.6213e+00 345 | 4.4000e+01 5.6546e+00 346 | 4.5000e+01 5.6876e+00 347 | 4.6000e+01 5.7203e+00 348 | 4.7000e+01 5.7528e+00 349 | 4.8000e+01 5.7850e+00 350 | 4.9000e+01 5.8169e+00 351 | 5.0000e+01 5.8485e+00 352 | 5.1000e+01 5.8798e+00 353 | 5.2000e+01 5.9108e+00 354 | 5.3000e+01 5.9415e+00 355 | 5.4000e+01 5.9720e+00 356 | 5.5000e+01 6.0021e+00 357 | 5.6000e+01 6.0319e+00 358 | 5.7000e+01 6.0614e+00 359 | 5.8000e+01 6.0907e+00 360 | 5.9000e+01 6.1196e+00 361 | 6.0000e+01 6.1482e+00 362 | 6.1000e+01 6.1765e+00 363 | 6.2000e+01 6.2045e+00 364 | 6.3000e+01 6.2322e+00 365 | 6.4000e+01 6.2596e+00 366 | 6.5000e+01 6.2867e+00 367 | 6.6000e+01 6.3135e+00 368 | 6.7000e+01 6.3399e+00 369 | 6.8000e+01 6.3661e+00 370 | 6.9000e+01 6.3919e+00 371 | 7.0000e+01 6.4175e+00 372 | 7.1000e+01 6.4427e+00 373 | 7.2000e+01 6.4676e+00 374 | 7.3000e+01 6.4923e+00 375 | 7.4000e+01 6.5166e+00 376 | 7.5000e+01 6.5406e+00 377 | 7.6000e+01 6.5643e+00 378 | 7.7000e+01 6.5877e+00 379 | 7.8000e+01 6.6108e+00 380 | 7.9000e+01 6.6336e+00 381 | 8.0000e+01 6.6561e+00 382 | 8.1000e+01 6.6784e+00 383 | 8.2000e+01 6.7003e+00 384 | 8.3000e+01 6.7219e+00 385 | 8.4000e+01 6.7432e+00 386 | 8.5000e+01 6.7643e+00 387 | 8.6000e+01 6.7850e+00 388 | 8.7000e+01 6.8055e+00 389 | 8.8000e+01 6.8257e+00 390 | 8.9000e+01 6.8456e+00 391 | 9.0000e+01 6.8652e+00 392 | 9.1000e+01 6.8845e+00 393 | 9.2000e+01 6.9036e+00 394 | 9.3000e+01 6.9224e+00 395 | 9.4000e+01 6.9409e+00 396 | 9.5000e+01 6.9591e+00 397 | 9.6000e+01 6.9771e+00 398 | 9.7000e+01 6.9948e+00 399 | 9.8000e+01 7.0123e+00 400 | 9.9000e+01 7.0294e+00 401 | 1.0000e+02 7.0464e+00 402 | 1.0100e+02 7.0630e+00 403 | 1.0200e+02 7.0795e+00 404 | 1.0300e+02 7.0956e+00 405 | 1.0400e+02 7.1116e+00 406 | 1.0500e+02 7.1272e+00 407 | 1.0600e+02 7.1427e+00 408 | 1.0700e+02 7.1578e+00 409 | 1.0800e+02 7.1728e+00 410 | 1.0900e+02 7.1875e+00 411 | 1.1000e+02 7.2020e+00 412 | 1.1100e+02 7.2162e+00 413 | 1.1200e+02 7.2303e+00 414 | 1.1300e+02 7.2441e+00 415 | 1.1400e+02 7.2577e+00 416 | 1.1500e+02 7.2710e+00 417 | 1.1600e+02 7.2842e+00 418 | 1.1700e+02 7.2971e+00 419 | 1.1800e+02 7.3098e+00 420 | 1.1900e+02 7.3223e+00 421 | 1.2000e+02 7.3346e+00 422 | 1.2100e+02 7.3467e+00 423 | 1.2200e+02 7.3586e+00 424 | 1.2300e+02 7.3703e+00 425 | 1.2400e+02 7.3818e+00 426 | 1.2500e+02 7.3931e+00 427 | 1.2600e+02 7.4043e+00 428 | 1.2700e+02 7.4152e+00 429 | 1.2800e+02 7.4259e+00 430 | 1.2900e+02 7.4365e+00 431 | 1.3000e+02 7.4469e+00 432 | 1.3100e+02 7.4571e+00 433 | 1.3200e+02 7.4671e+00 434 | 1.3300e+02 7.4770e+00 435 | 1.3400e+02 7.4867e+00 436 | 1.3500e+02 7.4962e+00 437 | 1.3600e+02 7.5056e+00 438 | 1.3700e+02 7.5148e+00 439 | 1.3800e+02 7.5238e+00 440 | 1.3900e+02 7.5327e+00 441 | 1.4000e+02 7.5414e+00 442 | 1.4100e+02 7.5500e+00 443 | 1.4200e+02 7.5584e+00 444 | 1.4300e+02 7.5667e+00 445 | 1.4400e+02 7.5748e+00 446 | 1.4500e+02 7.5828e+00 447 | 1.4600e+02 7.5906e+00 448 | 1.4700e+02 7.5983e+00 449 | 1.4800e+02 7.6059e+00 450 | 1.4900e+02 7.6133e+00 451 | 1.5000e+02 7.6206e+00 452 | 1.5100e+02 7.6278e+00 453 | 1.5200e+02 7.6348e+00 454 | 1.5300e+02 7.6417e+00 455 | 1.5400e+02 7.6485e+00 456 | 1.5500e+02 7.6551e+00 457 | 1.5600e+02 7.6617e+00 458 | 1.5700e+02 7.6681e+00 459 | 1.5800e+02 7.6744e+00 460 | 1.5900e+02 7.6806e+00 461 | 1.6000e+02 7.6867e+00 462 | 1.6100e+02 7.6926e+00 463 | 1.6200e+02 7.6985e+00 464 | 1.6300e+02 7.7042e+00 465 | 1.6400e+02 7.7099e+00 466 | 1.6500e+02 7.7154e+00 467 | 1.6600e+02 7.7209e+00 468 | 1.6700e+02 7.7262e+00 469 | 1.6800e+02 7.7314e+00 470 | 1.6900e+02 7.7366e+00 471 | 1.7000e+02 7.7416e+00 472 | 1.7100e+02 7.7466e+00 473 | 1.7200e+02 7.7515e+00 474 | 1.7300e+02 7.7562e+00 475 | 1.7400e+02 7.7609e+00 476 | 1.7500e+02 7.7655e+00 477 | 1.7600e+02 7.7700e+00 478 | 1.7700e+02 7.7744e+00 479 | 1.7800e+02 7.7788e+00 480 | 1.7900e+02 7.7830e+00 481 | 1.8000e+02 7.7872e+00 482 | 1.8100e+02 7.7913e+00 483 | 1.8200e+02 7.7954e+00 484 | 1.8300e+02 7.7993e+00 485 | 1.8400e+02 7.8032e+00 486 | 1.8500e+02 7.8070e+00 487 | 1.8600e+02 7.8107e+00 488 | 1.8700e+02 7.8144e+00 489 | 1.8800e+02 7.8180e+00 490 | 1.8900e+02 7.8215e+00 491 | 1.9000e+02 7.8249e+00 492 | 1.9100e+02 7.8283e+00 493 | 1.9200e+02 7.8317e+00 494 | 1.9300e+02 7.8349e+00 495 | 1.9400e+02 7.8381e+00 496 | 1.9500e+02 7.8413e+00 497 | 1.9600e+02 7.8444e+00 498 | 1.9700e+02 7.8474e+00 499 | 1.9800e+02 7.8503e+00 500 | 1.9900e+02 7.8533e+00 501 | 2.0000e+02 7.8561e+00 502 | 2.0100e+02 7.8589e+00 503 | 2.0200e+02 7.8617e+00 504 | 2.0300e+02 7.8643e+00 505 | 2.0400e+02 7.8670e+00 506 | 2.0500e+02 7.8696e+00 507 | 2.0600e+02 7.8721e+00 508 | 2.0700e+02 7.8746e+00 509 | 2.0800e+02 7.8771e+00 510 | 2.0900e+02 7.8795e+00 511 | 2.1000e+02 7.8818e+00 512 | 2.1100e+02 7.8841e+00 513 | 2.1200e+02 7.8864e+00 514 | 2.1300e+02 7.8886e+00 515 | 2.1400e+02 7.8908e+00 516 | 2.1500e+02 7.8929e+00 517 | 2.1600e+02 7.8950e+00 518 | 2.1700e+02 7.8970e+00 519 | 2.1800e+02 7.8991e+00 520 | 2.1900e+02 7.9010e+00 521 | 2.2000e+02 7.9030e+00 522 | 2.2100e+02 7.9049e+00 523 | 2.2200e+02 7.9067e+00 524 | 2.2300e+02 7.9086e+00 525 | 2.2400e+02 7.9103e+00 526 | 2.2500e+02 7.9121e+00 527 | 2.2600e+02 7.9138e+00 528 | 2.2700e+02 7.9155e+00 529 | 2.2800e+02 7.9172e+00 530 | 2.2900e+02 7.9188e+00 531 | 2.3000e+02 7.9204e+00 532 | 2.3100e+02 7.9219e+00 533 | 2.3200e+02 7.9235e+00 534 | 2.3300e+02 7.9250e+00 535 | 2.3400e+02 7.9265e+00 536 | 2.3500e+02 7.9279e+00 537 | 2.3600e+02 7.9293e+00 538 | 2.3700e+02 7.9307e+00 539 | 2.3800e+02 7.9321e+00 540 | 2.3900e+02 7.9334e+00 541 | 2.4000e+02 7.9347e+00 542 | 2.4100e+02 7.9360e+00 543 | 2.4200e+02 7.9372e+00 544 | 2.4300e+02 7.9385e+00 545 | 2.4400e+02 7.9397e+00 546 | 2.4500e+02 7.9409e+00 547 | 2.4600e+02 7.9420e+00 548 | 2.4700e+02 7.9432e+00 549 | 2.4800e+02 7.9443e+00 550 | 2.4900e+02 7.9454e+00 551 | 2.5000e+02 7.9465e+00 552 | 2.5100e+02 7.9475e+00 553 | 2.5200e+02 7.9485e+00 554 | 2.5300e+02 7.9496e+00 555 | 2.5400e+02 7.9505e+00 556 | 2.5500e+02 7.9515e+00 557 | 2.5600e+02 7.9525e+00 558 | 2.5700e+02 7.9534e+00 559 | 2.5800e+02 7.9543e+00 560 | 2.5900e+02 7.9552e+00 561 | 2.6000e+02 7.9561e+00 562 | 2.6100e+02 7.9570e+00 563 | 2.6200e+02 7.9578e+00 564 | 2.6300e+02 7.9587e+00 565 | 2.6400e+02 7.9595e+00 566 | 2.6500e+02 7.9603e+00 567 | 2.6600e+02 7.9610e+00 568 | 2.6700e+02 7.9618e+00 569 | 2.6800e+02 7.9626e+00 570 | 2.6900e+02 7.9633e+00 571 | 2.7000e+02 7.9640e+00 572 | 2.7100e+02 7.9647e+00 573 | 2.7200e+02 7.9654e+00 574 | 2.7300e+02 7.9661e+00 575 | 2.7400e+02 7.9668e+00 576 | 2.7500e+02 7.9674e+00 577 | 2.7600e+02 7.9681e+00 578 | 2.7700e+02 7.9687e+00 579 | 2.7800e+02 7.9693e+00 580 | 2.7900e+02 7.9699e+00 581 | 2.8000e+02 7.9705e+00 582 | 2.8100e+02 7.9711e+00 583 | 2.8200e+02 7.9717e+00 584 | 2.8300e+02 7.9722e+00 585 | 2.8400e+02 7.9728e+00 586 | 2.8500e+02 7.9733e+00 587 | 2.8600e+02 7.9738e+00 588 | 2.8700e+02 7.9744e+00 589 | 2.8800e+02 7.9749e+00 590 | 2.8900e+02 7.9754e+00 591 | 2.9000e+02 7.9759e+00 592 | 2.9100e+02 7.9763e+00 593 | 2.9200e+02 7.9768e+00 594 | 2.9300e+02 7.9773e+00 595 | 2.9400e+02 7.9777e+00 596 | 2.9500e+02 7.9781e+00 597 | 2.9600e+02 7.9786e+00 598 | 2.9700e+02 7.9790e+00 599 | 2.9800e+02 7.9794e+00 600 | 2.9900e+02 7.9798e+00 601 | -------------------------------------------------------------------------------- /live/01-forward-dc-resistivity-2d.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# 2.5D DC Resistivity Forward Simulation" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Goals\n", 15 | "\n", 16 | "- Create a synthetic DC survey\n", 17 | "- Define a mesh we'll use to simulate the forward problem\n", 18 | "- Run a forward problem for a 2.5D resistivity model\n", 19 | "\n", 20 | "" 21 | ] 22 | }, 23 | { 24 | "cell_type": "markdown", 25 | "metadata": {}, 26 | "source": [ 27 | "## Step 0: Importing Modules" 28 | ] 29 | }, 30 | { 31 | "cell_type": "code", 32 | "execution_count": null, 33 | "metadata": {}, 34 | "outputs": [], 35 | "source": [ 36 | "# SimPEG functionality\n", 37 | "from SimPEG.electromagnetics.static import resistivity as dc\n", 38 | "from SimPEG.utils import model_builder\n", 39 | "from SimPEG import maps\n", 40 | "from SimPEG.electromagnetics.static.utils.static_utils import (\n", 41 | " generate_dcip_sources_line,\n", 42 | " pseudo_locations,\n", 43 | " plot_pseudosection,\n", 44 | " apparent_resistivity_from_voltage,\n", 45 | ")\n", 46 | "\n", 47 | "# discretize functionality\n", 48 | "from discretize import TreeMesh\n", 49 | "from discretize.utils import active_from_xyz\n", 50 | "\n", 51 | "# Common Python functionality\n", 52 | "import numpy as np\n", 53 | "import matplotlib as mpl\n", 54 | "import matplotlib.pyplot as plt\n", 55 | "from matplotlib.colors import LogNorm\n", 56 | "\n", 57 | "# Increase font size of plots\n", 58 | "mpl.rcParams.update({\"font.size\": 14})" 59 | ] 60 | }, 61 | { 62 | "cell_type": "markdown", 63 | "metadata": {}, 64 | "source": [ 65 | "## Step 1: Defining Topography\n", 66 | "\n", 67 | "Lets define a topography:\n", 68 | "\n", 69 | "- Spans over -300m to 300m\n", 70 | "- Has a horizontal resolution of 1m\n", 71 | "- The synthetic elevations are generated with a function:\n", 72 | "\n", 73 | "$$ y(x) = 4 + 4 \\tanh \\left( \\frac{x}{100} \\right) $$" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": null, 79 | "metadata": {}, 80 | "outputs": [], 81 | "source": [] 82 | }, 83 | { 84 | "cell_type": "code", 85 | "execution_count": null, 86 | "metadata": {}, 87 | "outputs": [], 88 | "source": [ 89 | "fig = plt.figure(figsize=(6, 2))\n", 90 | "ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])\n", 91 | "ax.plot(topo_2d[:, 0], topo_2d[:, -1], color=\"b\", linewidth=2)\n", 92 | "ax.set_xlabel(\"x (m)\", labelpad=5)\n", 93 | "ax.set_ylabel(\"y (m)\", labelpad=5)\n", 94 | "ax.grid(True)\n", 95 | "ax.set_title(\"Topography\", fontsize=16, pad=10)\n", 96 | "plt.show(fig)" 97 | ] 98 | }, 99 | { 100 | "cell_type": "markdown", 101 | "metadata": {}, 102 | "source": [ 103 | "## Step 2: Defining the Survey\n", 104 | "\n", 105 | "\n", 106 | "\n", 107 | "DC resistivity surveys within SimPEG require the user to create and connect three types of objects:\n", 108 | "\n", 109 | "- receivers\n", 110 | "- sources\n", 111 | "- survey\n", 112 | "\n", 113 | "These can be defined manually, or efficiently using SimPEG utilities like `generate_dcip_sources_line()`" 114 | ] 115 | }, 116 | { 117 | "cell_type": "code", 118 | "execution_count": null, 119 | "metadata": {}, 120 | "outputs": [], 121 | "source": [] 122 | }, 123 | { 124 | "cell_type": "code", 125 | "execution_count": null, 126 | "metadata": {}, 127 | "outputs": [], 128 | "source": [] 129 | }, 130 | { 131 | "cell_type": "markdown", 132 | "metadata": {}, 133 | "source": [ 134 | "We can plot pseudo-locations, like:\n", 135 | "\n", 136 | "" 137 | ] 138 | }, 139 | { 140 | "cell_type": "code", 141 | "execution_count": null, 142 | "metadata": {}, 143 | "outputs": [], 144 | "source": [ 145 | "# Plot pseudo locations\n", 146 | "pseudo_locations_xy = pseudo_locations(survey)\n", 147 | "\n", 148 | "fig = plt.figure(figsize=(8, 2.75))\n", 149 | "ax = fig.add_axes([0.1, 0.1, 0.85, 0.8])\n", 150 | "ax.scatter(pseudo_locations_xy[:, 0], pseudo_locations_xy[:, -1], 8, \"r\")\n", 151 | "ax.set_xlabel(\"x (m)\")\n", 152 | "ax.set_ylabel(\"y (m)\")\n", 153 | "ax.set_title(\"Pseudo-locations\")\n", 154 | "plt.show()" 155 | ] 156 | }, 157 | { 158 | "cell_type": "markdown", 159 | "metadata": {}, 160 | "source": [ 161 | "We can get information from the survey:\n", 162 | "- the total number of data values,\n", 163 | "- the electrodes locations" 164 | ] 165 | }, 166 | { 167 | "cell_type": "code", 168 | "execution_count": null, 169 | "metadata": {}, 170 | "outputs": [], 171 | "source": [] 172 | }, 173 | { 174 | "cell_type": "markdown", 175 | "metadata": {}, 176 | "source": [ 177 | "## Step 3: Designing a Mesh\n", 178 | "\n", 179 | "Meshes define the numerical grid on which we numerically solve the PDE for the DC resistivity problem.\n", 180 | "\n", 181 | "\n", 182 | "\n", 183 | "Here, we define a tree mesh with the following properties:\n", 184 | "\n", 185 | "- Minimum cell size of 0.5m\n", 186 | "- Spans 800m in the horizontal direction\n", 187 | "- Spans 400m in the vertical direction " 188 | ] 189 | }, 190 | { 191 | "cell_type": "code", 192 | "execution_count": null, 193 | "metadata": {}, 194 | "outputs": [], 195 | "source": [] 196 | }, 197 | { 198 | "cell_type": "code", 199 | "execution_count": null, 200 | "metadata": {}, 201 | "outputs": [], 202 | "source": [ 203 | "def get_closest_power_of_2(x):\n", 204 | " \"\"\"\n", 205 | " Get the closest power of 2 to the given x\n", 206 | " \"\"\"\n", 207 | " return 2 ** int(np.round(np.log(x) / np.log(2.0)))\n", 208 | "\n", 209 | "# Number of base cells along x and y\n", 210 | "n_base_cells_x = get_closest_power_of_2(n_cells_x)\n", 211 | "n_base_cells_y = get_closest_power_of_2(n_cells_y)" 212 | ] 213 | }, 214 | { 215 | "cell_type": "code", 216 | "execution_count": null, 217 | "metadata": {}, 218 | "outputs": [], 219 | "source": [ 220 | "# Define the base mesh with top at z = 0 m.\n", 221 | "hx = [(dh, n_base_cells_x)]\n", 222 | "hy = [(dh, n_base_cells_y)]\n", 223 | "mesh = TreeMesh([hx, hy], origin=\"CN\")\n", 224 | "\n", 225 | "# Shift top to maximum topography and center of survey line\n", 226 | "x_center = survey.unique_electrode_locations[:, 0].mean()\n", 227 | "mesh.origin = mesh.origin + np.r_[x_center, y_topo.max()]" 228 | ] 229 | }, 230 | { 231 | "cell_type": "markdown", 232 | "metadata": {}, 233 | "source": [ 234 | "Once the tree mesh is initialized, we want to refine it close to the electrodes and around the topography" 235 | ] 236 | }, 237 | { 238 | "cell_type": "code", 239 | "execution_count": null, 240 | "metadata": {}, 241 | "outputs": [], 242 | "source": [ 243 | "# Mesh refinement near electrodes.\n", 244 | "unique_locations = survey.unique_electrode_locations\n", 245 | "\n", 246 | "mesh.refine_points(\n", 247 | " unique_locations, padding_cells_by_level=[10, 8, 8, 8, 4, 4], finalize=False\n", 248 | ")\n", 249 | "\n", 250 | "# Mesh refinement based on topography\n", 251 | "mesh.refine_surface(\n", 252 | " topo_2d[np.abs(x_topo) < 150.0, :],\n", 253 | " padding_cells_by_level=[0, 0, 4, 4],\n", 254 | " finalize=False,\n", 255 | ")" 256 | ] 257 | }, 258 | { 259 | "cell_type": "code", 260 | "execution_count": null, 261 | "metadata": {}, 262 | "outputs": [], 263 | "source": [ 264 | "# Finalize\n", 265 | "mesh.finalize()" 266 | ] 267 | }, 268 | { 269 | "cell_type": "code", 270 | "execution_count": null, 271 | "metadata": {}, 272 | "outputs": [], 273 | "source": [ 274 | "fig = plt.figure(figsize=(8, 4))\n", 275 | "\n", 276 | "ax1 = fig.add_axes([0.14, 0.17, 0.8, 0.7])\n", 277 | "mesh.plot_grid(ax=ax1, linewidth=0.75)\n", 278 | "ax1.grid(False)\n", 279 | "ax1.set_xlim(-200, 200)\n", 280 | "ax1.set_ylim(np.max(y_topo) - 200, np.max(y_topo))\n", 281 | "ax1.set_title(\"Mesh\")\n", 282 | "ax1.set_xlabel(\"x (m)\")\n", 283 | "ax1.set_ylabel(\"y (m)\")\n", 284 | "\n", 285 | "plt.show()" 286 | ] 287 | }, 288 | { 289 | "cell_type": "markdown", 290 | "metadata": {}, 291 | "source": [ 292 | "We can get properties of the mesh (number of cells, cell centers, etc):" 293 | ] 294 | }, 295 | { 296 | "cell_type": "code", 297 | "execution_count": null, 298 | "metadata": {}, 299 | "outputs": [], 300 | "source": [] 301 | }, 302 | { 303 | "cell_type": "markdown", 304 | "metadata": {}, 305 | "source": [ 306 | "## Step 4: Active Cells\n", 307 | "\n", 308 | "We can fix the resistivity of some cells (inactive cells), so our model only modifies the resistivity of the **active cells**.\n", 309 | "\n", 310 | "We can use `active_from_xyz` to define active cells from the topography:\n", 311 | "- Cells above the topography will be **inactive**.\n", 312 | "- Cells below the topography will be **active**.\n", 313 | "\n", 314 | "" 315 | ] 316 | }, 317 | { 318 | "cell_type": "code", 319 | "execution_count": null, 320 | "metadata": {}, 321 | "outputs": [], 322 | "source": [] 323 | }, 324 | { 325 | "cell_type": "code", 326 | "execution_count": null, 327 | "metadata": {}, 328 | "outputs": [], 329 | "source": [] 330 | }, 331 | { 332 | "cell_type": "markdown", 333 | "metadata": {}, 334 | "source": [ 335 | "## Step 5: Defining a Model\n", 336 | "\n", 337 | "Lets generate a model with the resistivities of each active cell:\n", 338 | "\n", 339 | "* Near surface resistivity of 100 $\\Omega m$\n", 340 | "* Basement resistivity of 10 $\\Omega m$ ( depths < -16m )\n", 341 | "* A block with a resistivity of 1000 $\\Omega m$:\n", 342 | " * The bottom-left corner is at (5, -10).\n", 343 | " * The top-right corner is at (15, 0)." 344 | ] 345 | }, 346 | { 347 | "cell_type": "markdown", 348 | "metadata": {}, 349 | "source": [ 350 | "Lets start by defining a model with only the background resistivity" 351 | ] 352 | }, 353 | { 354 | "cell_type": "code", 355 | "execution_count": null, 356 | "metadata": {}, 357 | "outputs": [], 358 | "source": [] 359 | }, 360 | { 361 | "cell_type": "markdown", 362 | "metadata": {}, 363 | "source": [ 364 | "Add the basement" 365 | ] 366 | }, 367 | { 368 | "cell_type": "code", 369 | "execution_count": null, 370 | "metadata": {}, 371 | "outputs": [], 372 | "source": [] 373 | }, 374 | { 375 | "cell_type": "markdown", 376 | "metadata": {}, 377 | "source": [ 378 | "Add the block with [`model_builder.get_indices_block`](http://docs.simpeg.xyz/content/api/generated/SimPEG.utils.model_builder.get_indices_block.html)." 379 | ] 380 | }, 381 | { 382 | "cell_type": "code", 383 | "execution_count": null, 384 | "metadata": {}, 385 | "outputs": [], 386 | "source": [] 387 | }, 388 | { 389 | "cell_type": "markdown", 390 | "metadata": {}, 391 | "source": [ 392 | "Keep only the elements that correspond to the active cells" 393 | ] 394 | }, 395 | { 396 | "cell_type": "code", 397 | "execution_count": null, 398 | "metadata": {}, 399 | "outputs": [], 400 | "source": [] 401 | }, 402 | { 403 | "cell_type": "code", 404 | "execution_count": null, 405 | "metadata": {}, 406 | "outputs": [], 407 | "source": [ 408 | "# Generate a mapping to ignore inactive cells in plot\n", 409 | "plotting_map = maps.InjectActiveCells(mesh, active_cells, np.nan)\n", 410 | "\n", 411 | "fig = plt.figure(figsize=(10, 4.5))\n", 412 | "\n", 413 | "norm = LogNorm(vmin=1e1, vmax=1e3)\n", 414 | "\n", 415 | "ax1 = fig.add_axes([0.14, 0.17, 0.68, 0.7])\n", 416 | "mesh.plot_image(\n", 417 | " plotting_map * resistivity_model,\n", 418 | " ax=ax1,\n", 419 | " grid=True,\n", 420 | " pcolor_opts={\"norm\": norm, \"cmap\": mpl.cm.RdYlBu_r, \"linewidth\": 0.5},\n", 421 | ")\n", 422 | "ax1.set_xlim(-50, 50)\n", 423 | "ax1.set_ylim(np.max(topo_2d[:, -1]) - 50, np.max(topo_2d[:, -1]))\n", 424 | "ax1.set_title(\"Electrical Resistivity (Active Cells)\")\n", 425 | "ax1.set_xlabel(\"x (m)\")\n", 426 | "ax1.set_ylabel(\"y (m)\")\n", 427 | "\n", 428 | "ax2 = fig.add_axes([0.84, 0.17, 0.03, 0.7])\n", 429 | "cbar = mpl.colorbar.ColorbarBase(\n", 430 | " ax2, norm=norm, orientation=\"vertical\", cmap=mpl.cm.RdYlBu_r\n", 431 | ")\n", 432 | "cbar.set_label(r\"$\\rho (\\Omega m)$\", rotation=270, labelpad=25, size=16)\n", 433 | "\n", 434 | "plt.show()" 435 | ] 436 | }, 437 | { 438 | "cell_type": "markdown", 439 | "metadata": {}, 440 | "source": [ 441 | "## Step 6: Mapping from the Model to the Mesh\n", 442 | "\n", 443 | "Define a model representing electrical resistivities on all active cells. Use the [`maps.InjectActiveCells`](myst:SimPEG#SimPEG.maps.InjectActiveCells) mapping to define this mapping. \n", 444 | "\n", 445 | "> **Important:**\n", 446 | "> Although the true electrical resistivity of the air is infinity, set the value for the inactive cells to 1e8 $\\Omega m$!\n", 447 | "\n", 448 | "" 449 | ] 450 | }, 451 | { 452 | "cell_type": "code", 453 | "execution_count": null, 454 | "metadata": {}, 455 | "outputs": [], 456 | "source": [] 457 | }, 458 | { 459 | "cell_type": "markdown", 460 | "metadata": {}, 461 | "source": [ 462 | "## Step 7: Project Survey to Discretized Topography\n", 463 | "\n", 464 | "We should shift the vertical coordinate of the dipoles so they are lying on top of the discrete surface.\n", 465 | "\n", 466 | "Lets use [`Survey.drape_electrodes_on_topography`](https://docs.simpeg.xyz/content/api/generated/SimPEG.electromagnetics.static.resistivity.Survey.drape_electrodes_on_topography.html#SimPEG.electromagnetics.static.resistivity.Survey.drape_electrodes_on_topography) for that.\n", 467 | "\n", 468 | "" 469 | ] 470 | }, 471 | { 472 | "cell_type": "code", 473 | "execution_count": null, 474 | "metadata": {}, 475 | "outputs": [], 476 | "source": [] 477 | }, 478 | { 479 | "cell_type": "markdown", 480 | "metadata": {}, 481 | "source": [ 482 | "## Step 8: Defining the Forward Simulation\n", 483 | "\n", 484 | "Lets create a simulation: the object that will simulate the physics!\n", 485 | "\n", 486 | "We'll use [dc.simulation_2d.Simulation2DNodal](https://docs.simpeg.xyz/content/api/generated/SimPEG.electromagnetics.static.resistivity.Simulation2DNodal.html#SimPEG.electromagnetics.static.resistivity.Simulation2DNodal). \n", 487 | "\n", 488 | "" 489 | ] 490 | }, 491 | { 492 | "cell_type": "code", 493 | "execution_count": null, 494 | "metadata": {}, 495 | "outputs": [], 496 | "source": [] 497 | }, 498 | { 499 | "cell_type": "markdown", 500 | "metadata": {}, 501 | "source": [ 502 | "## Step 9: Predict DC Resistivity Data and Plot\n", 503 | "\n", 504 | "We can use the **dpred** method to simulate DC resistivity data for your resistivity model." 505 | ] 506 | }, 507 | { 508 | "cell_type": "code", 509 | "execution_count": null, 510 | "metadata": {}, 511 | "outputs": [], 512 | "source": [] 513 | }, 514 | { 515 | "cell_type": "markdown", 516 | "metadata": {}, 517 | "source": [ 518 | "## Plot DC Resistivity Data" 519 | ] 520 | }, 521 | { 522 | "cell_type": "markdown", 523 | "metadata": {}, 524 | "source": [ 525 | "Here we use the [plot_pseudosection](https://docs.simpeg.xyz/content/api/generated/SimPEG.electromagnetics.static.utils.plot_pseudosection.html#SimPEG.electromagnetics.static.utils.plot_pseudosection) utility function to represent the predicted data on a pseudosection plot as apparent conductivities. If the receivers were defined to simulate data as normalized voltages, we may want to use the [apparent_resistivity_from_voltage](https://docs.simpeg.xyz/content/api/generated/SimPEG.electromagnetics.static.utils.apparent_resistivity_from_voltage.html#SimPEG.electromagnetics.static.utils.apparent_resistivity_from_voltage) utility function to convert the data to apparent resistivities." 526 | ] 527 | }, 528 | { 529 | "cell_type": "code", 530 | "execution_count": null, 531 | "metadata": {}, 532 | "outputs": [], 533 | "source": [ 534 | "# Plot voltages pseudo-section\n", 535 | "if data_type == \"volt\":\n", 536 | " fig = plt.figure(figsize=(8, 2.75))\n", 537 | " ax1 = fig.add_axes([0.1, 0.15, 0.75, 0.78])\n", 538 | " plot_pseudosection(\n", 539 | " survey,\n", 540 | " dobs=np.abs(dpred),\n", 541 | " plot_type=\"scatter\",\n", 542 | " ax=ax1,\n", 543 | " scale=\"log\",\n", 544 | " cbar_label=\"V/A\",\n", 545 | " scatter_opts={\"cmap\": mpl.cm.viridis},\n", 546 | " )\n", 547 | " ax1.set_title(\"Normalized Voltages\")\n", 548 | " plt.show()\n", 549 | "\n", 550 | " # Get apparent conductivities from volts and survey geometry\n", 551 | " apparent_resistivity = apparent_resistivity_from_voltage(survey, dpred)\n", 552 | "\n", 553 | "else:\n", 554 | " apparent_resistivity = dpred.copy()\n", 555 | "\n", 556 | "# Plot apparent resistivity pseudo-section\n", 557 | "fig = plt.figure(figsize=(8, 2.75))\n", 558 | "ax1 = fig.add_axes([0.1, 0.15, 0.75, 0.78])\n", 559 | "plot_pseudosection(\n", 560 | " survey,\n", 561 | " dobs=apparent_resistivity,\n", 562 | " data_locations=True,\n", 563 | " plot_type=\"contourf\",\n", 564 | " ax=ax1,\n", 565 | " scale=\"log\",\n", 566 | " cbar_label=\"$\\Omega m$\",\n", 567 | " mask_topography=True,\n", 568 | " contourf_opts={\"levels\": 40, \"cmap\": mpl.cm.RdYlBu_r},\n", 569 | ")\n", 570 | "ax1.set_title(\"Apparent Resistivity\")\n", 571 | "plt.show()" 572 | ] 573 | }, 574 | { 575 | "cell_type": "code", 576 | "execution_count": null, 577 | "metadata": {}, 578 | "outputs": [], 579 | "source": [] 580 | } 581 | ], 582 | "metadata": { 583 | "kernelspec": { 584 | "display_name": "Python 3 (ipykernel)", 585 | "language": "python", 586 | "name": "python3" 587 | }, 588 | "language_info": { 589 | "codemirror_mode": { 590 | "name": "ipython", 591 | "version": 3 592 | }, 593 | "file_extension": ".py", 594 | "mimetype": "text/x-python", 595 | "name": "python", 596 | "nbconvert_exporter": "python", 597 | "pygments_lexer": "ipython3", 598 | "version": "3.11.6" 599 | } 600 | }, 601 | "nbformat": 4, 602 | "nbformat_minor": 4 603 | } 604 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More_considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution 4.0 International Public License 58 | 59 | By exercising the Licensed Rights (defined below), You accept and agree 60 | to be bound by the terms and conditions of this Creative Commons 61 | Attribution 4.0 International Public License ("Public License"). To the 62 | extent this Public License may be interpreted as a contract, You are 63 | granted the Licensed Rights in consideration of Your acceptance of 64 | these terms and conditions, and the Licensor grants You such rights in 65 | consideration of benefits the Licensor receives from making the 66 | Licensed Material available under these terms and conditions. 67 | 68 | 69 | Section 1 -- Definitions. 70 | 71 | a. Adapted Material means material subject to Copyright and Similar 72 | Rights that is derived from or based upon the Licensed Material 73 | and in which the Licensed Material is translated, altered, 74 | arranged, transformed, or otherwise modified in a manner requiring 75 | permission under the Copyright and Similar Rights held by the 76 | Licensor. For purposes of this Public License, where the Licensed 77 | Material is a musical work, performance, or sound recording, 78 | Adapted Material is always produced where the Licensed Material is 79 | synched in timed relation with a moving image. 80 | 81 | b. Adapter's License means the license You apply to Your Copyright 82 | and Similar Rights in Your contributions to Adapted Material in 83 | accordance with the terms and conditions of this Public License. 84 | 85 | c. Copyright and Similar Rights means copyright and/or similar rights 86 | closely related to copyright including, without limitation, 87 | performance, broadcast, sound recording, and Sui Generis Database 88 | Rights, without regard to how the rights are labeled or 89 | categorized. For purposes of this Public License, the rights 90 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 91 | Rights. 92 | 93 | d. Effective Technological Measures means those measures that, in the 94 | absence of proper authority, may not be circumvented under laws 95 | fulfilling obligations under Article 11 of the WIPO Copyright 96 | Treaty adopted on December 20, 1996, and/or similar international 97 | agreements. 98 | 99 | e. Exceptions and Limitations means fair use, fair dealing, and/or 100 | any other exception or limitation to Copyright and Similar Rights 101 | that applies to Your use of the Licensed Material. 102 | 103 | f. Licensed Material means the artistic or literary work, database, 104 | or other material to which the Licensor applied this Public 105 | License. 106 | 107 | g. Licensed Rights means the rights granted to You subject to the 108 | terms and conditions of this Public License, which are limited to 109 | all Copyright and Similar Rights that apply to Your use of the 110 | Licensed Material and that the Licensor has authority to license. 111 | 112 | h. Licensor means the individual(s) or entity(ies) granting rights 113 | under this Public License. 114 | 115 | i. Share means to provide material to the public by any means or 116 | process that requires permission under the Licensed Rights, such 117 | as reproduction, public display, public performance, distribution, 118 | dissemination, communication, or importation, and to make material 119 | available to the public including in ways that members of the 120 | public may access the material from a place and at a time 121 | individually chosen by them. 122 | 123 | j. Sui Generis Database Rights means rights other than copyright 124 | resulting from Directive 96/9/EC of the European Parliament and of 125 | the Council of 11 March 1996 on the legal protection of databases, 126 | as amended and/or succeeded, as well as other essentially 127 | equivalent rights anywhere in the world. 128 | 129 | k. You means the individual or entity exercising the Licensed Rights 130 | under this Public License. Your has a corresponding meaning. 131 | 132 | 133 | Section 2 -- Scope. 134 | 135 | a. License grant. 136 | 137 | 1. Subject to the terms and conditions of this Public License, 138 | the Licensor hereby grants You a worldwide, royalty-free, 139 | non-sublicensable, non-exclusive, irrevocable license to 140 | exercise the Licensed Rights in the Licensed Material to: 141 | 142 | a. reproduce and Share the Licensed Material, in whole or 143 | in part; and 144 | 145 | b. produce, reproduce, and Share Adapted Material. 146 | 147 | 2. Exceptions and Limitations. For the avoidance of doubt, where 148 | Exceptions and Limitations apply to Your use, this Public 149 | License does not apply, and You do not need to comply with 150 | its terms and conditions. 151 | 152 | 3. Term. The term of this Public License is specified in Section 153 | 6(a). 154 | 155 | 4. Media and formats; technical modifications allowed. The 156 | Licensor authorizes You to exercise the Licensed Rights in 157 | all media and formats whether now known or hereafter created, 158 | and to make technical modifications necessary to do so. The 159 | Licensor waives and/or agrees not to assert any right or 160 | authority to forbid You from making technical modifications 161 | necessary to exercise the Licensed Rights, including 162 | technical modifications necessary to circumvent Effective 163 | Technological Measures. For purposes of this Public License, 164 | simply making modifications authorized by this Section 2(a) 165 | (4) never produces Adapted Material. 166 | 167 | 5. Downstream recipients. 168 | 169 | a. Offer from the Licensor -- Licensed Material. Every 170 | recipient of the Licensed Material automatically 171 | receives an offer from the Licensor to exercise the 172 | Licensed Rights under the terms and conditions of this 173 | Public License. 174 | 175 | b. No downstream restrictions. You may not offer or impose 176 | any additional or different terms or conditions on, or 177 | apply any Effective Technological Measures to, the 178 | Licensed Material if doing so restricts exercise of the 179 | Licensed Rights by any recipient of the Licensed 180 | Material. 181 | 182 | 6. No endorsement. Nothing in this Public License constitutes or 183 | may be construed as permission to assert or imply that You 184 | are, or that Your use of the Licensed Material is, connected 185 | with, or sponsored, endorsed, or granted official status by, 186 | the Licensor or others designated to receive attribution as 187 | provided in Section 3(a)(1)(A)(i). 188 | 189 | b. Other rights. 190 | 191 | 1. Moral rights, such as the right of integrity, are not 192 | licensed under this Public License, nor are publicity, 193 | privacy, and/or other similar personality rights; however, to 194 | the extent possible, the Licensor waives and/or agrees not to 195 | assert any such rights held by the Licensor to the limited 196 | extent necessary to allow You to exercise the Licensed 197 | Rights, but not otherwise. 198 | 199 | 2. Patent and trademark rights are not licensed under this 200 | Public License. 201 | 202 | 3. To the extent possible, the Licensor waives any right to 203 | collect royalties from You for the exercise of the Licensed 204 | Rights, whether directly or through a collecting society 205 | under any voluntary or waivable statutory or compulsory 206 | licensing scheme. In all other cases the Licensor expressly 207 | reserves any right to collect such royalties. 208 | 209 | 210 | Section 3 -- License Conditions. 211 | 212 | Your exercise of the Licensed Rights is expressly made subject to the 213 | following conditions. 214 | 215 | a. Attribution. 216 | 217 | 1. If You Share the Licensed Material (including in modified 218 | form), You must: 219 | 220 | a. retain the following if it is supplied by the Licensor 221 | with the Licensed Material: 222 | 223 | i. identification of the creator(s) of the Licensed 224 | Material and any others designated to receive 225 | attribution, in any reasonable manner requested by 226 | the Licensor (including by pseudonym if 227 | designated); 228 | 229 | ii. a copyright notice; 230 | 231 | iii. a notice that refers to this Public License; 232 | 233 | iv. a notice that refers to the disclaimer of 234 | warranties; 235 | 236 | v. a URI or hyperlink to the Licensed Material to the 237 | extent reasonably practicable; 238 | 239 | b. indicate if You modified the Licensed Material and 240 | retain an indication of any previous modifications; and 241 | 242 | c. indicate the Licensed Material is licensed under this 243 | Public License, and include the text of, or the URI or 244 | hyperlink to, this Public License. 245 | 246 | 2. You may satisfy the conditions in Section 3(a)(1) in any 247 | reasonable manner based on the medium, means, and context in 248 | which You Share the Licensed Material. For example, it may be 249 | reasonable to satisfy the conditions by providing a URI or 250 | hyperlink to a resource that includes the required 251 | information. 252 | 253 | 3. If requested by the Licensor, You must remove any of the 254 | information required by Section 3(a)(1)(A) to the extent 255 | reasonably practicable. 256 | 257 | 4. If You Share Adapted Material You produce, the Adapter's 258 | License You apply must not prevent recipients of the Adapted 259 | Material from complying with this Public License. 260 | 261 | 262 | Section 4 -- Sui Generis Database Rights. 263 | 264 | Where the Licensed Rights include Sui Generis Database Rights that 265 | apply to Your use of the Licensed Material: 266 | 267 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 268 | to extract, reuse, reproduce, and Share all or a substantial 269 | portion of the contents of the database; 270 | 271 | b. if You include all or a substantial portion of the database 272 | contents in a database in which You have Sui Generis Database 273 | Rights, then the database in which You have Sui Generis Database 274 | Rights (but not its individual contents) is Adapted Material; and 275 | 276 | c. You must comply with the conditions in Section 3(a) if You Share 277 | all or a substantial portion of the contents of the database. 278 | 279 | For the avoidance of doubt, this Section 4 supplements and does not 280 | replace Your obligations under this Public License where the Licensed 281 | Rights include other Copyright and Similar Rights. 282 | 283 | 284 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 285 | 286 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 287 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 288 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 289 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 290 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 291 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 292 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 293 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 294 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 295 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 296 | 297 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 298 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 299 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 300 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 301 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 302 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 303 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 304 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 305 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 306 | 307 | c. The disclaimer of warranties and limitation of liability provided 308 | above shall be interpreted in a manner that, to the extent 309 | possible, most closely approximates an absolute disclaimer and 310 | waiver of all liability. 311 | 312 | 313 | Section 6 -- Term and Termination. 314 | 315 | a. This Public License applies for the term of the Copyright and 316 | Similar Rights licensed here. However, if You fail to comply with 317 | this Public License, then Your rights under this Public License 318 | terminate automatically. 319 | 320 | b. Where Your right to use the Licensed Material has terminated under 321 | Section 6(a), it reinstates: 322 | 323 | 1. automatically as of the date the violation is cured, provided 324 | it is cured within 30 days of Your discovery of the 325 | violation; or 326 | 327 | 2. upon express reinstatement by the Licensor. 328 | 329 | For the avoidance of doubt, this Section 6(b) does not affect any 330 | right the Licensor may have to seek remedies for Your violations 331 | of this Public License. 332 | 333 | c. For the avoidance of doubt, the Licensor may also offer the 334 | Licensed Material under separate terms or conditions or stop 335 | distributing the Licensed Material at any time; however, doing so 336 | will not terminate this Public License. 337 | 338 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 339 | License. 340 | 341 | 342 | Section 7 -- Other Terms and Conditions. 343 | 344 | a. The Licensor shall not be bound by any additional or different 345 | terms or conditions communicated by You unless expressly agreed. 346 | 347 | b. Any arrangements, understandings, or agreements regarding the 348 | Licensed Material not stated herein are separate from and 349 | independent of the terms and conditions of this Public License. 350 | 351 | 352 | Section 8 -- Interpretation. 353 | 354 | a. For the avoidance of doubt, this Public License does not, and 355 | shall not be interpreted to, reduce, limit, restrict, or impose 356 | conditions on any use of the Licensed Material that could lawfully 357 | be made without permission under this Public License. 358 | 359 | b. To the extent possible, if any provision of this Public License is 360 | deemed unenforceable, it shall be automatically reformed to the 361 | minimum extent necessary to make it enforceable. If the provision 362 | cannot be reformed, it shall be severed from this Public License 363 | without affecting the enforceability of the remaining terms and 364 | conditions. 365 | 366 | c. No term or condition of this Public License will be waived and no 367 | failure to comply consented to unless expressly agreed to by the 368 | Licensor. 369 | 370 | d. Nothing in this Public License constitutes or may be interpreted 371 | as a limitation upon, or waiver of, any privileges and immunities 372 | that apply to the Licensor or You, including from the legal 373 | processes of any jurisdiction or authority. 374 | 375 | 376 | ======================================================================= 377 | 378 | Creative Commons is not a party to its public 379 | licenses. Notwithstanding, Creative Commons may elect to apply one of 380 | its public licenses to material it publishes and in those instances 381 | will be considered the “Licensor.” The text of the Creative Commons 382 | public licenses is dedicated to the public domain under the CC0 Public 383 | Domain Dedication. Except for the limited purpose of indicating that 384 | material is shared under a Creative Commons public license or as 385 | otherwise permitted by the Creative Commons policies published at 386 | creativecommons.org/policies, Creative Commons does not authorize the 387 | use of the trademark "Creative Commons" or any other trademark or logo 388 | of Creative Commons without its prior written consent including, 389 | without limitation, in connection with any unauthorized modifications 390 | to any of its public licenses or any other arrangements, 391 | understandings, or agreements concerning use of licensed material. For 392 | the avoidance of doubt, this paragraph does not form part of the 393 | public licenses. 394 | 395 | Creative Commons may be contacted at creativecommons.org. 396 | -------------------------------------------------------------------------------- /data/dipole_dipole.obs: -------------------------------------------------------------------------------- 1 | COMMON_CURRENT 2 | ! general FORMAT 3 | 24 4 | -6.500000e+01 1.713320e+00 -6.000000e+01 1.851802e+00 15 5 | -5.500000e+01 1.997919e+00 -5.000000e+01 2.151531e+00 -1.051650e+00 8.627158e-02 6 | -5.000000e+01 2.151531e+00 -4.500000e+01 2.312404e+00 -3.085269e-01 2.152602e-02 7 | -4.500000e+01 2.312404e+00 -4.000000e+01 2.480204e+00 -1.050808e-01 8.015934e-03 8 | -4.000000e+01 2.480204e+00 -3.500000e+01 2.654498e+00 -5.680758e-02 4.115746e-03 9 | -3.500000e+01 2.654498e+00 -3.000000e+01 2.834750e+00 -2.576373e-02 2.218784e-03 10 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 -1.531530e-02 1.245972e-03 11 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 -1.112799e-02 8.000567e-04 12 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 -4.861341e-03 4.574161e-04 13 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 -3.637919e-03 2.992535e-04 14 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 -2.516337e-03 1.956116e-04 15 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 -1.482817e-03 1.168837e-04 16 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 -1.067290e-03 8.839311e-05 17 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 -7.382223e-04 7.589949e-05 18 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -7.461381e-04 6.482118e-05 19 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -4.956882e-04 4.382130e-05 20 | 21 | -6.000000e+01 1.851802e+00 -5.500000e+01 1.997919e+00 15 22 | -5.000000e+01 2.151531e+00 -4.500000e+01 2.312404e+00 -1.219999e+00 8.619241e-02 23 | -4.500000e+01 2.312404e+00 -4.000000e+01 2.480204e+00 -2.374303e-01 2.046463e-02 24 | -4.000000e+01 2.480204e+00 -3.500000e+01 2.654498e+00 -1.118990e-01 8.607219e-03 25 | -3.500000e+01 2.654498e+00 -3.000000e+01 2.834750e+00 -5.295210e-02 4.156377e-03 26 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 -2.711899e-02 2.191177e-03 27 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 -1.632515e-02 1.356060e-03 28 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 -1.028805e-02 7.561771e-04 29 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 -5.772918e-03 4.845033e-04 30 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 -3.902933e-03 3.108675e-04 31 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 -2.037913e-03 1.820225e-04 32 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 -1.503588e-03 1.340519e-04 33 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 -1.424961e-03 1.123716e-04 34 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -1.224849e-03 9.483976e-05 35 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -7.023580e-04 6.340076e-05 36 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -4.491399e-04 3.326175e-05 37 | 38 | -5.500000e+01 1.997919e+00 -5.000000e+01 2.151531e+00 15 39 | -4.500000e+01 2.312404e+00 -4.000000e+01 2.480204e+00 -1.104476e+00 8.301429e-02 40 | -4.000000e+01 2.480204e+00 -3.500000e+01 2.654498e+00 -2.709677e-01 2.241056e-02 41 | -3.500000e+01 2.654498e+00 -3.000000e+01 2.834750e+00 -9.536201e-02 8.827840e-03 42 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 -5.146489e-02 4.151770e-03 43 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 -3.159526e-02 2.415107e-03 44 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 -1.531948e-02 1.298984e-03 45 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 -9.982122e-03 8.113988e-04 46 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 -6.853178e-03 5.103532e-04 47 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 -4.007515e-03 2.929043e-04 48 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 -2.803907e-03 2.103418e-04 49 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 -2.078547e-03 1.722367e-04 50 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -1.794776e-03 1.436029e-04 51 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -1.096741e-03 9.494302e-05 52 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -6.066335e-04 4.879891e-05 53 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -4.562918e-04 3.427433e-05 54 | 55 | -5.000000e+01 2.151531e+00 -4.500000e+01 2.312404e+00 15 56 | -4.000000e+01 2.480204e+00 -3.500000e+01 2.654498e+00 -1.164100e+00 8.938442e-02 57 | -3.500000e+01 2.654498e+00 -3.000000e+01 2.834750e+00 -3.273099e-01 2.224938e-02 58 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 -9.889724e-02 8.500844e-03 59 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 -5.429388e-02 4.422638e-03 60 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 -2.902658e-02 2.239000e-03 61 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 -1.572548e-02 1.348266e-03 62 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 -1.063303e-02 8.277365e-04 63 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 -6.144436e-03 4.651473e-04 64 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 -4.040034e-03 3.260107e-04 65 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 -3.268716e-03 2.609476e-04 66 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -2.379352e-03 2.148830e-04 67 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -1.720656e-03 1.405548e-04 68 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -7.563191e-04 7.086364e-05 69 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -5.935778e-04 4.859219e-05 70 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -4.282888e-04 3.349361e-05 71 | 72 | -4.500000e+01 2.312404e+00 -4.000000e+01 2.480204e+00 15 73 | -3.500000e+01 2.654498e+00 -3.000000e+01 2.834750e+00 -1.155854e+00 8.512130e-02 74 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 -2.592097e-01 2.055722e-02 75 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 -1.129700e-01 8.687589e-03 76 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 -4.540170e-02 3.927404e-03 77 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 -2.641674e-02 2.217565e-03 78 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 -1.711167e-02 1.312119e-03 79 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 -9.308258e-03 7.178974e-04 80 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 -5.545403e-03 4.902042e-04 81 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 -4.980369e-03 3.831437e-04 82 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -3.726341e-03 3.111116e-04 83 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -2.609602e-03 2.012546e-04 84 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -1.289188e-03 9.963345e-05 85 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -8.251013e-04 6.679558e-05 86 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -5.559031e-04 4.495096e-05 87 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -4.162428e-04 3.127173e-05 88 | 89 | -4.000000e+01 2.480204e+00 -3.500000e+01 2.654498e+00 15 90 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 -8.902931e-01 8.486622e-02 91 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 -3.113712e-01 2.284707e-02 92 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 -1.049434e-01 8.421206e-03 93 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 -5.194728e-02 4.242681e-03 94 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 -3.321590e-02 2.360426e-03 95 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 -1.681843e-02 1.243457e-03 96 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 -1.075085e-02 8.238617e-04 97 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 -7.696739e-03 6.279243e-04 98 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -6.705422e-03 5.025327e-04 99 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -3.204821e-03 3.216122e-04 100 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -1.762997e-03 1.565639e-04 101 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -1.102393e-03 1.027955e-04 102 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -7.981099e-04 6.763945e-05 103 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -6.101820e-04 4.600323e-05 104 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -4.004393e-04 3.503978e-05 105 | 106 | -3.500000e+01 2.654498e+00 -3.000000e+01 2.834750e+00 15 107 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 -1.289137e+00 8.915646e-02 108 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 -2.028460e-01 2.083379e-02 109 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 -9.590564e-02 8.541214e-03 110 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 -4.819776e-02 4.249987e-03 111 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 -2.547023e-02 2.101210e-03 112 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 -1.391222e-02 1.334746e-03 113 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 -1.457456e-02 9.864690e-04 114 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -9.374544e-03 7.766805e-04 115 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -7.028349e-03 4.916540e-04 116 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -3.131643e-03 2.355612e-04 117 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -1.986921e-03 1.516670e-04 118 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -1.272426e-03 9.770193e-05 119 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -8.919432e-04 6.501966e-05 120 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -6.174307e-04 4.846646e-05 121 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -5.098223e-04 3.420751e-05 122 | 123 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 15 124 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 -1.180521e+00 8.093997e-02 125 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 -2.636702e-01 2.110495e-02 126 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 -1.102503e-01 8.541016e-03 127 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 -4.561645e-02 3.755715e-03 128 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 -2.570155e-02 2.221964e-03 129 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 -1.924985e-02 1.567713e-03 130 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -1.414817e-02 1.206701e-03 131 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -9.555377e-03 7.539803e-04 132 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -4.448628e-03 3.553857e-04 133 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -2.756485e-03 2.244725e-04 134 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -1.713989e-03 1.416820e-04 135 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -1.108871e-03 9.231824e-05 136 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -8.624580e-04 6.738960e-05 137 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -4.831632e-04 4.658125e-05 138 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -4.198597e-04 3.350467e-05 139 | 140 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 15 141 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 -1.038749e+00 9.196983e-02 142 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 -2.845909e-01 2.336502e-02 143 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 -1.033540e-01 8.309959e-03 144 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 -6.065314e-02 4.337567e-03 145 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 -3.556571e-02 2.832312e-03 146 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -2.651960e-02 2.109882e-03 147 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -1.648220e-02 1.297734e-03 148 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -6.635248e-03 6.013686e-04 149 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -4.154736e-03 3.727537e-04 150 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -2.659038e-03 2.307017e-04 151 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -1.708317e-03 1.472995e-04 152 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -1.338562e-03 1.053733e-04 153 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -1.009804e-03 7.137130e-05 154 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -6.973463e-04 5.028907e-05 155 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -4.264005e-04 3.805911e-05 156 | 157 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 15 158 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 -1.028209e+00 8.585924e-02 159 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 -2.332663e-01 1.938410e-02 160 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 -9.534845e-02 8.145953e-03 161 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 -6.186386e-02 4.638568e-03 162 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -4.269844e-02 3.268796e-03 163 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -2.365282e-02 1.965248e-03 164 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -9.693911e-03 8.926753e-04 165 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -6.495789e-03 5.424721e-04 166 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -4.403661e-03 3.292805e-04 167 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -2.502058e-03 2.061378e-04 168 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -1.879715e-03 1.446405e-04 169 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -1.236081e-03 9.608818e-05 170 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -8.303315e-04 6.637255e-05 171 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -6.414897e-04 4.923960e-05 172 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -4.537768e-04 3.639325e-05 173 | 174 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 14 175 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 -1.153467e+00 7.963522e-02 176 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 -3.066027e-01 2.131888e-02 177 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 -1.167609e-01 9.500541e-03 178 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -7.465568e-02 6.037611e-03 179 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -4.344218e-02 3.490225e-03 180 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -2.050158e-02 1.541248e-03 181 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -1.174536e-02 9.144535e-04 182 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -6.707283e-03 5.434423e-04 183 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -4.244303e-03 3.333440e-04 184 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -2.800792e-03 2.294262e-04 185 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -1.786419e-03 1.495490e-04 186 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -1.008928e-03 1.012991e-04 187 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -9.840503e-04 7.369373e-05 188 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -6.031006e-04 5.338468e-05 189 | 190 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 13 191 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 -1.120251e+00 8.844051e-02 192 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 -3.177986e-01 2.344811e-02 193 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -1.507188e-01 1.232727e-02 194 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -7.658839e-02 6.654552e-03 195 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -3.821742e-02 2.813873e-03 196 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -2.381644e-02 1.617293e-03 197 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -1.200318e-02 9.377147e-04 198 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -6.149114e-03 5.629244e-04 199 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -4.607122e-03 3.800237e-04 200 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -3.131826e-03 2.431691e-04 201 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -1.878140e-03 1.616056e-04 202 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -1.700688e-03 1.153398e-04 203 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -1.072011e-03 8.191657e-05 204 | 205 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 12 206 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 -1.072499e+00 8.409869e-02 207 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -3.399595e-01 2.828599e-02 208 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -1.848851e-01 1.340482e-02 209 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -6.898328e-02 5.255228e-03 210 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -3.426132e-02 2.873648e-03 211 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -2.140771e-02 1.611345e-03 212 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -1.353716e-02 9.428762e-04 213 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -8.290983e-03 6.235544e-04 214 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -5.846728e-03 3.917029e-04 215 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -3.544940e-03 2.555190e-04 216 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -2.435817e-03 1.790701e-04 217 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -1.674327e-03 1.248314e-04 218 | 219 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 11 220 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 -1.570486e+00 1.080967e-01 221 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -4.702569e-01 3.745791e-02 222 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -1.619746e-01 1.308436e-02 223 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -8.063395e-02 6.666617e-03 224 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -4.465628e-02 3.580654e-03 225 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -2.492792e-02 2.036305e-03 226 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -1.770070e-02 1.320358e-03 227 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -9.800360e-03 8.163486e-04 228 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -6.432761e-03 5.244723e-04 229 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -4.544786e-03 3.622959e-04 230 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -3.137722e-03 2.489461e-04 231 | 232 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 10 233 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 -1.369853e+00 1.064681e-01 234 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -3.205180e-01 2.710330e-02 235 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -1.424567e-01 1.221737e-02 236 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -8.189816e-02 6.129861e-03 237 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -4.452861e-02 3.349627e-03 238 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -2.972883e-02 2.122962e-03 239 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -1.528826e-02 1.292982e-03 240 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -9.967725e-03 8.201931e-04 241 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -8.073105e-03 5.605735e-04 242 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -5.120467e-03 3.814940e-04 243 | 244 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 9 245 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 -1.032688e+00 7.883491e-02 246 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -3.442749e-01 2.308790e-02 247 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -1.340200e-01 9.532902e-03 248 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -6.335777e-02 4.671809e-03 249 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -3.671474e-02 2.794385e-03 250 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -2.048772e-02 1.646279e-03 251 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -1.286787e-02 1.019815e-03 252 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -8.181367e-03 6.849526e-04 253 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -5.665968e-03 4.595152e-04 254 | 255 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 8 256 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 -1.261451e+00 8.982235e-02 257 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -2.741580e-01 2.194504e-02 258 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -9.384532e-02 8.326604e-03 259 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -5.074052e-02 4.315865e-03 260 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -2.864727e-02 2.345680e-03 261 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -1.615739e-02 1.382478e-03 262 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -1.119954e-02 8.985376e-04 263 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -7.280787e-03 5.878185e-04 264 | 265 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 7 266 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 -1.042584e+00 8.334689e-02 267 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -2.191984e-01 1.972196e-02 268 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -1.080226e-01 8.154925e-03 269 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -4.728615e-02 3.887442e-03 270 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -2.718722e-02 2.119541e-03 271 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -1.599608e-02 1.315226e-03 272 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -1.122770e-02 8.336253e-04 273 | 274 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 6 275 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 -9.029321e-01 8.422131e-02 276 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -2.798915e-01 2.227562e-02 277 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -1.184816e-01 8.611697e-03 278 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -5.617455e-02 4.158795e-03 279 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -3.241927e-02 2.412709e-03 280 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -1.917887e-02 1.469585e-03 281 | 282 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 5 283 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 -1.017202e+00 8.822932e-02 284 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -3.075057e-01 2.152891e-02 285 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -1.134098e-01 8.386995e-03 286 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -4.842961e-02 4.317940e-03 287 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -3.055556e-02 2.458815e-03 288 | 289 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 4 290 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 -1.056436e+00 8.412736e-02 291 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -2.681096e-01 2.066598e-02 292 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -1.003179e-01 8.574746e-03 293 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -5.581919e-02 4.314743e-03 294 | 295 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 3 296 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 -1.084370e+00 8.652685e-02 297 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -2.922325e-01 2.265095e-02 298 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -1.189018e-01 9.156673e-03 299 | 300 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 2 301 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 -1.127822e+00 8.733922e-02 302 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -2.646117e-01 2.209085e-02 303 | 304 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 1 305 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 -1.036918e+00 8.642762e-02 306 | 307 | -------------------------------------------------------------------------------- /data/pole_dipole.obs: -------------------------------------------------------------------------------- 1 | COMMON_CURRENT 2 | ! general FORMAT 3 | 25 4 | -6.500000e+01 1.713320e+00 -6.500000e+01 1.713320e+00 15 5 | -6.000000e+01 1.851802e+00 -5.500000e+01 1.997919e+00 3.331856e+00 2.600979e-01 6 | -5.500000e+01 1.997919e+00 -5.000000e+01 2.151531e+00 8.677477e-01 8.134683e-02 7 | -5.000000e+01 2.151531e+00 -4.500000e+01 2.312404e+00 4.239574e-01 3.565361e-02 8 | -4.500000e+01 2.312404e+00 -4.000000e+01 2.480204e+00 1.949435e-01 1.740955e-02 9 | -4.000000e+01 2.480204e+00 -3.500000e+01 2.654498e+00 1.411289e-01 1.054117e-02 10 | -3.500000e+01 2.654498e+00 -3.000000e+01 2.834750e+00 8.275859e-02 6.512241e-03 11 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 4.706398e-02 4.243441e-03 12 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 4.678724e-02 3.255405e-03 13 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 2.945140e-02 2.293124e-03 14 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 2.303175e-02 1.897795e-03 15 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 2.009764e-02 1.632131e-03 16 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 1.711242e-02 1.323912e-03 17 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 1.982003e-02 1.297659e-03 18 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 1.633274e-02 1.210794e-03 19 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 1.756879e-02 1.283478e-03 20 | 21 | -6.000000e+01 1.851802e+00 -6.000000e+01 1.851802e+00 15 22 | -5.500000e+01 1.997919e+00 -5.000000e+01 2.151531e+00 2.759900e+00 2.544712e-01 23 | -5.000000e+01 2.151531e+00 -4.500000e+01 2.312404e+00 1.051128e+00 7.845399e-02 24 | -4.500000e+01 2.312404e+00 -4.000000e+01 2.480204e+00 3.936284e-01 3.280401e-02 25 | -4.000000e+01 2.480204e+00 -3.500000e+01 2.654498e+00 2.206831e-01 1.800021e-02 26 | -3.500000e+01 2.654498e+00 -3.000000e+01 2.834750e+00 1.295300e-01 1.026098e-02 27 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 8.050822e-02 6.211415e-03 28 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 5.071033e-02 4.450360e-03 29 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 3.863594e-02 2.952718e-03 30 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 2.894447e-02 2.325785e-03 31 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 2.651944e-02 1.921134e-03 32 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 2.080608e-02 1.509488e-03 33 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 1.777367e-02 1.442761e-03 34 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 1.594456e-02 1.319360e-03 35 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 1.916858e-02 1.376862e-03 36 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 1.852587e-02 1.611393e-03 37 | 38 | -5.500000e+01 1.997919e+00 -5.500000e+01 1.997919e+00 15 39 | -5.000000e+01 2.151531e+00 -4.500000e+01 2.312404e+00 2.939580e+00 2.513459e-01 40 | -4.500000e+01 2.312404e+00 -4.000000e+01 2.480204e+00 9.487042e-01 7.349209e-02 41 | -4.000000e+01 2.480204e+00 -3.500000e+01 2.654498e+00 4.904456e-01 3.454430e-02 42 | -3.500000e+01 2.654498e+00 -3.000000e+01 2.834750e+00 2.243715e-01 1.780145e-02 43 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 1.183155e-01 9.927750e-03 44 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 8.720560e-02 6.603201e-03 45 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 5.194241e-02 4.090714e-03 46 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 3.508666e-02 3.032110e-03 47 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 2.688659e-02 2.375558e-03 48 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 2.085360e-02 1.786979e-03 49 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 2.132278e-02 1.648834e-03 50 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 1.832350e-02 1.465668e-03 51 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 2.012664e-02 1.496580e-03 52 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 2.168477e-02 1.725298e-03 53 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 2.068694e-02 1.770071e-03 54 | 55 | -5.000000e+01 2.151531e+00 -5.000000e+01 2.151531e+00 15 56 | -4.500000e+01 2.312404e+00 -4.000000e+01 2.480204e+00 2.874724e+00 2.400309e-01 57 | -4.000000e+01 2.480204e+00 -3.500000e+01 2.654498e+00 8.142230e-01 7.913505e-02 58 | -3.500000e+01 2.654498e+00 -3.000000e+01 2.834750e+00 4.650486e-01 3.479292e-02 59 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 2.225830e-01 1.749365e-02 60 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 1.290623e-01 1.072309e-02 61 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 8.229146e-02 6.170387e-03 62 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 5.188985e-02 4.269335e-03 63 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 3.698306e-02 3.136725e-03 64 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 2.811510e-02 2.230001e-03 65 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 2.446265e-02 1.961143e-03 66 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 2.333000e-02 1.675137e-03 67 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 2.115641e-02 1.658271e-03 68 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 2.680291e-02 1.870782e-03 69 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 2.421300e-02 1.893934e-03 70 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 2.723807e-02 2.230284e-03 71 | 72 | -4.500000e+01 2.312404e+00 -4.500000e+01 2.312404e+00 15 73 | -4.000000e+01 2.480204e+00 -3.500000e+01 2.654498e+00 2.951967e+00 2.584661e-01 74 | -3.500000e+01 2.654498e+00 -3.000000e+01 2.834750e+00 9.800160e-01 7.909208e-02 75 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 4.068257e-01 3.391235e-02 76 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 2.529853e-01 1.882363e-02 77 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 1.311558e-01 1.002146e-02 78 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 7.724365e-02 6.459173e-03 79 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 5.329978e-02 4.429099e-03 80 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 4.038137e-02 2.950223e-03 81 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 2.934159e-02 2.444867e-03 82 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 2.580797e-02 1.981800e-03 83 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 2.263008e-02 1.880617e-03 84 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 2.482134e-02 2.058036e-03 85 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 2.586130e-02 2.044797e-03 86 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 3.010656e-02 2.383145e-03 87 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 2.908950e-02 2.488519e-03 88 | 89 | -4.000000e+01 2.480204e+00 -4.000000e+01 2.480204e+00 15 90 | -3.500000e+01 2.654498e+00 -3.000000e+01 2.834750e+00 3.624639e+00 2.498122e-01 91 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 8.512784e-01 7.486067e-02 92 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 4.466738e-01 3.562504e-02 93 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 2.200008e-01 1.724682e-02 94 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 1.127586e-01 1.031832e-02 95 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 7.581283e-02 6.607096e-03 96 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 4.918654e-02 4.115800e-03 97 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 4.071320e-02 3.195054e-03 98 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 2.837159e-02 2.433921e-03 99 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 3.291472e-02 2.189186e-03 100 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 3.160357e-02 2.300208e-03 101 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 3.179962e-02 2.227510e-03 102 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 3.378812e-02 2.559604e-03 103 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 3.111845e-02 2.651514e-03 104 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 3.507358e-02 2.584285e-03 105 | 106 | -3.500000e+01 2.654498e+00 -3.500000e+01 2.654498e+00 15 107 | -3.000000e+01 2.834750e+00 -2.500000e+01 3.020325e+00 2.583415e+00 2.450886e-01 108 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 1.238742e+00 8.115655e-02 109 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 4.624340e-01 3.357924e-02 110 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 2.486051e-01 1.820040e-02 111 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 1.390374e-01 1.079625e-02 112 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 9.127080e-02 6.261339e-03 113 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 4.624688e-02 4.522688e-03 114 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 4.136684e-02 3.199295e-03 115 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 2.872802e-02 2.683687e-03 116 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 3.116221e-02 2.662161e-03 117 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 2.952792e-02 2.481453e-03 118 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 3.342416e-02 2.790824e-03 119 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 3.222940e-02 2.856724e-03 120 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 3.388769e-02 2.763937e-03 121 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 2.849033e-02 2.821891e-03 122 | 123 | -3.000000e+01 2.834750e+00 -3.000000e+01 2.834750e+00 15 124 | -2.500000e+01 3.020325e+00 -2.000000e+01 3.210499e+00 2.708033e+00 2.600164e-01 125 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 9.400817e-01 7.516617e-02 126 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 4.218654e-01 3.488893e-02 127 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 2.420115e-01 1.882754e-02 128 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 1.361140e-01 1.013284e-02 129 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 8.673414e-02 6.818150e-03 130 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 5.933560e-02 4.469615e-03 131 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 4.271920e-02 3.465567e-03 132 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 3.992489e-02 3.198532e-03 133 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 3.600427e-02 2.830487e-03 134 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 3.983737e-02 3.087554e-03 135 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 4.035563e-02 3.107003e-03 136 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 3.631431e-02 2.976117e-03 137 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 4.416646e-02 3.019409e-03 138 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 3.473583e-02 2.785860e-03 139 | 140 | -2.500000e+01 3.020325e+00 -2.500000e+01 3.020325e+00 15 141 | -2.000000e+01 3.210499e+00 -1.500000e+01 3.404460e+00 3.255980e+00 2.375666e-01 142 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 9.890190e-01 7.714784e-02 143 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 4.485038e-01 3.570141e-02 144 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 1.923351e-01 1.745837e-02 145 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 1.356991e-01 1.090578e-02 146 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 8.246186e-02 6.633691e-03 147 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 5.829563e-02 4.739772e-03 148 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 5.621116e-02 4.024737e-03 149 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 4.615530e-02 3.331566e-03 150 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 4.694348e-02 3.483971e-03 151 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 4.586389e-02 3.422059e-03 152 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 3.975151e-02 3.232630e-03 153 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 3.529057e-02 3.252170e-03 154 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 3.321400e-02 2.983317e-03 155 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 3.798395e-02 2.753186e-03 156 | 157 | -2.000000e+01 3.210499e+00 -2.000000e+01 3.210499e+00 15 158 | -1.500000e+01 3.404460e+00 -1.000000e+01 3.601328e+00 3.410888e+00 2.618829e-01 159 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 1.073916e+00 8.282492e-02 160 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 4.562767e-01 3.431944e-02 161 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 2.262553e-01 1.939914e-02 162 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 1.296740e-01 1.086268e-02 163 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 9.222629e-02 7.113779e-03 164 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 7.759334e-02 5.487271e-03 165 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 5.423053e-02 4.163387e-03 166 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 4.762713e-02 4.096459e-03 167 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 4.987582e-02 3.877703e-03 168 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 4.304753e-02 3.586032e-03 169 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 4.323757e-02 3.562759e-03 170 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 4.048301e-02 3.241277e-03 171 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 3.557841e-02 2.971782e-03 172 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 3.570058e-02 2.848914e-03 173 | 174 | -1.500000e+01 3.404460e+00 -1.500000e+01 3.404460e+00 15 175 | -1.000000e+01 3.601328e+00 -5.000000e+00 3.800167e+00 2.689773e+00 2.557885e-01 176 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 7.870318e-01 7.412066e-02 177 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 4.582786e-01 3.605630e-02 178 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 2.319110e-01 1.835480e-02 179 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 1.388104e-01 1.105778e-02 180 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 9.118792e-02 7.795130e-03 181 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 6.568052e-02 5.403195e-03 182 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 6.267516e-02 4.951512e-03 183 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 5.487401e-02 4.473121e-03 184 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 5.147543e-02 4.023974e-03 185 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 5.135202e-02 3.933625e-03 186 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 5.326588e-02 3.541588e-03 187 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 3.751966e-02 3.221468e-03 188 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 4.206314e-02 3.069689e-03 189 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 3.528342e-02 2.860830e-03 190 | 191 | -1.000000e+01 3.601328e+00 -1.000000e+01 3.601328e+00 14 192 | -5.000000e+00 3.800167e+00 0.000000e+00 4.000000e+00 2.700131e+00 2.358867e-01 193 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 1.026426e+00 8.035560e-02 194 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 4.704263e-01 3.487008e-02 195 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 2.154386e-01 1.886797e-02 196 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 1.240025e-01 1.206967e-02 197 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 9.237238e-02 7.571794e-03 198 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 8.953642e-02 6.360709e-03 199 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 6.947022e-02 5.395011e-03 200 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 5.655718e-02 4.666131e-03 201 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 5.960996e-02 4.455738e-03 202 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 4.053041e-02 3.952266e-03 203 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 4.235619e-02 3.555347e-03 204 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 4.114952e-02 3.359930e-03 205 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 4.037899e-02 3.110539e-03 206 | 207 | -5.000000e+00 3.800167e+00 -5.000000e+00 3.800167e+00 13 208 | 0.000000e+00 4.000000e+00 5.000000e+00 4.199833e+00 2.939730e+00 2.622986e-01 209 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 9.318726e-01 7.848406e-02 210 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 4.691740e-01 3.587667e-02 211 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 2.393874e-01 2.043533e-02 212 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 1.226159e-01 1.152114e-02 213 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 1.027098e-01 8.775856e-03 214 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 6.932637e-02 6.882009e-03 215 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 6.283005e-02 5.646877e-03 216 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 5.949244e-02 5.219823e-03 217 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 5.254435e-02 4.534652e-03 218 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 4.206676e-02 4.017272e-03 219 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 4.672035e-02 3.753927e-03 220 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 4.347030e-02 3.444352e-03 221 | 222 | 0.000000e+00 4.000000e+00 0.000000e+00 4.000000e+00 12 223 | 5.000000e+00 4.199833e+00 1.000000e+01 4.398672e+00 3.149213e+00 2.440339e-01 224 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 9.682228e-01 7.728190e-02 225 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 4.743893e-01 3.718291e-02 226 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 2.152756e-01 1.856783e-02 227 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 1.659496e-01 1.277038e-02 228 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 1.170410e-01 9.190652e-03 229 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 8.828743e-02 7.088174e-03 230 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 7.803048e-02 6.294822e-03 231 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 6.464000e-02 5.327318e-03 232 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 6.098767e-02 4.629323e-03 233 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 5.689571e-02 4.265101e-03 234 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 4.504541e-02 3.870055e-03 235 | 236 | 5.000000e+00 4.199833e+00 5.000000e+00 4.199833e+00 11 237 | 1.000000e+01 4.398672e+00 1.500000e+01 4.595540e+00 2.987092e+00 2.551674e-01 238 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 9.156392e-01 8.326619e-02 239 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 4.539366e-01 3.445186e-02 240 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 2.672321e-01 2.080097e-02 241 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 1.428170e-01 1.347523e-02 242 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 1.111956e-01 9.604164e-03 243 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 9.625014e-02 8.087825e-03 244 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 6.664121e-02 6.605652e-03 245 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 6.116345e-02 5.590135e-03 246 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 5.777181e-02 5.050743e-03 247 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 5.353035e-02 4.513047e-03 248 | 249 | 1.000000e+01 4.398672e+00 1.000000e+01 4.398672e+00 10 250 | 1.500000e+01 4.595540e+00 2.000000e+01 4.789501e+00 3.239788e+00 2.580449e-01 251 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 9.045791e-01 7.305508e-02 252 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 4.813748e-01 3.687122e-02 253 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 2.668560e-01 2.106256e-02 254 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 1.501468e-01 1.370433e-02 255 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 1.357327e-01 1.085248e-02 256 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 1.167566e-01 8.504090e-03 257 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 9.240213e-02 6.977297e-03 258 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 7.877982e-02 6.160825e-03 259 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 7.196561e-02 5.405774e-03 260 | 261 | 1.500000e+01 4.595540e+00 1.500000e+01 4.595540e+00 9 262 | 2.000000e+01 4.789501e+00 2.500000e+01 4.979675e+00 2.858766e+00 2.280479e-01 263 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 9.988819e-01 7.918908e-02 264 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 4.656286e-01 3.727704e-02 265 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 2.967218e-01 2.136908e-02 266 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 1.834660e-01 1.560921e-02 267 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 1.490066e-01 1.160833e-02 268 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 1.116160e-01 9.169097e-03 269 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 1.010687e-01 7.872761e-03 270 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 7.791363e-02 6.756603e-03 271 | 272 | 2.000000e+01 4.789501e+00 2.000000e+01 4.789501e+00 8 273 | 2.500000e+01 4.979675e+00 3.000000e+01 5.165250e+00 3.736680e+00 2.616896e-01 274 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 1.013040e+00 8.146632e-02 275 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 4.274253e-01 3.802113e-02 276 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 2.826929e-01 2.459784e-02 277 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 1.967339e-01 1.701391e-02 278 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 1.530351e-01 1.280685e-02 279 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 1.432122e-01 1.063120e-02 280 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 9.525014e-02 8.888077e-03 281 | 282 | 2.500000e+01 4.979675e+00 2.500000e+01 4.979675e+00 7 283 | 3.000000e+01 5.165250e+00 3.500000e+01 5.345502e+00 2.846349e+00 2.479851e-01 284 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 1.064438e+00 7.722219e-02 285 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 5.181546e-01 4.121152e-02 286 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 3.188871e-01 2.562903e-02 287 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 2.180797e-01 1.813323e-02 288 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 1.926470e-01 1.448389e-02 289 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 1.420783e-01 1.177788e-02 290 | 291 | 3.000000e+01 5.165250e+00 3.000000e+01 5.165250e+00 6 292 | 3.500000e+01 5.345502e+00 4.000000e+01 5.519796e+00 3.042593e+00 2.440357e-01 293 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 1.029611e+00 8.510276e-02 294 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 5.202226e-01 4.329870e-02 295 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 3.326312e-01 2.752003e-02 296 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 2.700557e-01 2.073896e-02 297 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 2.113926e-01 1.625788e-02 298 | 299 | 3.500000e+01 5.345502e+00 3.500000e+01 5.345502e+00 5 300 | 4.000000e+01 5.519796e+00 4.500000e+01 5.687596e+00 3.006799e+00 2.591982e-01 301 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 1.054173e+00 8.563183e-02 302 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 5.441902e-01 4.474338e-02 303 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 3.796180e-01 3.057818e-02 304 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 2.670764e-01 2.273751e-02 305 | 306 | 4.000000e+01 5.519796e+00 4.000000e+01 5.519796e+00 4 307 | 4.500000e+01 5.687596e+00 5.000000e+01 5.848469e+00 3.207352e+00 2.513657e-01 308 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 1.020243e+00 8.526890e-02 309 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 5.396062e-01 4.822737e-02 310 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 4.271464e-01 3.264996e-02 311 | 312 | 4.500000e+01 5.687596e+00 4.500000e+01 5.687596e+00 3 313 | 5.000000e+01 5.848469e+00 5.500000e+01 6.002081e+00 2.985742e+00 2.552966e-01 314 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 1.339223e+00 9.250129e-02 315 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 6.648076e-01 5.148484e-02 316 | 317 | 5.000000e+01 5.848469e+00 5.000000e+01 5.848469e+00 2 318 | 5.500000e+01 6.002081e+00 6.000000e+01 6.148198e+00 3.234381e+00 2.638119e-01 319 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 1.255543e+00 9.455869e-02 320 | 321 | 5.500000e+01 6.002081e+00 5.500000e+01 6.002081e+00 1 322 | 6.000000e+01 6.148198e+00 6.500000e+01 6.286680e+00 3.566198e+00 2.640565e-01 323 | 324 | -------------------------------------------------------------------------------- /live/02-inversion-dc-resistivity-2d.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# 2.5D DC Resistivity Inversion" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "This tutorial demonstrates DC resistivity inversion with SimPEG. We load normalized voltage data and 2D topography for a synthetic pole-dipole survey. Once loaded, we demonstrate a standard set of steps for recovering a model that characterizing subsurface electrical resistivity using weighted least-squares inversion.\n", 15 | "\n", 16 | "The following items are emphasized in this tutorial:\n", 17 | "\n", 18 | "- Assigning uncertainties to DC resistivity data.\n", 19 | "- Designing a suitable mesh based on survey geometry.\n", 20 | "- What model parameters we should invert for.\n", 21 | "- Defining the inverse problem (data misfit, regularization, optimization).\n", 22 | "- Stopping criteria for the inversion.\n", 23 | "- Assessing inversion outputs.\n", 24 | "\n", 25 | "" 26 | ] 27 | }, 28 | { 29 | "cell_type": "markdown", 30 | "metadata": {}, 31 | "source": [ 32 | "## Step 0: Importing Modules" 33 | ] 34 | }, 35 | { 36 | "cell_type": "code", 37 | "execution_count": null, 38 | "metadata": {}, 39 | "outputs": [], 40 | "source": [] 41 | }, 42 | { 43 | "cell_type": "code", 44 | "execution_count": null, 45 | "metadata": {}, 46 | "outputs": [], 47 | "source": [ 48 | "# SimPEG functionality\n", 49 | "from SimPEG.electromagnetics.static import resistivity as dc\n", 50 | "from SimPEG.electromagnetics.static.utils.static_utils import (\n", 51 | " plot_pseudosection,\n", 52 | " apparent_resistivity_from_voltage,\n", 53 | " pseudo_locations,\n", 54 | ")\n", 55 | "from SimPEG.utils.io_utils.io_utils_electromagnetics import read_dcip2d_ubc\n", 56 | "from SimPEG.utils import model_builder, Counter\n", 57 | "from SimPEG import (\n", 58 | " maps,\n", 59 | " data_misfit,\n", 60 | " regularization,\n", 61 | " optimization,\n", 62 | " inverse_problem,\n", 63 | " inversion,\n", 64 | " directives,\n", 65 | ")\n", 66 | "\n", 67 | "# discretize functionality\n", 68 | "from discretize import TreeMesh\n", 69 | "from discretize.utils import active_from_xyz\n", 70 | "\n", 71 | "# Basic Python functionality\n", 72 | "import numpy as np\n", 73 | "import matplotlib as mpl\n", 74 | "import matplotlib.pyplot as plt\n", 75 | "from matplotlib.colors import LogNorm\n", 76 | "\n", 77 | "# Pooch for downloading files from the web\n", 78 | "import pooch\n", 79 | "\n", 80 | "mpl.rcParams.update({\"font.size\": 14}) # default font size\n", 81 | "cmap = mpl.cm.RdYlBu_r # default colormap" 82 | ] 83 | }, 84 | { 85 | "cell_type": "markdown", 86 | "metadata": {}, 87 | "source": [ 88 | "Below is a class specifically used for this tutorial. It is not important to spent time reading through the code in this cell." 89 | ] 90 | }, 91 | { 92 | "cell_type": "code", 93 | "execution_count": null, 94 | "metadata": { 95 | "tags": [] 96 | }, 97 | "outputs": [], 98 | "source": [ 99 | "class SaveInversionProgress(directives.InversionDirective, Counter):\n", 100 | " \"\"\"\n", 101 | " A custom directive to save items of interest during the course of an inversion\n", 102 | " \"\"\"\n", 103 | "\n", 104 | " def initialize(self):\n", 105 | " \"\"\"\n", 106 | " This is called when we first start running an inversion\n", 107 | " \"\"\"\n", 108 | " # initialize an empty dictionary for storing results\n", 109 | " self.inversion_results = {\n", 110 | " \"iteration\": [],\n", 111 | " \"beta\": [],\n", 112 | " \"phi_d\": [],\n", 113 | " \"phi_m\": [],\n", 114 | " \"phi_m_small\": [],\n", 115 | " \"phi_m_smooth_x\": [],\n", 116 | " \"phi_m_smooth_z\": [],\n", 117 | " \"dpred\": [],\n", 118 | " \"model\": [],\n", 119 | " }\n", 120 | "\n", 121 | " def endIter(self):\n", 122 | " \"\"\"\n", 123 | " This is run at the end of every iteration. So here, we just append\n", 124 | " the new values to our dictionary\n", 125 | " \"\"\"\n", 126 | "\n", 127 | " self.inversion_results[\"iteration\"].append(self.opt.iter)\n", 128 | " self.inversion_results[\"beta\"].append(self.invProb.beta)\n", 129 | " self.inversion_results[\"phi_d\"].append(2 * self.invProb.phi_d)\n", 130 | " self.inversion_results[\"phi_m\"].append(2 * self.invProb.phi_m)\n", 131 | " self.inversion_results[\"dpred\"].append(self.invProb.dpred)\n", 132 | " self.inversion_results[\"model\"].append(self.invProb.model)\n", 133 | "\n", 134 | " reg = self.reg.objfcts[0]\n", 135 | " phi_s = reg.objfcts[0](self.invProb.model) * reg.multipliers[0]\n", 136 | " phi_x = reg.objfcts[1](self.invProb.model) * reg.multipliers[1]\n", 137 | " phi_z = reg.objfcts[2](self.invProb.model) * reg.multipliers[2]\n", 138 | "\n", 139 | " self.inversion_results[\"phi_m_small\"].append(phi_s)\n", 140 | " self.inversion_results[\"phi_m_smooth_x\"].append(phi_x)\n", 141 | " self.inversion_results[\"phi_m_smooth_z\"].append(phi_z)" 142 | ] 143 | }, 144 | { 145 | "cell_type": "markdown", 146 | "metadata": {}, 147 | "source": [ 148 | "## Step1: Load Data and Plot" 149 | ] 150 | }, 151 | { 152 | "cell_type": "markdown", 153 | "metadata": {}, 154 | "source": [ 155 | "### Download the Data\n", 156 | "\n", 157 | "### Exercise (beginner):\n", 158 | "\n", 159 | "Define a variable **survey_type = \"dipole-dipole\"** to load the dipole-dipole tutorial data set.\n", 160 | "\n", 161 | "### Exercise (advanced):\n", 162 | "\n", 163 | "Define a variable **survey_type = \"pole-dipole\"** to load the pole-dipole tutorial data set." 164 | ] 165 | }, 166 | { 167 | "cell_type": "code", 168 | "execution_count": null, 169 | "metadata": {}, 170 | "outputs": [], 171 | "source": [] 172 | }, 173 | { 174 | "cell_type": "code", 175 | "execution_count": null, 176 | "metadata": {}, 177 | "outputs": [], 178 | "source": [ 179 | "topo_url = \"https://github.com/simpeg/agrogeo24/raw/main/data/topo_2d.txt\"\n", 180 | "topo_hash = \"09EE57B1687E9D17801993F048D7981C1F75B7D6A0F9D702927C9F6BCAA73B13\"\n", 181 | "\n", 182 | "topo_filename = pooch.retrieve(topo_url, known_hash=topo_hash)" 183 | ] 184 | }, 185 | { 186 | "cell_type": "code", 187 | "execution_count": null, 188 | "metadata": {}, 189 | "outputs": [], 190 | "source": [ 191 | "if survey_type == \"dipole-dipole\":\n", 192 | " data_url = \"https://github.com/simpeg/agrogeo24/raw/main/data/dipole_dipole.obs\"\n", 193 | " data_hash = \"41ad436c6f3ce9f76aff95e4b6e50c85c851bb674e0c36ed0150b655c1534eb2\"\n", 194 | " data_filename = pooch.retrieve(data_url, known_hash=data_hash)\n", 195 | "elif survey_type == \"pole-dipole\":\n", 196 | " data_url = \"https://github.com/simpeg/agrogeo24/raw/main/data/pole_dipole.obs\"\n", 197 | " data_hash = \"43be6078cb782f468e1feb21e42f23f33e2c3bb1b766d4038490c071e1c9db15\"\n", 198 | " data_filename = pooch.retrieve(data_url, known_hash=data_hash)\n", 199 | "else:\n", 200 | " raise ValueError(\"Must set survey_type to 'dipole-dipole' or 'pole-dipole'\")" 201 | ] 202 | }, 203 | { 204 | "cell_type": "markdown", 205 | "metadata": {}, 206 | "source": [ 207 | "### Load Topography" 208 | ] 209 | }, 210 | { 211 | "cell_type": "code", 212 | "execution_count": null, 213 | "metadata": {}, 214 | "outputs": [], 215 | "source": [ 216 | "topo_2d = np.loadtxt(str(topo_filename))\n", 217 | "print(topo_2d)" 218 | ] 219 | }, 220 | { 221 | "cell_type": "markdown", 222 | "metadata": {}, 223 | "source": [ 224 | "### Load the Observed Data" 225 | ] 226 | }, 227 | { 228 | "cell_type": "code", 229 | "execution_count": null, 230 | "metadata": {}, 231 | "outputs": [], 232 | "source": [ 233 | "dc_data = read_dcip2d_ubc(data_filename, \"volt\", \"general\")" 234 | ] 235 | }, 236 | { 237 | "cell_type": "code", 238 | "execution_count": null, 239 | "metadata": {}, 240 | "outputs": [], 241 | "source": [] 242 | }, 243 | { 244 | "cell_type": "markdown", 245 | "metadata": {}, 246 | "source": [ 247 | "### Plot the Topography and Electrode Locations" 248 | ] 249 | }, 250 | { 251 | "cell_type": "code", 252 | "execution_count": null, 253 | "metadata": {}, 254 | "outputs": [], 255 | "source": [ 256 | "unique_locations = dc_data.survey.unique_electrode_locations\n", 257 | "\n", 258 | "fig = plt.figure(figsize=(10, 2))\n", 259 | "ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])\n", 260 | "ax.plot(topo_2d[:, 0], topo_2d[:, -1], color=\"b\", linewidth=1)\n", 261 | "ax.plot(unique_locations[:, 0], unique_locations[:, -1], \"ro\", markersize=4)\n", 262 | "ax.set_xlim([topo_2d[:, 0].min(), topo_2d[:, 0].max()])\n", 263 | "ax.set_xlabel(\"x (m)\", labelpad=5)\n", 264 | "ax.set_ylabel(\"y (m)\", labelpad=5)\n", 265 | "ax.grid(True)\n", 266 | "ax.set_title(\"Topography and Electrode Locations\", fontsize=16, pad=10)\n", 267 | "plt.show(fig)" 268 | ] 269 | }, 270 | { 271 | "cell_type": "markdown", 272 | "metadata": {}, 273 | "source": [ 274 | "### Plot Observed Data in Pseudo-Section" 275 | ] 276 | }, 277 | { 278 | "cell_type": "code", 279 | "execution_count": null, 280 | "metadata": {}, 281 | "outputs": [], 282 | "source": [ 283 | "# Plot voltages pseudo-section\n", 284 | "fig = plt.figure(figsize=(8, 2.75))\n", 285 | "ax1 = fig.add_axes([0.1, 0.15, 0.75, 0.78])\n", 286 | "plot_pseudosection(\n", 287 | " dc_data,\n", 288 | " plot_type=\"scatter\",\n", 289 | " ax=ax1,\n", 290 | " scale=\"log\",\n", 291 | " cbar_label=\"V/A\",\n", 292 | " scatter_opts={\"cmap\": mpl.cm.viridis},\n", 293 | ")\n", 294 | "ax1.set_title(\"Normalized Voltages\")\n", 295 | "plt.show()\n", 296 | "\n", 297 | "# Get apparent conductivities from volts and survey geometry\n", 298 | "apparent_resistivities = apparent_resistivity_from_voltage(dc_data.survey, dc_data.dobs)\n", 299 | "\n", 300 | "# Plot apparent resistivity pseudo-section\n", 301 | "fig = plt.figure(figsize=(8, 2.75))\n", 302 | "ax1 = fig.add_axes([0.1, 0.15, 0.75, 0.78])\n", 303 | "plot_pseudosection(\n", 304 | " dc_data.survey,\n", 305 | " apparent_resistivities,\n", 306 | " plot_type=\"contourf\",\n", 307 | " data_locations=True,\n", 308 | " ax=ax1,\n", 309 | " scale=\"log\",\n", 310 | " cbar_label=\"$\\Omega m$\",\n", 311 | " mask_topography=True,\n", 312 | " contourf_opts={\"levels\": 20, \"cmap\": mpl.cm.RdYlBu_r},\n", 313 | ")\n", 314 | "ax1.set_title(\"Apparent Resistivity\")\n", 315 | "plt.show()" 316 | ] 317 | }, 318 | { 319 | "cell_type": "markdown", 320 | "metadata": {}, 321 | "source": [ 322 | "## Step 2: Assign Uncertainties \n", 323 | "\n", 324 | "\n", 325 | "\n", 326 | "### Exercise (beginner):\n", 327 | "\n", 328 | "Uncertainties are estimates of the standard deviations of the noise on our data. Assign uncertainties of 1e-8 V/A + 8 % to all data. We can do this by setting the *standard_deviation* property of the data object *dc_data*.\n", 329 | "\n", 330 | "### Exercise (advanced):\n", 331 | "\n", 332 | "Assign uncertainties of 1e-8 V/A + 5 % to all data." 333 | ] 334 | }, 335 | { 336 | "cell_type": "code", 337 | "execution_count": null, 338 | "metadata": {}, 339 | "outputs": [], 340 | "source": [] 341 | }, 342 | { 343 | "cell_type": "code", 344 | "execution_count": null, 345 | "metadata": {}, 346 | "outputs": [], 347 | "source": [ 348 | "inds_sort = np.argsort(np.abs(dc_data.dobs))\n", 349 | "sorted_data = np.abs(dc_data.dobs[inds_sort])\n", 350 | "sorted_std = dc_data.standard_deviation[inds_sort]\n", 351 | "\n", 352 | "fig = plt.figure(figsize=(7, 5))\n", 353 | "ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])\n", 354 | "\n", 355 | "x_plot = np.arange(0, len(sorted_data))\n", 356 | "ax.semilogy(x_plot, sorted_data, \"k.\", markersize=1)\n", 357 | "\n", 358 | "ax.set_title(\"Sorted Data and Uncertainties\")\n", 359 | "ax.fill_between(x_plot, sorted_data - sorted_std, sorted_data + sorted_std, alpha=0.5)\n", 360 | "ax.grid(alpha=0.5)\n", 361 | "ax.set_ylabel(\"Observed Data (V/A)\")" 362 | ] 363 | }, 364 | { 365 | "cell_type": "markdown", 366 | "metadata": {}, 367 | "source": [ 368 | "## Step 3: Designing a (Tree) Mesh\n", 369 | "\n", 370 | "\n", 371 | "\n", 372 | "### Exercise (beginner):\n", 373 | "\n", 374 | "Define and provide reasonable values for the following variables:\n", 375 | "\n", 376 | "* **dh** (minimum cell width)\n", 377 | "* **dom_width_x** (width of the domain along x)\n", 378 | "* **dom_width_y** (width of the domain along y)\n", 379 | "\n", 380 | "To do this, we access information from our data object. Here we:\n", 381 | "\n", 382 | "1. Obtain the unique electrode locations from the *dc_data* object\n", 383 | "2. Use this to find the minimum and maximum electrode spacing\n", 384 | "3. Use this to determine good values for *dh*, *dom_width_x* and *dom_width_y*" 385 | ] 386 | }, 387 | { 388 | "cell_type": "code", 389 | "execution_count": null, 390 | "metadata": {}, 391 | "outputs": [], 392 | "source": [] 393 | }, 394 | { 395 | "cell_type": "code", 396 | "execution_count": null, 397 | "metadata": {}, 398 | "outputs": [], 399 | "source": [] 400 | }, 401 | { 402 | "cell_type": "code", 403 | "execution_count": null, 404 | "metadata": {}, 405 | "outputs": [], 406 | "source": [] 407 | }, 408 | { 409 | "cell_type": "code", 410 | "execution_count": null, 411 | "metadata": {}, 412 | "outputs": [], 413 | "source": [] 414 | }, 415 | { 416 | "cell_type": "code", 417 | "execution_count": null, 418 | "metadata": {}, 419 | "outputs": [], 420 | "source": [] 421 | }, 422 | { 423 | "cell_type": "code", 424 | "execution_count": null, 425 | "metadata": {}, 426 | "outputs": [], 427 | "source": [ 428 | "nbcx = 2 ** int(np.round(np.log(dom_width_x / dh) / np.log(2.0))) # num. base cells x\n", 429 | "nbcy = 2 ** int(np.round(np.log(dom_width_y / dh) / np.log(2.0))) # num. base cells y\n", 430 | "\n", 431 | "# Define the base mesh with top at z = 0 m\n", 432 | "hx = [(dh, nbcx)]\n", 433 | "hy = [(dh, nbcy)]\n", 434 | "mesh = TreeMesh([hx, hy], origin=\"CN\")\n", 435 | "\n", 436 | "# Shift top to maximum topography and center of survey line\n", 437 | "y_topo_max = np.max(topo_2d[:, -1])\n", 438 | "mesh.origin = mesh.origin + np.r_[np.median(topo_2d[:, 0]), y_topo_max]" 439 | ] 440 | }, 441 | { 442 | "cell_type": "code", 443 | "execution_count": null, 444 | "metadata": {}, 445 | "outputs": [], 446 | "source": [ 447 | "# Mesh refinement based on topography\n", 448 | "mesh.refine_surface(\n", 449 | " topo_2d[np.abs(topo_2d[:, 0]) < 150.0, :],\n", 450 | " padding_cells_by_level=[0, 0, 4, 4],\n", 451 | " finalize=False,\n", 452 | ")\n", 453 | "\n", 454 | "# Extract unique electrode locations.\n", 455 | "unique_locations = dc_data.survey.unique_electrode_locations\n", 456 | "\n", 457 | "# Mesh refinement near electrodes.\n", 458 | "mesh.refine_points(\n", 459 | " unique_locations, padding_cells_by_level=[10, 8, 8, 8, 4, 4], finalize=False\n", 460 | ")" 461 | ] 462 | }, 463 | { 464 | "cell_type": "code", 465 | "execution_count": null, 466 | "metadata": {}, 467 | "outputs": [], 468 | "source": [ 469 | "# Finalize the mesh\n", 470 | "mesh.finalize()" 471 | ] 472 | }, 473 | { 474 | "cell_type": "code", 475 | "execution_count": null, 476 | "metadata": {}, 477 | "outputs": [], 478 | "source": [ 479 | "fig = plt.figure(figsize=(8, 4))\n", 480 | "\n", 481 | "ax1 = fig.add_axes([0.14, 0.17, 0.8, 0.7])\n", 482 | "mesh.plot_grid(ax=ax1, linewidth=1)\n", 483 | "ax1.grid(False)\n", 484 | "ax1.set_xlim(-200, 200)\n", 485 | "ax1.set_ylim(y_topo_max - 200, y_topo_max)\n", 486 | "ax1.set_title(\"Mesh\")\n", 487 | "ax1.set_xlabel(\"x (m)\")\n", 488 | "ax1.set_ylabel(\"y (m)\")\n", 489 | "\n", 490 | "plt.show()" 491 | ] 492 | }, 493 | { 494 | "cell_type": "markdown", 495 | "metadata": {}, 496 | "source": [ 497 | "## Step 4: Define the Active Cells\n", 498 | "\n", 499 | "Use the [active_from_xyz](https://discretize.simpeg.xyz/en/main/api/generated/discretize.utils.active_from_xyz.html) utility function to find the indices of the active cells using the mesh and surface topography. The output quantity is a ``bool`` array." 500 | ] 501 | }, 502 | { 503 | "cell_type": "code", 504 | "execution_count": null, 505 | "metadata": {}, 506 | "outputs": [], 507 | "source": [ 508 | "active_cells = active_from_xyz(mesh, topo_2d)" 509 | ] 510 | }, 511 | { 512 | "cell_type": "markdown", 513 | "metadata": {}, 514 | "source": [ 515 | "## Step 5: Project Survey to Discretized Topography\n", 516 | "\n", 517 | "\n", 518 | "\n", 519 | "Use the [drape_electrodes_on_topography](https://docs.simpeg.xyz/content/api/generated/SimPEG.electromagnetics.static.resistivity.Survey.drape_electrodes_on_topography.html#SimPEG.electromagnetics.static.resistivity.Survey.drape_electrodes_on_topography) method to project electrodes to the discrete surface topography." 520 | ] 521 | }, 522 | { 523 | "cell_type": "code", 524 | "execution_count": null, 525 | "metadata": {}, 526 | "outputs": [], 527 | "source": [ 528 | "dc_data.survey.drape_electrodes_on_topography(mesh, active_cells, option=\"top\")" 529 | ] 530 | }, 531 | { 532 | "cell_type": "markdown", 533 | "metadata": {}, 534 | "source": [ 535 | "## Step 6: Mapping from the Model to the Mesh\n", 536 | "\n", 537 | "\n", 538 | "\n", 539 | "### Exercise (beginner):\n", 540 | "\n", 541 | "1. Determine the number of active cells (i.e. the number of model parameters)\n", 542 | "2. Generate an [SimPEG.maps.ExpMap](https://docs.simpeg.xyz/content/api/generated/SimPEG.maps.ExpMap.html#SimPEG.maps.ExpMap) mapping object to map log-resistivities to resistivities.\n", 543 | "3. Generate a [SimPEG.maps.InjectActiveCells](https://docs.simpeg.xyz/content/api/generated/SimPEG.maps.InjectActiveCells.html#SimPEG.maps.InjectActiveCells) mapping object to project values on active cells to the entire mesh. Make sure to fix the value of inactive (air) cells to 1e8 $\\Omega m$.\n", 544 | "4. Use the \\* operator to combine the separate mapping objects into a single mapping. Your final mapping should be called **log_resistivity_map**." 545 | ] 546 | }, 547 | { 548 | "cell_type": "code", 549 | "execution_count": null, 550 | "metadata": {}, 551 | "outputs": [], 552 | "source": [] 553 | }, 554 | { 555 | "cell_type": "code", 556 | "execution_count": null, 557 | "metadata": {}, 558 | "outputs": [], 559 | "source": [] 560 | }, 561 | { 562 | "cell_type": "code", 563 | "execution_count": null, 564 | "metadata": {}, 565 | "outputs": [], 566 | "source": [] 567 | }, 568 | { 569 | "cell_type": "code", 570 | "execution_count": null, 571 | "metadata": {}, 572 | "outputs": [], 573 | "source": [] 574 | }, 575 | { 576 | "cell_type": "markdown", 577 | "metadata": {}, 578 | "source": [ 579 | "## Step 7: Define the Forward Simulation" 580 | ] 581 | }, 582 | { 583 | "cell_type": "code", 584 | "execution_count": null, 585 | "metadata": {}, 586 | "outputs": [], 587 | "source": [ 588 | "dc_simulation = dc.simulation_2d.Simulation2DNodal(\n", 589 | " mesh, survey=dc_data.survey, rhoMap=log_resistivity_map, storeJ=True\n", 590 | ")" 591 | ] 592 | }, 593 | { 594 | "cell_type": "markdown", 595 | "metadata": {}, 596 | "source": [ 597 | "## Step 8: Starting/Reference Models\n", 598 | "\n", 599 | "The **starting model** defines a reasonable starting point for the inversion.\n", 600 | "\n", 601 | "The **reference model** is used to include a-priori geological information in the recovered model.\n", 602 | "\n", 603 | "### Exercise (beginner):\n", 604 | "\n", 605 | "Use the median apparent resistivity value to define a homogeneous starting model on all active cells. Define this using the variable name **starting_model**. The number of elements must equal the number of model parameters, so we must first determine the number of active cells.\n", 606 | "\n", 607 | "### Exercise (advanced):\n", 608 | "\n", 609 | "Use the maximum apparent resistivity value to set the starting model. This assumes that the overall geology is more resistive." 610 | ] 611 | }, 612 | { 613 | "cell_type": "code", 614 | "execution_count": null, 615 | "metadata": {}, 616 | "outputs": [], 617 | "source": [] 618 | }, 619 | { 620 | "cell_type": "markdown", 621 | "metadata": {}, 622 | "source": [ 623 | "## Step 9: Define the Inverse Problem\n", 624 | "\n", 625 | "Geophysical inversion is frequently formulated as an optimization problem. The solution to the inverse problem is the model $\\mathbf{m}$ which minimizes an objective (penalty) function $\\phi (\\mathbf{m})$ of the form:\n", 626 | "\n", 627 | "$$\n", 628 | "\\min_{\\mathbf{m}} \\; \\phi (\\mathbf{m}) = \\phi_d (\\mathbf{m}) + \\beta \\, \\phi_m (\\mathbf{m})\\\\\n", 629 | "$$\n", 630 | "\n", 631 | "where\n", 632 | "\n", 633 | "* $\\phi_d (\\mathbf{m})$ is the data misfit. It is a measure of how well data predicted with a model $\\mathbf{m}$ fits the data.\n", 634 | "* $\\phi_m (\\mathbf{m})$ is the regularization. It is where we impose structural constraints on the recovered model.\n", 635 | "* $\\beta$ is the trade-off parameter that balances the relative emphasis of fitting the data and imposing structure." 636 | ] 637 | }, 638 | { 639 | "cell_type": "markdown", 640 | "metadata": {}, 641 | "source": [ 642 | "### Step 9a: Define the Data Misfit\n", 643 | "\n", 644 | "The data misfit $\\phi_d (\\mathbf{m})$ is a measure of how well data predicted with a given model $\\mathbf{m}$ fits the observed data. Here, the data misfit is define as the L2-norm of a weighted residual:\n", 645 | "\n", 646 | "$$\n", 647 | "\\phi_d (\\mathbf{m})\n", 648 | "= \\sum_{i=1}^{nD} \\, \\Bigg ( \\frac{d_i^{pred} - d_i^{obs}}{\\varepsilon_i} \\Bigg )^2\n", 649 | "= \\big \\| \\mathbf{W_d} \\big ( F[\\mathbf{m}] - \\mathbf{d^{obs}} \\big ) \\big \\|^2\n", 650 | "$$\n", 651 | "\n", 652 | "We define $F[\\mathbf{m}]$ as the predicted data for a given model. And $\\mathbf{W_d}$ is a diagonal matrix that weights the residual by the data uncertainties.\n", 653 | "\n", 654 | "### Exercise (beginner):\n", 655 | "\n", 656 | "Generate a [data_misfit.L2DataMisfit](https://docs.simpeg.xyz/content/api/generated/SimPEG.data_misfit.L2DataMisfit.html) object and call it **dmis**. To instantiate this objected, we must set the following keyword arguments:\n", 657 | "\n", 658 | "* **simulation=dc_simulation** (our simulation object)\n", 659 | "* **data=dc_data** (our data object)" 660 | ] 661 | }, 662 | { 663 | "cell_type": "code", 664 | "execution_count": null, 665 | "metadata": {}, 666 | "outputs": [], 667 | "source": [] 668 | }, 669 | { 670 | "cell_type": "markdown", 671 | "metadata": {}, 672 | "source": [ 673 | "### Step 9b: Regularization\n", 674 | "\n", 675 | "The regularization function $\\phi_m (\\mathbf{m})$ is where we impose structural constraints on the recovered model. Here, we use a weighted least-squares regularization:\n", 676 | "\n", 677 | "$$\n", 678 | "\\phi_m (\\mathbf{m})\n", 679 | "= \\alpha_s \\, \\big \\| \\mathbf{W_s} \\big ( \\mathbf{m - m}_{ref} \\big ) \\big \\|^2\n", 680 | "+ \\alpha_x \\, \\big \\| \\mathbf{W_x \\, G_x \\, m} \\big \\|^2\n", 681 | "+ \\alpha_y \\, \\big \\| \\mathbf{W_z \\, G_y \\, m} \\big \\|^2\n", 682 | "$$\n", 683 | "\n", 684 | "where \n", 685 | "\n", 686 | "* $\\alpha_s, \\alpha_x, \\alpha_y$ balance the relative emphasis on each term,\n", 687 | "* $\\mathbf{W}_s, \\mathbf{W}_x, \\mathbf{W}_y$ are matrices that apply cell weights,\n", 688 | "* $\\mathbf{G_x}$ and $\\mathbf{G_y}$ are partial gradient operators,\n", 689 | "* and $\\mathbf{m}_{ref}$ is a user-defined reference model\n", 690 | "\n", 691 | "### Exercise (beginner):\n", 692 | "\n", 693 | "Generate a [regularization.WeightedLeastSquares](myst:SimPEG#SimPEG.regularization.WeightedLeastSquares) object and call it **reg**. Set to invert for the smoothest model by instantiating the object with:\n", 694 | "\n", 695 | "* **mesh** (the mesh as an input argument)\n", 696 | "* **active_cells=active_cells** (regularization only acts on active cells)\n", 697 | "* **reference_model=starting_model** (set starting model as the reference model)\n", 698 | "* **alpha_s=1e-5** (set impact of the smallness term to be negligible)\n", 699 | "\n", 700 | "### Exercise (advanced):\n", 701 | "\n", 702 | "Set the regularization to enforce smoothness roughly 10x more than smallness. Do this by setting **length_scale_x** and **length_scale_y** to **10** as keyword arguments instead of setting **alpha_s**. " 703 | ] 704 | }, 705 | { 706 | "cell_type": "code", 707 | "execution_count": null, 708 | "metadata": {}, 709 | "outputs": [], 710 | "source": [] 711 | }, 712 | { 713 | "cell_type": "markdown", 714 | "metadata": {}, 715 | "source": [ 716 | "### Step 9c: Optimization\n", 717 | "\n", 718 | "\n", 719 | "\n", 720 | "For a given trade-off parameter $\\beta$, we must solve the following optimization problem:\n", 721 | "\n", 722 | "$$\n", 723 | "\\min_{\\mathbf{m}} \\; \\phi (\\mathbf{m}) = \\phi_d (\\mathbf{m}) + \\beta \\phi_m (\\mathbf{m}) \\\\\n", 724 | "$$\n", 725 | "\n", 726 | "Because our data misfit and regularization functions are parabolic, the solution $\\mathbf{m^*}$ occurs when the gradient is equal to zero, i.e.:\n", 727 | "\n", 728 | "$$\n", 729 | "\\nabla \\phi(\\mathbf{m^*}) = \\mathbf{0}\n", 730 | "$$\n", 731 | "\n", 732 | "In practice, this problem is solved iteratively using quasi-Newton methods (see figure). Where $\\mathbf{H}$ represents an approximation of the Hessian, a model update $\\delta \\mathbf{m}$ direction is obtained by solving the following linear system:\n", 733 | "\n", 734 | "$$\n", 735 | "\\mathbf{H}_k\\, \\delta \\mathbf{m}_k = - \\nabla \\! \\phi_k\n", 736 | "$$\n", 737 | "\n", 738 | "We then determine an appropriate step length $\\gamma$ and update the model as follows:\n", 739 | "\n", 740 | "$$\n", 741 | "\\mathbf{m}_{k+1} = \\mathbf{m}_k + \\gamma \\, \\delta \\mathbf{m}_k\n", 742 | "$$\n", 743 | "\n", 744 | "This process is repeated until stopping criteria for the algorithm is reached.\n", 745 | "\n", 746 | "\n", 747 | "### Exercise (beginner):\n", 748 | "\n", 749 | "Generate an [optimization.InexactGaussNewton](https://docs.simpeg.xyz/content/api/generated/SimPEG.optimization.InexactGaussNewton.html) object to solve the invert problem and call it **opt**. Set the following properties for the algorithm via keyword arguments:\n", 750 | "\n", 751 | "* **maxIter=25** (maximum number of iterations; beta and Newton)\n", 752 | "* **maxIterLS=10** (maximum number of line searches for $\\gamma$)\n", 753 | "* **maxIterCG=20** (maximum number of conjugate gradient iterations)\n", 754 | "* **tolCG=1e-3** (minimum relative error threshold)" 755 | ] 756 | }, 757 | { 758 | "cell_type": "code", 759 | "execution_count": null, 760 | "metadata": {}, 761 | "outputs": [], 762 | "source": [] 763 | }, 764 | { 765 | "cell_type": "markdown", 766 | "metadata": {}, 767 | "source": [ 768 | "### Step 9d: Inverse Problem\n", 769 | "\n", 770 | "### Exercise (beginner):\n", 771 | "\n", 772 | "Use the [inverse_problem.BaseInvProblem](https://docs.simpeg.xyz/content/api/generated/SimPEG.inverse_problem.BaseInvProblem.html) class to fully define the inverse problem that is solved at each beta (trade-off parameter) iteration. Use the variable name **inv_prob**. Instantiation requires the following as input arguments:\n", 773 | "\n", 774 | "* **dmis** (the data misfit object)\n", 775 | "* **reg** (the regularization object)\n", 776 | "* **opt** (the optimization object)" 777 | ] 778 | }, 779 | { 780 | "cell_type": "code", 781 | "execution_count": null, 782 | "metadata": {}, 783 | "outputs": [], 784 | "source": [] 785 | }, 786 | { 787 | "cell_type": "markdown", 788 | "metadata": {}, 789 | "source": [ 790 | "## Step 10: Defining Inversion Directives\n", 791 | "\n", 792 | "Directives provide specific instructions to the inversion while it is running. Here, we define SimPEG directives commonly used for least-squares DC resistivitiy inversion." 793 | ] 794 | }, 795 | { 796 | "cell_type": "markdown", 797 | "metadata": {}, 798 | "source": [ 799 | "### 10a: Beta Cooling Directives\n", 800 | "\n", 801 | "\n", 802 | "\n", 803 | "\n", 804 | "### Exercise (beginner):\n", 805 | "\n", 806 | "Define the starting beta, schedule and target misfit directives.\n", 807 | "\n", 808 | "* Generate a [directives.BetaEstimate_ByEig](myst:SimPEG#SimPEG.directives.BetaEstimate_ByEig) object and call it **starting_beta**. Set keyword argument **beta0_ratio=100**\n", 809 | "* Generate a [directives.BetaSchedule](myst:SimPEG#SimPEG.directives.BetaSchedule) and call it **beta_schedule**. Set the following keyword arguments:\n", 810 | "\n", 811 | " * **coolingFactor=2** (reduction factor for $\\beta$)\n", 812 | " * **coolingRate=2** (number of Newton iterations at each $\\beta$)\n", 813 | "\n", 814 | "* Generate a [directives.TargetMisfit](myst:SimPEG#SimPEG.directives.TargetMisfit) to set stopping criteria for the inversion and call it **target_misfit**. Set keyword argument **chifact=1** to so the inversion terminates when data misfit equals number of data.\n", 815 | "\n", 816 | "### Exercise (advanced):\n", 817 | "\n", 818 | "Set the **chifact=0.5**. This allows us to see more of the Tikhonov curve in case our uncertainties are too large." 819 | ] 820 | }, 821 | { 822 | "cell_type": "code", 823 | "execution_count": null, 824 | "metadata": {}, 825 | "outputs": [], 826 | "source": [] 827 | }, 828 | { 829 | "cell_type": "markdown", 830 | "metadata": {}, 831 | "source": [ 832 | "### Other Directives\n", 833 | "\n", 834 | "Other common directives for weighted least-squares inversion of DC resistivity data are:\n", 835 | "\n", 836 | "- [UpdateSensitivityWeights](myst:SimPEG#SimPEG.directives.UpdateSensitivityWeights): apply sensitivity weighting to counteract the natural tendancy of DC resistivity inversion to place materials near the electrodes.\n", 837 | "\n", 838 | "- [UpdatePreconditioner](myst:SimPEG#SimPEG.directives.UpdatePreconditioner): Apply Jacobi preconditioner when solving the optimization problem to reduce the number of conjugate gradient iterations.\n", 839 | "\n", 840 | "- **SaveInversionProgress:** a directive we defined earlier in the notebook to allow us to better Q.C. the inversion result." 841 | ] 842 | }, 843 | { 844 | "cell_type": "code", 845 | "execution_count": null, 846 | "metadata": {}, 847 | "outputs": [], 848 | "source": [ 849 | "sensitivity_weights = directives.UpdateSensitivityWeights(\n", 850 | " every_iteration=True, threshold_value=1e-2\n", 851 | ")\n", 852 | "update_jacobi = directives.UpdatePreconditioner(update_every_iteration=True)\n", 853 | "save_inversion = SaveInversionProgress()" 854 | ] 855 | }, 856 | { 857 | "cell_type": "markdown", 858 | "metadata": {}, 859 | "source": [ 860 | "The directive objects are organized in a ``list``. The order of the list matters so the directives have been organized for you." 861 | ] 862 | }, 863 | { 864 | "cell_type": "code", 865 | "execution_count": null, 866 | "metadata": {}, 867 | "outputs": [], 868 | "source": [ 869 | "directives_list = [\n", 870 | " sensitivity_weights,\n", 871 | " update_jacobi,\n", 872 | " starting_beta,\n", 873 | " beta_schedule,\n", 874 | " save_inversion,\n", 875 | " target_misfit,\n", 876 | "]" 877 | ] 878 | }, 879 | { 880 | "cell_type": "markdown", 881 | "metadata": {}, 882 | "source": [ 883 | "## Step 11: Define and Run the Inversion\n", 884 | "\n", 885 | "### Exercise (beginner):\n", 886 | "\n", 887 | "1. Define the inversion by instantiating an [inversion.BaseInversion](https://docs.simpeg.xyz/content/api/generated/SimPEG.inversion.BaseInversion.html) object. Call this object **inv**. This object requires the **inv_prob** and **directives_list** as input arguments.\n", 888 | "2. Use the **run** method to run the inversion. This method requires the **starting_model** as in input argument." 889 | ] 890 | }, 891 | { 892 | "cell_type": "code", 893 | "execution_count": null, 894 | "metadata": {}, 895 | "outputs": [], 896 | "source": [] 897 | }, 898 | { 899 | "cell_type": "code", 900 | "execution_count": null, 901 | "metadata": {}, 902 | "outputs": [], 903 | "source": [] 904 | }, 905 | { 906 | "cell_type": "markdown", 907 | "metadata": {}, 908 | "source": [ 909 | "## Step 12: Inversion Outputs" 910 | ] 911 | }, 912 | { 913 | "cell_type": "markdown", 914 | "metadata": {}, 915 | "source": [ 916 | "### 12a: Extract Some Inversion Outputs" 917 | ] 918 | }, 919 | { 920 | "cell_type": "code", 921 | "execution_count": null, 922 | "metadata": {}, 923 | "outputs": [], 924 | "source": [ 925 | "iteration = save_inversion.inversion_results[\"iteration\"]\n", 926 | "beta = save_inversion.inversion_results[\"beta\"]\n", 927 | "phi_d = save_inversion.inversion_results[\"phi_d\"]\n", 928 | "phi_m = save_inversion.inversion_results[\"phi_m\"]\n", 929 | "dpred = save_inversion.inversion_results[\"dpred\"]\n", 930 | "models = save_inversion.inversion_results[\"model\"]" 931 | ] 932 | }, 933 | { 934 | "cell_type": "markdown", 935 | "metadata": {}, 936 | "source": [ 937 | "### 12b: Plot Tikhonov Curve" 938 | ] 939 | }, 940 | { 941 | "cell_type": "code", 942 | "execution_count": null, 943 | "metadata": {}, 944 | "outputs": [], 945 | "source": [ 946 | "fig = plt.figure(figsize=(15, 6))\n", 947 | "ax1a = fig.add_axes([0.05, 0.05, 0.35, 0.9])\n", 948 | "ax1b = ax1a.twinx()\n", 949 | "ax2a = fig.add_axes([0.55, 0.05, 0.35, 0.9])\n", 950 | "ax2b = ax2a.twinx()\n", 951 | "\n", 952 | "ax1a.plot(iteration, phi_d, \"b-o\")\n", 953 | "ax1a.plot(\n", 954 | " iteration,\n", 955 | " target_misfit.chifact * dc_data.survey.nD * np.ones_like(iteration),\n", 956 | " \"k--\",\n", 957 | ")\n", 958 | "ax1b.plot(iteration, phi_m, \"r-o\")\n", 959 | "\n", 960 | "ax1a.set_xlabel(\"Iteration\", fontsize=20)\n", 961 | "ax1a.set_ylabel(\"Data Misfit ($\\phi_d$)\", color=\"b\", fontsize=18)\n", 962 | "ax1a.tick_params(axis=\"y\", colors=\"b\")\n", 963 | "ax1a.set_title(\"Tikhonov Curve\", fontsize=20)\n", 964 | "ax1a.set_xlim([np.min(iteration), np.max(iteration)])\n", 965 | "ax1b.tick_params(axis=\"y\", colors=\"r\")\n", 966 | "ax1b.set_ylabel(\"Regularization ($\\phi_m$)\", color=\"r\", fontsize=18)\n", 967 | "\n", 968 | "ax2a.semilogy(iteration, phi_d, \"b-o\")\n", 969 | "ax2a.semilogy(\n", 970 | " iteration,\n", 971 | " target_misfit.chifact * dc_data.survey.nD * np.ones_like(iteration),\n", 972 | " \"k--\",\n", 973 | ")\n", 974 | "ax2b.semilogy(iteration, phi_m, \"r-o\")\n", 975 | "ax2a.set_xlabel(\"Iteration\", fontsize=20)\n", 976 | "ax2a.set_ylabel(\"Data Misfit ($\\phi_d$)\", color=\"b\", fontsize=18)\n", 977 | "ax2a.tick_params(axis=\"y\", which=\"both\", colors=\"b\")\n", 978 | "ax2a.set_title(\"Tikhonov Curve\", fontsize=20)\n", 979 | "ax2a.set_xlim([np.min(iteration), np.max(iteration)])\n", 980 | "ax2b.tick_params(axis=\"y\", which=\"both\", colors=\"r\")\n", 981 | "ax2b.set_ylabel(\"Regularization ($\\phi_m$)\", color=\"r\", fontsize=18)\n", 982 | "\n", 983 | "plt.show()" 984 | ] 985 | }, 986 | { 987 | "cell_type": "markdown", 988 | "metadata": {}, 989 | "source": [ 990 | "### 12c: Choose an Iteration to Further Examine" 991 | ] 992 | }, 993 | { 994 | "cell_type": "code", 995 | "execution_count": null, 996 | "metadata": {}, 997 | "outputs": [], 998 | "source": [ 999 | "model_iteration = -1" 1000 | ] 1001 | }, 1002 | { 1003 | "cell_type": "markdown", 1004 | "metadata": {}, 1005 | "source": [ 1006 | "### 12d: Plot Observed Data, Predicted Data and Normalized Misfit" 1007 | ] 1008 | }, 1009 | { 1010 | "cell_type": "code", 1011 | "execution_count": null, 1012 | "metadata": {}, 1013 | "outputs": [], 1014 | "source": [ 1015 | "dobs = dc_data.dobs\n", 1016 | "std = dc_data.standard_deviation\n", 1017 | "\n", 1018 | "fig = plt.figure(figsize=(7, 9))\n", 1019 | "data_array = [\n", 1020 | " np.abs(dobs),\n", 1021 | " np.abs(dpred[model_iteration]),\n", 1022 | " (dobs - dpred[model_iteration]) / std,\n", 1023 | "]\n", 1024 | "plot_title = [\"Observed Data\", \"Predicted Data\", \"Normalized Misfit\"]\n", 1025 | "plot_units = [\"V/A\", \"V/A\", \"\"]\n", 1026 | "scale = [\"log\", \"log\", \"linear\"]\n", 1027 | "cmap_list = [mpl.cm.viridis, mpl.cm.viridis, mpl.cm.RdYlBu]\n", 1028 | "\n", 1029 | "ax1 = 3 * [None]\n", 1030 | "cax1 = 3 * [None]\n", 1031 | "cbar = 3 * [None]\n", 1032 | "cplot = 3 * [None]\n", 1033 | "\n", 1034 | "for ii in range(0, 3):\n", 1035 | " ax1[ii] = fig.add_axes([0.15, 0.72 - 0.33 * ii, 0.65, 0.21])\n", 1036 | " cax1[ii] = fig.add_axes([0.81, 0.72 - 0.33 * ii, 0.03, 0.21])\n", 1037 | " cplot[ii] = plot_pseudosection(\n", 1038 | " dc_data.survey,\n", 1039 | " data_array[ii],\n", 1040 | " \"contourf\",\n", 1041 | " data_locations=True,\n", 1042 | " ax=ax1[ii],\n", 1043 | " cax=cax1[ii],\n", 1044 | " scale=scale[ii],\n", 1045 | " cbar_label=plot_units[ii],\n", 1046 | " mask_topography=True,\n", 1047 | " contourf_opts={\"levels\": 25, \"cmap\": cmap_list[ii]},\n", 1048 | " )\n", 1049 | " ax1[ii].set_title(plot_title[ii])\n", 1050 | "\n", 1051 | "plt.show()" 1052 | ] 1053 | }, 1054 | { 1055 | "cell_type": "markdown", 1056 | "metadata": {}, 1057 | "source": [ 1058 | "### 12e: Plot Observed and Predicted Apparent Resistivities" 1059 | ] 1060 | }, 1061 | { 1062 | "cell_type": "code", 1063 | "execution_count": null, 1064 | "metadata": {}, 1065 | "outputs": [], 1066 | "source": [ 1067 | "# Plot apparent conductivity pseudo-section\n", 1068 | "fig = plt.figure(figsize=(8, 2.75))\n", 1069 | "ax1 = fig.add_axes([0.1, 0.15, 0.75, 0.78])\n", 1070 | "plot_pseudosection(\n", 1071 | " dc_data.survey,\n", 1072 | " dobs=apparent_resistivities,\n", 1073 | " plot_type=\"contourf\",\n", 1074 | " data_locations=True,\n", 1075 | " ax=ax1,\n", 1076 | " scale=\"log\",\n", 1077 | " cbar_label=\"$\\Omega m$\",\n", 1078 | " mask_topography=True,\n", 1079 | " contourf_opts={\"levels\": 40, \"cmap\": mpl.cm.RdYlBu_r},\n", 1080 | ")\n", 1081 | "ax1.set_title(\"Apparent Resistivity (Observed)\")\n", 1082 | "plt.show()\n", 1083 | "\n", 1084 | "# Plot apparent conductivity pseudo-section\n", 1085 | "apparent_resistivities_dpred = apparent_resistivity_from_voltage(\n", 1086 | " dc_data.survey, dpred[model_iteration]\n", 1087 | ")\n", 1088 | "\n", 1089 | "fig = plt.figure(figsize=(8, 2.75))\n", 1090 | "ax1 = fig.add_axes([0.1, 0.15, 0.75, 0.78])\n", 1091 | "plot_pseudosection(\n", 1092 | " dc_data.survey,\n", 1093 | " dobs=apparent_resistivities_dpred,\n", 1094 | " plot_type=\"contourf\",\n", 1095 | " data_locations=True,\n", 1096 | " ax=ax1,\n", 1097 | " scale=\"log\",\n", 1098 | " cbar_label=\"$\\Omega m$\",\n", 1099 | " mask_topography=True,\n", 1100 | " contourf_opts={\"levels\": 40, \"cmap\": mpl.cm.RdYlBu_r},\n", 1101 | ")\n", 1102 | "ax1.set_title(\"Apparent Resistivity (Predicted)\")\n", 1103 | "plt.show()" 1104 | ] 1105 | }, 1106 | { 1107 | "cell_type": "markdown", 1108 | "metadata": {}, 1109 | "source": [ 1110 | "### 12f: Plot Recovered Model" 1111 | ] 1112 | }, 1113 | { 1114 | "cell_type": "code", 1115 | "execution_count": null, 1116 | "metadata": {}, 1117 | "outputs": [], 1118 | "source": [ 1119 | "if survey_type == \"dipole-dipole\":\n", 1120 | " air_resistivity = 1e8\n", 1121 | " background_resistivity = 1e2\n", 1122 | " block_resistivity = 1e3\n", 1123 | " basement_resistivity = 1e1\n", 1124 | "\n", 1125 | " true_resistivity = background_resistivity * np.ones(mesh.n_cells)\n", 1126 | "\n", 1127 | " ind_basement = mesh.cell_centers[:, -1] < -16.0\n", 1128 | " true_resistivity[ind_basement] = basement_resistivity\n", 1129 | "\n", 1130 | " ind_block = model_builder.get_indices_block(\n", 1131 | " np.r_[5.0, -10.0], np.r_[15.0, 0.0], mesh.cell_centers\n", 1132 | " )\n", 1133 | " true_resistivity[ind_block] = block_resistivity\n", 1134 | "\n", 1135 | " true_resistivity = true_resistivity[active_cells]\n", 1136 | "\n", 1137 | "elif survey_type == \"pole-dipole\":\n", 1138 | " air_resistivity = 1e8\n", 1139 | " background_resistivity = 2e2\n", 1140 | " aquifer_resistivity = 2e1\n", 1141 | " basement_resistivity = 1e3\n", 1142 | "\n", 1143 | " true_resistivity = background_resistivity * np.ones(mesh.n_cells)\n", 1144 | "\n", 1145 | " ind_aquifer = mesh.cell_centers[:, -1] < -12\n", 1146 | " true_resistivity[ind_aquifer] = aquifer_resistivity\n", 1147 | "\n", 1148 | " y_temp = 10.0 * np.tanh((mesh.cell_centers[:, 0] - 20) / 16) - 16\n", 1149 | " ind_basement = mesh.cell_centers[:, -1] < y_temp\n", 1150 | " true_resistivity[ind_basement] = 1000\n", 1151 | "\n", 1152 | " true_resistivity[mesh.cell_centers[:, -1] < -22] = basement_resistivity\n", 1153 | "\n", 1154 | " true_resistivity = true_resistivity[active_cells]" 1155 | ] 1156 | }, 1157 | { 1158 | "cell_type": "code", 1159 | "execution_count": null, 1160 | "metadata": {}, 1161 | "outputs": [], 1162 | "source": [ 1163 | "# Spatial plotting limits\n", 1164 | "x_lim = [-60, 60]\n", 1165 | "y_lim = [y_topo_max - 50, y_topo_max]\n", 1166 | "\n", 1167 | "# Define a mapping to plot models and ignore inactive cells\n", 1168 | "plotting_map = maps.InjectActiveCells(mesh, active_cells, np.nan)\n", 1169 | "plotting_model = [true_resistivity, np.exp(models[model_iteration])]\n", 1170 | "norm = LogNorm(vmin=1e1, vmax=1e3)\n", 1171 | "\n", 1172 | "fig = plt.figure(figsize=(10, 8))\n", 1173 | "ax1 = 2 * [None]\n", 1174 | "ax2 = 2 * [None]\n", 1175 | "title_str = [\n", 1176 | " \"True Resistivity\",\n", 1177 | " \"Recovered Resistivity\",\n", 1178 | "]\n", 1179 | "\n", 1180 | "for ii in range(0, 2):\n", 1181 | " ax1[ii] = fig.add_axes([0.14, 0.55 - 0.5 * ii, 0.68, 0.35])\n", 1182 | " mesh.plot_image(\n", 1183 | " plotting_map * plotting_model[ii],\n", 1184 | " ax=ax1[ii],\n", 1185 | " grid=False,\n", 1186 | " pcolor_opts={\"norm\": norm, \"cmap\": mpl.cm.RdYlBu_r},\n", 1187 | " )\n", 1188 | "\n", 1189 | " ax1[ii].set_xlim(x_lim)\n", 1190 | " ax1[ii].set_ylim(y_lim)\n", 1191 | " ax1[ii].set_title(title_str[ii])\n", 1192 | " ax1[ii].set_xlabel(\"x (m)\")\n", 1193 | " ax1[ii].set_ylabel(\"y (m)\")\n", 1194 | "\n", 1195 | " ax2[ii] = fig.add_axes([0.84, 0.55 - 0.5 * ii, 0.03, 0.35])\n", 1196 | " cbar = mpl.colorbar.ColorbarBase(\n", 1197 | " ax2[ii], norm=norm, orientation=\"vertical\", cmap=mpl.cm.RdYlBu_r\n", 1198 | " )\n", 1199 | " cbar.set_label(r\"$\\rho (\\Omega m)$\", rotation=270, labelpad=15, size=12)\n", 1200 | "\n", 1201 | "pseudo_locations_xy = pseudo_locations(dc_data.survey)\n", 1202 | "ax1[1].scatter(pseudo_locations_xy[:, 0], pseudo_locations_xy[:, -1], 1.5, \"k\")\n", 1203 | "\n", 1204 | "plt.show()" 1205 | ] 1206 | }, 1207 | { 1208 | "cell_type": "markdown", 1209 | "metadata": {}, 1210 | "source": [ 1211 | "**Save notebook to drive so we can reuse tomorrow!**" 1212 | ] 1213 | } 1214 | ], 1215 | "metadata": { 1216 | "kernelspec": { 1217 | "display_name": "Python 3 (ipykernel)", 1218 | "language": "python", 1219 | "name": "python3" 1220 | }, 1221 | "language_info": { 1222 | "codemirror_mode": { 1223 | "name": "ipython", 1224 | "version": 3 1225 | }, 1226 | "file_extension": ".py", 1227 | "mimetype": "text/x-python", 1228 | "name": "python", 1229 | "nbconvert_exporter": "python", 1230 | "pygments_lexer": "ipython3", 1231 | "version": "3.10.13" 1232 | } 1233 | }, 1234 | "nbformat": 4, 1235 | "nbformat_minor": 4 1236 | } 1237 | --------------------------------------------------------------------------------