diff --git a/SimPEG/Examples/MT_1D_ForwardAndInversion.py b/SimPEG/Examples/MT_1D_ForwardAndInversion.py index 69cedd98..2c3d9b46 100644 --- a/SimPEG/Examples/MT_1D_ForwardAndInversion.py +++ b/SimPEG/Examples/MT_1D_ForwardAndInversion.py @@ -7,7 +7,7 @@ import matplotlib.pyplot as plt def run(plotIt=True): """ MT: 1D: Inversion - ======================= + ================= Forward model 1D MT data. Setup and run a MT 1D inversion. diff --git a/SimPEG/Examples/MT_3D_Foward.py b/SimPEG/Examples/MT_3D_Foward.py index da16eeee..0a56e250 100644 --- a/SimPEG/Examples/MT_3D_Foward.py +++ b/SimPEG/Examples/MT_3D_Foward.py @@ -5,14 +5,14 @@ import SimPEG as simpeg from SimPEG import MT import numpy as np try: - from pymatsolver import MumpsSolver as Solver + from pymatsolver import MumpsSolver as solver except: - from SimPEG import Solver + from SimPEG import solver def run(plotIt=True, nFreq=1): """ MT: 3D: Forward - ======================= + =============== Forward model 3D MT data. @@ -47,15 +47,14 @@ def run(plotIt=True, nFreq=1): ## Setup the problem object problem = MT.Problem3D.eForm_ps(M, sigmaPrimary=sigBG) - problem.pair(survey) - problem.Solver = Solver + problem.pair(survey, Solver=solver) # Calculate the data fields = problem.fields(sig) dataVec = survey.eval(fields) # Make the data - mtData = MT.Data(survey,dataVec) + mtData = MT.Data(survey, dataVec) # Add plots if plotIt: pass diff --git a/SimPEG/Examples/Utils_surface2ind_topo.py b/SimPEG/Examples/Utils_surface2ind_topo.py index 4ed1cdaf..e4f748cb 100644 --- a/SimPEG/Examples/Utils_surface2ind_topo.py +++ b/SimPEG/Examples/Utils_surface2ind_topo.py @@ -2,8 +2,12 @@ from SimPEG import * from SimPEG.Utils import surface2ind_topo -def run(plotIt=False, nx = 5, ny = 5): +def run(plotIt=False, nx=5, ny=5): """ + + Utils: surface2ind_topo + ======================= + Here we show how to use :code:`Utils.surface2ind_topo` to identify cells below a topographic surface. @@ -13,27 +17,25 @@ def run(plotIt=False, nx = 5, ny = 5): xtopo = np.linspace(mesh.gridN[:,0].min(), mesh.gridN[:,0].max()) topo = 0.4*np.sin(xtopo*5) # define a topographic surface - Topo = np.hstack([Utils.mkvc(xtopo,2),Utils.mkvc(topo,2)]) #make it an array + Topo = np.hstack([Utils.mkvc(xtopo,2), Utils.mkvc(topo,2)]) #make it an array - indcc = surface2ind_topo(mesh, Topo,'CC') + indcc = surface2ind_topo(mesh, Topo, 'CC') if plotIt: from matplotlib.pylab import plt from scipy.interpolate import interp1d - fig, ax = plt.subplots(1,1,figsize=(6,6)) + fig, ax = plt.subplots(1,1, figsize=(6,6)) mesh.plotGrid(ax=ax, nodes=True, centers=True) ax.plot(xtopo,topo,'k',linewidth=1) - # ax.plot(mesh.vectorNx, interp1d(xtopo,topo)(mesh.vectorNx),'--k',linewidth=3) ax.plot(mesh.vectorCCx, interp1d(xtopo,topo)(mesh.vectorCCx),'--k',linewidth=3) - aveN2CC = Utils.sdiag(mesh.aveN2CC.T.sum(1))*mesh.aveN2CC.T a = aveN2CC * indcc a[a > 0] = 1. a[a < 0.25] = np.nan a = a.reshape(mesh.vnN, order='F') masked_array = np.ma.array(a, mask=np.isnan(a)) - ax.pcolor(mesh.vectorNx,mesh.vectorNy,masked_array.T, cmap = plt.cm.gray,alpha=0.2) + ax.pcolor(mesh.vectorNx,mesh.vectorNy,masked_array.T, cmap=plt.cm.gray, alpha=0.2) plt.show() diff --git a/docs/examples/DC_Forward_PseudoSection.rst b/docs/examples/DC_Forward_PseudoSection.rst index 012d1ced..4231e944 100644 --- a/docs/examples/DC_Forward_PseudoSection.rst +++ b/docs/examples/DC_Forward_PseudoSection.rst @@ -22,7 +22,6 @@ radi = Radius of spheres [r1,r2] param = Conductivity of background and two spheres [m0,m1,m2] surveyType = survey type 'pole-dipole' or 'dipole-dipole' unitType = Data type "appResistivity" | "appConductivity" | "volt" - Created by @fourndo diff --git a/docs/examples/MT_1D_ForwardAndInversion.rst b/docs/examples/MT_1D_ForwardAndInversion.rst index 9646a7eb..bc834215 100644 --- a/docs/examples/MT_1D_ForwardAndInversion.rst +++ b/docs/examples/MT_1D_ForwardAndInversion.rst @@ -10,7 +10,7 @@ MT: 1D: Inversion -======================= +================= Forward model 1D MT data. Setup and run a MT 1D inversion. diff --git a/docs/examples/MT_3D_Foward.rst b/docs/examples/MT_3D_Foward.rst index eaeead7a..142a62a4 100644 --- a/docs/examples/MT_3D_Foward.rst +++ b/docs/examples/MT_3D_Foward.rst @@ -10,7 +10,7 @@ MT: 3D: Forward -======================= +=============== Forward model 3D MT data. diff --git a/docs/examples/Utils_surface2ind_topo.rst b/docs/examples/Utils_surface2ind_topo.rst index 04b27d5d..7ff007d1 100644 --- a/docs/examples/Utils_surface2ind_topo.rst +++ b/docs/examples/Utils_surface2ind_topo.rst @@ -9,6 +9,10 @@ .. --------------------------------- .. + +Utils: surface2ind_topo +======================= + Here we show how to use :code:`Utils.surface2ind_topo` to identify cells below a topographic surface.