{ "cells": [ { "cell_type": "markdown", "metadata": { "extensions": { "jupyter_dashboards": { "version": 1, "views": { "grid_default": { "col": 0, "height": 10, "hidden": false, "row": 0, "width": 12 }, "report_default": { "hidden": false } } } } }, "source": [ "This is the Jupyter Notebook, an interactive coding and computation environment. For this lab, you do not have to write any code, you will only be running it. \n", "\n", "To use the notebook:\n", "- \"Shift + Enter\" runs the code within the cell (so does the forward arrow button near the top of the document)\n", "- You can alter variables and re-run cells\n", "- 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) \n", "\n", "This notebook uses code adapted from \n", "\n", "SimPEG\n", "- Cockett, R., S. Kang, L.J. Heagy, A. Pidlisecky, D.W. Oldenburg (2015, in review), SimPEG: An open source framework for simulation and gradient based parameter estimation in geophysical applications. Computers and Geosciences\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true, "extensions": { "jupyter_dashboards": { "version": 1, "views": { "grid_default": { "col": 0, "height": 11, "hidden": false, "row": 10, "width": 6 }, "report_default": {} } } } }, "source": [ "## View the model\n", "\n", "- dx: width or prism in x-direction (m)\n", "- dy: width of prism in y-direction (m)\n", "- dz: vertical extent of prism (m)\n", "- depth: depth to the top of the prism (m)\n", "- pinc: inclination of the prism (reference is a unit northing vector; degrees)\n", "- pdec: declination of the prism (reference is a unit northing vector; degrees)\n", "- View_elev: elevation of view (degrees)\n", "- View_azim: azimuth of view (degrees)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true, "extensions": { "jupyter_dashboards": { "version": 1, "views": { "grid_default": { "col": 0, "height": 29, "hidden": false, "row": 21, "width": 6 }, "report_default": { "hidden": false } } } } }, "outputs": [], "source": [ "from gpgLabs.Mag import *\n", "from SimPEG import PF, Utils, Mesh\n", "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#Input parameters\n", "fileName = 'http://github.com/geoscixyz/gpgLabs/raw/master/assets/Mag/data/Lab1_Wednesday_TA.csv'\n", "data = np.genfromtxt(fileName, skip_header=1, delimiter=',')\n", "xyzd = np.c_[data[:,0], np.zeros((data.shape[0],2)), data[:,1]]\n", "B = np.r_[60308, 83.8, 25.4]\n", "survey = Mag.createMagSurvey(xyzd, B)\n", "# View the data and chose a profile\n", "# Define the parametric model interactively\n", "model = Simulator.ViewPrism(survey)\n", "display(model)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Fit the data\n", "\n", "- data: data set to load\n", " - MonSt: Monday Student data\n", " - WedTA: Wednesday TA data\n", " - WedSt: Wednesday Student data\n", "- B0: background field (nT) to be subtracted from the data to define the anomaly\n", "- x0: center of the rebar (along-line) \n", "- depth: depth to the top of the rebar (m)\n", "- susc: magnetic susceptibility\n", "- Q: Koenigsberger ratio ($\\frac{M_{rem}}{M_{ind}}$)\n", "- rinc: inclination of the remanent magnetization (degree)\n", "- rdec: declination of the remanent magnetization (degree)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "extensions": { "jupyter_dashboards": { "version": 1, "views": { "grid_default": { "col": 6, "height": 29, "hidden": false, "row": 21, "width": 6 }, "report_default": { "hidden": false } } } }, "scrolled": false }, "outputs": [], "source": [ "Q = Simulator.fitline(model,survey)\n", "display(Q)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true, "extensions": { "jupyter_dashboards": { "version": 1, "views": { "grid_default": { "hidden": true }, "report_default": {} } } } }, "outputs": [], "source": [] } ], "metadata": { "anaconda-cloud": {}, "extensions": { "jupyter_dashboards": { "activeView": "grid_default", "version": 1, "views": { "grid_default": { "cellMargin": 10, "defaultCellHeight": 20, "maxColumns": 12, "name": "grid", "type": "grid" }, "report_default": { "name": "report", "type": "report" } } } }, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.0" }, "widgets": { "state": { "8789ea09a28443d0b196412593e51195": { "views": [ { "cell_index": 3 } ] }, "8bd53575b8d6470cb6158b113159182e": { "views": [ { "cell_index": 5 } ] } }, "version": "1.2.0" } }, "nbformat": 4, "nbformat_minor": 1 }