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.

To use the notebook:

  • "Shift + Enter" runs the code within the cell (so does the forward arrow button near the top of the document)
  • You can alter variables and re-run cells
  • 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)

This notebook uses code adapted from

SimPEG

  • 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

View the model

  • dx: width or prism in x-direction (m)
  • dy: width of prism in y-direction (m)
  • dz: vertical extent of prism (m)
  • x0: x location of the center of the prism (m)
  • y0: y location of the center of the prism (m)
  • depth: depth to the top of the prism (m)
  • prism_inc: inclination of the prism (reference is a unit northing vector; degrees)
  • prism_dec: declination of the prism (reference is a unit northing vector; degrees)
  • View_dip: dip angle of view (degrees)
  • View_elev: elevation of view (degrees)
  • View_azim: azimuth of view (degrees)

In [1]:
import numpy as np
from geoscilabs.mag import Mag, Simulator
from SimPEG import PF, Utils, Mesh
from ipywidgets import widgets
import matplotlib
%matplotlib inline

In [2]:
#Input parameters
fileName = 'http://github.com/geoscixyz/geosci-labs/raw/master/assets/mag/data/Lab1_Wednesday_TA.csv'
data = np.genfromtxt(fileName, skip_header=1, delimiter=',')
xyzd = np.c_[np.zeros(data.shape[0]), data[:,0], np.zeros(data.shape[0]), data[:,1]]
B = np.r_[60308, 83.8, 25.4]
survey = Mag.createMagSurvey(xyzd, B)
# View the data and chose a profile
# Define the parametric model interactively
model = Simulator.ViewPrism(survey)
display(model)


Fit the data

  • Binc: Inclination of the Earth's background field (degree)
  • Bdec: Declination of the Earth's background field (degree)
  • Bigrf: Strength of the Earth's background field (nT)
  • depth: vertical distance from the sensor to the top of the rebar (m)
  • susc: magnetic susceptibility
  • comp: Total field (tf) of component of the field to plot
  • irt: Type of magnetization
  • Q: Koenigsberger ratio ($\frac{M_{rem}}{M_{ind}}$)
  • rinc: inclination of the remanent magnetization (degree)
  • rdec: declination of the remanent magnetization (degree)

In [3]:
Q = Simulator.fitline(model,survey)
display(Q)



In [ ]:


In [ ]: