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:
This notebook uses code adapted from
SimPEG
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)
In [3]:
Q = Simulator.fitline(model,survey)
display(Q)
In [ ]:
In [ ]: