#!/usr/bin/env python
# coding: utf-8
# # EM Notebooks
#
#
#
# A collection of notebooks that use the electromagnetics (EM) module of [SimPEG](http://simpeg.xyz). Many of these notebooks reproduce examples from [EM GeoSci](http://em.geosci.xyz), an open source “textbook” on applied electromagnetics.
#
#
# If you build upon these notebooks in your work, please cite:
#
# - [(Cockett et al., 2015)](http://www.sciencedirect.com/science/article/pii/S009830041530056X): *SimPEG: An open source framework for simulation and gradient based parameter estimation in geophysical applications*
# - [(Heagy et al., 2016)](https://arxiv.org/abs/1610.00804): *A framework for simulation and inversion in electromagnetics*
#
# If you have feedback, we would like to hear from you!
# - Contact us
# - Report issues
# - Join the development
#
# **[EM Fundamentals](#EM-Fundamentals) | [Inverting Field Data](Inverting-Field-Data) | [MT Tutorial](#MT-Tutorial) | [Additional Notebooks](#Additional-Notebooks)**
#
# ## Contents
#
# ### EM Fundamentals
#
# These notebooks walk through using SimPEG for conducting a TDEM and FDEM soundings over a sphere. They use the cylindrically symmetric mesh for the forward modelling
# - [TDEM_vmd_sounding_over_sphere.ipynb](notebooks/TDEM_vmd_sounding_over_sphere.ipynb)
# - [FDEM_vmd_sounding_over_sphere.ipynb](notebooks/FDEM_vmd_sounding_over_sphere.ipynb)
#
#
# ### Inverting Field Data
#
# These notebooks walk through inverting a single sounding of airborne EM data collected in Australia.
# - [TDEM_inversion_bookpurnong](notebooks/TDEM_inversion_bookpurnong.ipynb)
# - [FDEM_inversion_bookpurnong](notebooks/FDEM_inversion_bookpurnong.ipynb)
#
# ### MT Tutorial
#
# These notebooks were originall published in [The Leading Edge](https://doi.org/10.1190/tle36080696.1)
#
# Seogi Kang , Lindsey J. Heagy , Rowan Cockett , and Douglas W. Oldenburg (2017). ”Exploring nonlinear inversions: A 1D magnetotelluric example.” The Leading Edge, 36(8), 696–699.
#
#
# There are 5 notebooks in this tutorial - we wrote them starting from discretizing the governing equations for the Magnetotelluric Problem, running a forward simulation and exploring an example of non-uniqueness, and performing the inversion. Although this is a natural order in terms of building the pieces, you do not need to work through them in order, each notebook is self-contained and has links to others where appropriate.
#
# - [1_MT1D_NumericalSetup](notebooks/MT_tutorial_1_MT1D_NumericalSetup.ipynb): discretize and solve the 1D MT equations
# - [2_MT1D_ForwardModellingAndNonuniqueness](notebooks/MT_tutorial_2_MT1D_ForwardModellingAndNonuniqueness.ipynb): run the forward simulation and explore an example of non-uniqueness
# - [3_MT1D_5layer_inversion](notebooks/MT_tutorial_3_MT1D_5layer_inversion.ipynb): run inversions for a 5 layer model and explore the impacts of choosing a trade-off parameter $\beta$, and changing the regularization parameters smoothness and smallness ($\alpha_s$ and $\alpha_z$).
#
# There are also 2 "appendix" notebooks
# - [Appendix_A_MT1D_Sensitivity](notebooks/MT_tutorial_Appendix_A_MT1D_Sensitivity.ipynb): derive and test the sensitivity
# - [Appendix_B_MT1D_tests](notebooks/MT_tutorial_Appendix_B_MT1D_tests.ipynb): demonstrates how we test the code
#
#
# ### Additional Notebooks
# - [DC_Mise-a-la-masse.ipynb](notebooks/DC_Mise-a-la-masse.ipynb)
# - [DC_inversion_2D_example.ipynb](notebooks/DC_inversion_2D_example.ipynb)
# - [FDEM_target_in_solenoid.ipynb](notebooks/FDEM_target_in_solenoid.ipynb)
# - [TDEM_1D_inversion.ipynb](notebooks/TDEM_1D_inversion.ipynb)
# ## Running the notebook
#
# From the menu, select `cell`, `run all`, or run each individual cell using `shift + enter`
#
# ![cell-run-all](https://em.geosci.xyz/_images/run_all_cells.png)
#
# If you want to start with a clean slate, restart the Kernel either by going to the top, clicking on Kernel: Restart, or by "esc + 00" (if you do this, you will need to re-run the following block of code before running any other cells in the notebook)
#
# For more information on running Jupyter notebooks, see the [Jupyter Documentation](https://jupyter.readthedocs.io/en/latest/)
# In[ ]: