mirror of
https://github.com/wassname/simpeg.git
synced 2026-06-29 05:18:01 +08:00
+5
-6
@@ -117,7 +117,7 @@ class LinearSurvey(Survey.BaseSurvey):
|
||||
|
||||
def eval(self, u):
|
||||
return u
|
||||
|
||||
|
||||
@property
|
||||
def nD(self):
|
||||
return self.prob.G.shape[0]
|
||||
@@ -137,9 +137,8 @@ class SrcField(Survey.BaseSrc):
|
||||
|
||||
param = None #: Inducing field param (Amp, Incl, Decl)
|
||||
|
||||
def __init__(self, rxList, param = None, **kwargs):
|
||||
self.param = param
|
||||
super(SrcField, self).__init__(rxList, **kwargs)
|
||||
def __init__(self, rxList, **kwargs):
|
||||
super(SrcField, self).__init__(rxList, **kwargs)
|
||||
|
||||
class RxObs(Survey.BaseRx):
|
||||
"""A station location must have be located in 3-D"""
|
||||
@@ -185,10 +184,10 @@ class WeightMap(Maps.IdentityMap):
|
||||
self.mesh = None
|
||||
self.weight = weight
|
||||
|
||||
def _transform(self, m):
|
||||
def _transform(self, m):
|
||||
return m*self.weight
|
||||
|
||||
def deriv(self, m):
|
||||
return Utils.sdiag(self.weight)
|
||||
return Utils.sdiag(self.weight)
|
||||
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
# beta phi_d phi_m f
|
||||
1 6.9586e+00 1.0872e+02 1.4402e+02 5.0228e+02
|
||||
2 3.7248e+01 5.7540e+01 1.1774e+02 1.9118e+03
|
||||
3 1.2016e+01 9.5474e+02 1.0149e+02 9.7090e+03
|
||||
4 5.3476e+00 6.9209e+02 2.2879e+02 4.0683e+03
|
||||
5 5.9317e+00 2.7767e+02 2.7310e+02 2.0777e+03
|
||||
6 7.2514e+00 2.5195e+02 2.3622e+02 1.8147e+03
|
||||
7 7.2514e+00 3.0151e+02 2.2988e+02 2.1309e+03
|
||||
8 6.7725e+00 3.2978e+02 2.3764e+02 2.1805e+03
|
||||
9 6.3154e+00 3.3029e+02 2.4563e+02 2.0846e+03
|
||||
10 6.3154e+00 3.1701e+02 2.4902e+02 1.9667e+03
|
||||
11 6.3154e+00 3.1714e+02 2.4502e+02 1.9534e+03
|
||||
12 6.3154e+00 3.1709e+02 2.3973e+02 1.9536e+03
|
||||
13 6.3154e+00 3.1501e+02 2.3599e+02 1.9535e+03
|
||||
14 6.0032e+00 3.2402e+02 2.4031e+02 1.9514e+03
|
||||
15 5.5624e+00 3.3241e+02 2.4990e+02 1.8795e+03
|
||||
16 5.2434e+00 3.2674e+02 2.5431e+02 1.7737e+03
|
||||
17 5.2434e+00 3.1679e+02 2.5506e+02 1.6854e+03
|
||||
18 5.2434e+00 3.1781e+02 2.5153e+02 1.6754e+03
|
||||
19 4.9831e+00 3.2409e+02 2.5041e+02 1.6765e+03
|
||||
20 4.9831e+00 3.1378e+02 2.5041e+02 1.6153e+03
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,27 +1,12 @@
|
||||
#%%
|
||||
from SimPEG import *
|
||||
import simpegPF as PF
|
||||
import pylab as plt
|
||||
|
||||
import os
|
||||
|
||||
home_dir = '.'
|
||||
|
||||
inpfile = 'PYMAG3D_inv.inp'
|
||||
|
||||
dsep = os.path.sep
|
||||
|
||||
os.chdir(home_dir)
|
||||
plt.close('all')
|
||||
#%%
|
||||
# Read input file
|
||||
[mshfile, obsfile, topofile, mstart, mref, magfile, wgtfile, chi, alphas, bounds, lpnorms] = PF.Magnetics.read_MAGinv_inp(home_dir + dsep + inpfile)
|
||||
|
||||
# Load mesh file
|
||||
mesh = Mesh.TensorMesh.readUBC(mshfile)
|
||||
|
||||
# Load in observation file
|
||||
survey = PF.Magnetics.readUBCmagObs(obsfile)
|
||||
driver = PF.MagneticsDriver.MagneticsDriver_Inv('PYMAG3D_inv.inp')
|
||||
mesh = driver.mesh
|
||||
survey = driver.survey
|
||||
|
||||
rxLoc = survey.srcField.rxList[0].locs
|
||||
d = survey.dobs
|
||||
@@ -31,65 +16,34 @@ ndata = survey.srcField.rxList[0].locs.shape[0]
|
||||
|
||||
eps_p = 1e-4
|
||||
eps_q = 1e-4
|
||||
# Load in topofile or create flat surface
|
||||
if topofile == 'null':
|
||||
|
||||
# All active
|
||||
actv = np.asarray(range(mesh.nC))
|
||||
|
||||
else:
|
||||
|
||||
topo = np.genfromtxt(topofile,skip_header=1)
|
||||
# Find the active cells
|
||||
actv = PF.Magnetics.getActiveTopo(mesh,topo,'N')
|
||||
|
||||
actv = driver.activeCells
|
||||
nC = len(actv)
|
||||
|
||||
# Create active map to go from reduce set to full
|
||||
actvMap = Maps.InjectActiveCells(mesh, actv, -100)
|
||||
|
||||
# Create reduced identity map
|
||||
idenMap = Maps.IdentityMap(nP = nC)
|
||||
idenMap = Maps.IdentityMap(nP=nC)
|
||||
|
||||
# Load starting model file
|
||||
if isinstance(mstart, float):
|
||||
|
||||
mstart = np.ones(nC) * mstart
|
||||
else:
|
||||
mstart = Utils.meshutils.readUBCTensorModel(mstart,mesh)
|
||||
mstart = mstart[actv]
|
||||
|
||||
# Load reference file
|
||||
if isinstance(mref, float):
|
||||
mref = np.ones(nC) * mref
|
||||
else:
|
||||
mref = Utils.meshutils.readUBCTensorModel(mref,mesh)
|
||||
mref = mref[actv]
|
||||
|
||||
# Get magnetization vector for MOF
|
||||
if magfile=='DEFAULT':
|
||||
|
||||
M_xyz = PF.Magnetics.dipazm_2_xyz(np.ones(nC) * survey.srcField.param[1], np.ones(nC) * survey.srcField.param[2])
|
||||
|
||||
else:
|
||||
M_xyz = np.genfromtxt(magfile,delimiter=' \n',dtype=np.str,comments='!')
|
||||
M_xyz = driver.magnetizationModel
|
||||
|
||||
# Get index of the center
|
||||
midx = int(mesh.nCx/2)
|
||||
midy = int(mesh.nCy/2)
|
||||
|
||||
#%% Plot obs data
|
||||
PF.Magnetics.plot_obs_2D(rxLoc,d,'Observed Data')
|
||||
PF.Magnetics.plot_obs_2D(rxLoc,d, 'Observed Data')
|
||||
|
||||
#%% Run inversion
|
||||
prob = PF.Magnetics.MagneticIntegral(mesh, mapping = idenMap, actInd = actv)
|
||||
prob = PF.Magnetics.Problem3D_Integral(mesh, mapping=idenMap, actInd=actv)
|
||||
prob.solverOpts['accuracyTol'] = 1e-4
|
||||
|
||||
survey.pair(prob)
|
||||
|
||||
# Write out the predicted
|
||||
pred = prob.fields(mstart)
|
||||
PF.Magnetics.writeUBCobs(home_dir + dsep + 'Pred.dat',survey,pred)
|
||||
pred = prob.fields(driver.m0)
|
||||
PF.Magnetics.writeUBCobs('Pred.dat', survey, pred)
|
||||
|
||||
wr = np.sum(prob.G**2.,axis=0)**0.5 / mesh.vol[actv]
|
||||
wr = ( wr/np.max(wr) )
|
||||
@@ -97,22 +51,21 @@ wr_out = actvMap * wr
|
||||
|
||||
plt.figure()
|
||||
ax = plt.subplot()
|
||||
mesh.plotSlice(wr_out, ax = ax, normal = 'Y', ind=midx ,clim = (-1e-3, wr.max()))
|
||||
mesh.plotSlice(wr_out, ax=ax, normal='Y', ind=midx ,clim=(-1e-3, wr.max()))
|
||||
plt.title('Distance weighting')
|
||||
plt.xlabel('x');plt.ylabel('z')
|
||||
plt.gca().set_aspect('equal', adjustable='box')
|
||||
|
||||
reg = Regularization.Simple(mesh, indActive = actv, mapping = idenMap)
|
||||
reg.mref = mref
|
||||
reg = Regularization.Simple(mesh, indActive=actv, mapping=idenMap)
|
||||
reg.mref = driver.mref
|
||||
reg.wght = wr
|
||||
|
||||
dmis = DataMisfit.l2_DataMisfit(survey)
|
||||
dmis.Wd = 1/wd
|
||||
opt = Optimization.ProjectedGNCG(maxIter=10,lower=0.,upper=1., maxIterCG= 20, tolCG = 1e-3)
|
||||
opt = Optimization.ProjectedGNCG(maxIter=10,lower=0.,upper=1., maxIterCG= 20, tolCG=1e-3)
|
||||
|
||||
invProb = InvProblem.BaseInvProblem(dmis, reg, opt)
|
||||
|
||||
# Add directives to the inversion
|
||||
beta = Directives.BetaSchedule(coolingFactor=2, coolingRate=1)
|
||||
beta_init = Directives.BetaEstimate_ByEig()
|
||||
target = Directives.TargetMisfit()
|
||||
@@ -120,10 +73,8 @@ update_Jacobi = Directives.Update_lin_PreCond(onlyOnStart=True)
|
||||
|
||||
inv = Inversion.BaseInversion(invProb, directiveList=[beta,target,beta_init,update_Jacobi])
|
||||
|
||||
m0 = mstart
|
||||
|
||||
# Run inversion
|
||||
mrec = inv.run(m0)
|
||||
mrec = inv.run(driver.m0)
|
||||
|
||||
m_out = actvMap*mrec
|
||||
|
||||
@@ -135,7 +86,7 @@ pred = prob.fields(mrec)
|
||||
#PF.Magnetics.plot_obs_2D(rxLoc,pred,wd,'Predicted Data')
|
||||
#PF.Magnetics.plot_obs_2D(rxLoc,(d-pred),wd,'Residual Data')
|
||||
|
||||
print "Final misfit:" + str(np.sum( ((d-pred)/wd)**2. ) )
|
||||
print "Final misfit:" + str(np.sum( ((d-pred)/wd)**2. ) )
|
||||
|
||||
#%% Plot out a section of the model
|
||||
|
||||
@@ -171,11 +122,11 @@ phid = invProb.phi_d
|
||||
# Set parameters for sparsity
|
||||
reg = Regularization.Sparse(mesh, indActive = actv, mapping = idenMap)
|
||||
reg.recModel = mrec
|
||||
reg.mref = mref
|
||||
reg.mref = driver.mref
|
||||
reg.wght = wr
|
||||
reg.eps_p = eps_p
|
||||
reg.eps_q = eps_q
|
||||
reg.norms = lpnorms
|
||||
reg.norms = driver.lpnorms
|
||||
|
||||
|
||||
dmis = DataMisfit.l2_DataMisfit(survey)
|
||||
@@ -210,7 +161,7 @@ pred = prob.fields(mrec)
|
||||
#%% Plot obs data
|
||||
PF.Magnetics.plot_obs_2D(rxLoc,pred,'Predicted Data')
|
||||
PF.Magnetics.plot_obs_2D(rxLoc,d,'Observed Data')
|
||||
print "Final misfit:" + str(np.sum( ((d-pred)/wd)**2. ) )
|
||||
print "Final misfit:" + str(np.sum( ((d-pred)/wd)**2. ) )
|
||||
#%% Plot out a section of the model
|
||||
|
||||
yslice = midx
|
||||
@@ -236,4 +187,7 @@ ax = plt.subplot(212)
|
||||
mesh.plotSlice(m_out, ax = ax, normal = 'Y', ind=yslice, clim = (mrec.min(), mrec.max()))
|
||||
plt.title('Cross Section')
|
||||
plt.xlabel('x');plt.ylabel('z')
|
||||
plt.gca().set_aspect('equal', adjustable='box')
|
||||
plt.gca().set_aspect('equal', adjustable='box')
|
||||
|
||||
|
||||
plt.show()
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
# beta phi_d phi_m f
|
||||
1 1.5360e+05 5.0131e+01 7.3332e-03 4.4174e+02
|
||||
2 3.7391e+05 1.2652e+02 3.6764e-03 1.0807e+03
|
||||
3 2.5341e+05 4.5447e+02 2.4502e-03 2.6354e+03
|
||||
4 1.4461e+05 5.3971e+02 4.6665e-03 2.1548e+03
|
||||
5 1.0937e+05 4.0726e+02 6.5473e-03 1.5100e+03
|
||||
6 1.1622e+05 2.8985e+02 9.3653e-03 1.6067e+03
|
||||
7 1.1622e+05 3.1487e+02 9.3157e-03 1.5644e+03
|
||||
8 1.0482e+05 3.4151e+02 9.7362e-03 1.5894e+03
|
||||
9 9.6785e+04 3.3356e+02 9.5567e-03 1.4910e+03
|
||||
10 7.6095e+04 3.9174e+02 8.8846e-03 1.6031e+03
|
||||
11 5.3847e+04 4.3526e+02 1.2266e-02 1.3899e+03
|
||||
12 4.4794e+04 3.7025e+02 1.3672e-02 1.1416e+03
|
||||
13 4.1906e+04 3.2923e+02 1.6171e-02 1.0732e+03
|
||||
14 4.1906e+04 3.0335e+02 1.8262e-02 1.0765e+03
|
||||
15 4.1906e+04 2.9834e+02 1.7878e-02 1.0506e+03
|
||||
16 4.1906e+04 3.0216e+02 1.8782e-02 1.0953e+03
|
||||
17 4.1906e+04 3.0924e+02 1.8673e-02 1.0995e+03
|
||||
18 4.1906e+04 3.1922e+02 1.8988e-02 1.1262e+03
|
||||
19 3.9225e+04 3.2905e+02 1.9461e-02 1.1463e+03
|
||||
20 3.5542e+04 3.3992e+02 2.0384e-02 1.1604e+03
|
||||
@@ -1,21 +0,0 @@
|
||||
# beta phi_d phi_m f
|
||||
1 1.7245e+05 2.5079e+01 1.0262e-02 2.8242e+02
|
||||
2 2.1325e+05 2.4907e+02 4.4331e-03 1.9149e+03
|
||||
3 1.2096e+05 5.4303e+02 5.0490e-03 2.5860e+03
|
||||
4 8.4281e+04 4.4203e+02 8.1744e-03 1.8685e+03
|
||||
5 1.0110e+05 2.5675e+02 1.2189e-02 1.3656e+03
|
||||
6 1.3553e+05 2.2976e+02 9.8758e-03 1.3647e+03
|
||||
7 1.1969e+05 3.4877e+02 7.4622e-03 1.7150e+03
|
||||
8 9.0037e+04 4.0944e+02 7.9460e-03 1.6604e+03
|
||||
9 7.6163e+04 3.6410e+02 1.0428e-02 1.3961e+03
|
||||
10 7.6163e+04 3.0462e+02 1.0783e-02 1.1988e+03
|
||||
11 7.6163e+04 3.0817e+02 1.0640e-02 1.1393e+03
|
||||
12 6.6176e+04 3.5448e+02 1.1313e-02 1.2170e+03
|
||||
13 5.9599e+04 3.4199e+02 1.1857e-02 1.1442e+03
|
||||
14 5.5506e+04 3.3071e+02 1.2925e-02 1.1168e+03
|
||||
15 5.2163e+04 3.2774e+02 1.3932e-02 1.1094e+03
|
||||
16 5.2163e+04 3.1573e+02 1.4346e-02 1.0799e+03
|
||||
17 5.2163e+04 3.2105e+02 1.4938e-02 1.1283e+03
|
||||
18 4.9100e+04 3.2722e+02 1.5248e-02 1.1258e+03
|
||||
19 4.9100e+04 2.9707e+02 1.5104e-02 1.0847e+03
|
||||
20 5.1710e+04 2.9245e+02 1.4385e-02 1.0546e+03
|
||||
+17762
-17762
File diff suppressed because it is too large
Load Diff
+12440
-12440
File diff suppressed because it is too large
Load Diff
@@ -13,13 +13,11 @@ def spheremodel(mesh, x0, y0, z0, r):
|
||||
ind = np.sqrt( (mesh.gridCC[:,0]-x0)**2+(mesh.gridCC[:,1]-y0)**2+(mesh.gridCC[:,2]-z0)**2 ) < r
|
||||
return ind
|
||||
|
||||
|
||||
|
||||
def MagSphereAnaFun(x, y, z, R, x0, y0, z0, mu1, mu2, H0, flag='total'):
|
||||
"""
|
||||
test
|
||||
Analytic function for Magnetics problem. The set up here is
|
||||
magnetic sphere in whole-space assuming that the inducing field is oriented in the x-direction.
|
||||
magnetic sphere in whole-space assuming that the inducing field is oriented in the x-direction.
|
||||
|
||||
* (x0,y0,z0)
|
||||
* (x0, y0, z0 ): is the center location of sphere
|
||||
@@ -215,19 +213,19 @@ def MagSphereFreeSpace(x, y, z, R, xc, yc, zc, chi, Bo):
|
||||
z = Utils.mkvc(z)
|
||||
|
||||
nobs = len(x)
|
||||
|
||||
|
||||
Bot = np.sqrt(sum(Bo**2))
|
||||
|
||||
|
||||
mx = np.ones([nobs]) * Bo[0,0] * R**3 / 3. * chi
|
||||
my = np.ones([nobs]) * Bo[0,1] * R**3 / 3. * chi
|
||||
mz = np.ones([nobs]) * Bo[0,2] * R**3 / 3. * chi
|
||||
|
||||
M = np.c_[mx, my, mz]
|
||||
|
||||
|
||||
rx = (x - xc)
|
||||
ry = (y - yc)
|
||||
rz = (zc - z)
|
||||
|
||||
|
||||
rvec = np.c_[rx, ry, rz]
|
||||
r = np.sqrt((rx)**2+(ry)**2+(rz)**2 )
|
||||
|
||||
@@ -238,7 +236,7 @@ def MagSphereFreeSpace(x, y, z, R, xc, yc, zc, chi, Bo):
|
||||
Bz = B[:,2]
|
||||
|
||||
return Bx, By, Bz
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
hxind = [(0,25,1.3),(21, 12.5),(0,25,1.3)]
|
||||
|
||||
+139
-440
@@ -4,17 +4,18 @@ from scipy.constants import mu_0
|
||||
from MagAnalytics import spheremodel, CongruousMagBC
|
||||
import re
|
||||
|
||||
class MagneticIntegral(Problem.BaseProblem):
|
||||
|
||||
class Problem3D_Integral(Problem.BaseProblem):
|
||||
|
||||
#surveyPair = Survey.LinearSurvey
|
||||
|
||||
storeG = True #: Store the forward matrix by default, otherwise just compute d
|
||||
actInd = None #: Active cell indices provided
|
||||
M = None #: Magnetization matrix provided, otherwise all induced
|
||||
|
||||
forwardOnly = True #: Store the forward matrix by default, otherwise just compute d
|
||||
actInd = None #: Active cell indices provided
|
||||
M = None #: Magnetization matrix provided, otherwise all induced
|
||||
|
||||
|
||||
def __init__(self, mesh, mapping=None, **kwargs):
|
||||
Problem.BaseProblem.__init__(self, mesh, mapping=mapping, **kwargs)
|
||||
|
||||
|
||||
def fwr_ind(self):
|
||||
# Add forward function
|
||||
# kappa = self.curModel.kappa TODO
|
||||
@@ -28,17 +29,17 @@ class MagneticIntegral(Problem.BaseProblem):
|
||||
def fields(self, m):
|
||||
self.curModel = m
|
||||
total = np.zeros(self.survey.nRx)
|
||||
induced = self.fwr_ind()
|
||||
induced = self.fwr_ind()
|
||||
# rem = self.rem
|
||||
|
||||
if induced is not None:
|
||||
total += induced
|
||||
|
||||
return total
|
||||
return total
|
||||
|
||||
|
||||
# return self.G.dot(self.mapping*(m))
|
||||
|
||||
|
||||
def Jvec(self, m, v, f=None):
|
||||
dmudm = self.mapping.deriv(m)
|
||||
return self.G.dot(dmudm*v)
|
||||
@@ -55,7 +56,7 @@ class MagneticIntegral(Problem.BaseProblem):
|
||||
if getattr(self,'_G', None) is None:
|
||||
self._G = self.Intrgl_Fwr_Op( 'ind' )
|
||||
|
||||
|
||||
|
||||
return self._G
|
||||
|
||||
# @property
|
||||
@@ -66,17 +67,17 @@ class MagneticIntegral(Problem.BaseProblem):
|
||||
# if getattr(self,'_Grem', None) is None:
|
||||
# self._Grem = Intrgl_Fwr_Op('full')
|
||||
|
||||
|
||||
|
||||
# return self._Grem
|
||||
|
||||
def Intrgl_Fwr_Op(self, flag):
|
||||
|
||||
"""
|
||||
"""
|
||||
|
||||
Magnetic forward operator in integral form
|
||||
|
||||
flag = 'ind' | 'full'
|
||||
|
||||
|
||||
1- ind : Magnetization fixed by user
|
||||
|
||||
3- full: Full tensor matrix stored with shape([3*ndata, 3*nc])
|
||||
@@ -88,7 +89,7 @@ class MagneticIntegral(Problem.BaseProblem):
|
||||
|
||||
@author: dominiquef
|
||||
|
||||
"""
|
||||
"""
|
||||
# Find non-zero cells
|
||||
#inds = np.nonzero(actv)[0]
|
||||
if getattr(self, 'actInd', None) is not None:
|
||||
@@ -102,30 +103,30 @@ class MagneticIntegral(Problem.BaseProblem):
|
||||
else:
|
||||
|
||||
inds = np.asarray(range(self.mesh.nC))
|
||||
|
||||
|
||||
nC = len(inds)
|
||||
|
||||
# Create active cell projector
|
||||
P = sp.csr_matrix((np.ones(nC),(inds, range(nC))),
|
||||
shape=(self.mesh.nC, nC))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Create vectors of nodal location (lower and upper coners for each cell)
|
||||
xn = self.mesh.vectorNx;
|
||||
yn = self.mesh.vectorNy;
|
||||
zn = self.mesh.vectorNz;
|
||||
|
||||
|
||||
yn2,xn2,zn2 = np.meshgrid(yn[1:], xn[1:], zn[1:])
|
||||
yn1,xn1,zn1 = np.meshgrid(yn[0:-1], xn[0:-1], zn[0:-1])
|
||||
|
||||
|
||||
Yn = P.T*np.c_[mkvc(yn1), mkvc(yn2)]
|
||||
Xn = P.T*np.c_[mkvc(xn1), mkvc(xn2)]
|
||||
Zn = P.T*np.c_[mkvc(zn1), mkvc(zn2)]
|
||||
|
||||
rxLoc = self.survey.srcField.rxList[0].locs
|
||||
ndata = rxLoc.shape[0]
|
||||
|
||||
rxLoc = self.survey.srcField.rxList[0].locs
|
||||
ndata = rxLoc.shape[0]
|
||||
|
||||
survey = self.survey
|
||||
|
||||
@@ -163,10 +164,10 @@ class MagneticIntegral(Problem.BaseProblem):
|
||||
elif survey.srcField.rxList[0].rxType == 'xyz':
|
||||
|
||||
G = np.zeros((int(3*ndata), nC))
|
||||
|
||||
elif flag == 'full':
|
||||
|
||||
elif flag == 'full':
|
||||
G = np.zeros((int(3*ndata), int(3*nC)))
|
||||
|
||||
|
||||
|
||||
else:
|
||||
print """Flag must be either 'ind' | 'full', please revised"""
|
||||
@@ -180,13 +181,13 @@ class MagneticIntegral(Problem.BaseProblem):
|
||||
count = -1;
|
||||
for ii in range(ndata):
|
||||
|
||||
|
||||
tx, ty, tz = get_T_mat(Xn,Yn,Zn,rxLoc[ii,:])
|
||||
|
||||
tx, ty, tz = get_T_mat(Xn,Yn,Zn,rxLoc[ii,:])
|
||||
if flag == 'ind':
|
||||
|
||||
|
||||
if survey.srcField.rxList[0].rxType =='tmi':
|
||||
G[ii,:] = Ptmi.dot(np.vstack((tx,ty,tz)))*Mxyz
|
||||
|
||||
|
||||
elif survey.srcField.rxList[0].rxType =='xyz':
|
||||
G[ii,:] = tx*Mxyz
|
||||
G[ii+ndata,:] = ty*Mxyz
|
||||
@@ -202,10 +203,10 @@ class MagneticIntegral(Problem.BaseProblem):
|
||||
count = progress(ii,count,ndata)
|
||||
|
||||
print "Done 100% ...forward operator completed!!\n"
|
||||
|
||||
|
||||
return G
|
||||
|
||||
class MagneticsDiffSecondary(Problem.BaseProblem):
|
||||
class Problem3D_DiffSecondary(Problem.BaseProblem):
|
||||
"""
|
||||
Secondary field approach using differential equations!
|
||||
"""
|
||||
@@ -562,49 +563,6 @@ def MagneticsDiffSecondaryInv(mesh, model, data, **kwargs):
|
||||
return inv, reg
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import matplotlib.pyplot as plt
|
||||
hxind = ((5,25,1.3),(41, 12.5),(5,25,1.3))
|
||||
hyind = ((5,25,1.3),(41, 12.5),(5,25,1.3))
|
||||
hzind = ((5,25,1.3),(40, 12.5),(5,25,1.3))
|
||||
hx, hy, hz = Utils.meshTensors(hxind, hyind, hzind)
|
||||
mesh = Mesh.TensorMesh([hx, hy, hz], [-hx.sum()/2,-hy.sum()/2,-hz.sum()/2])
|
||||
|
||||
chibkg = 0.
|
||||
chiblk = 0.01
|
||||
chi = np.ones(mesh.nC)*chibkg
|
||||
sph_ind = spheremodel(mesh, 0., 0., 0., 100)
|
||||
chi[sph_ind] = chiblk
|
||||
model = BaseMag.BaseMagModel(mesh)
|
||||
# mu = (1.+chi)*mu_0
|
||||
|
||||
data = BaseMag.BaseMagData()
|
||||
Inc = 90.
|
||||
Dec = 0.
|
||||
Btot = 51000
|
||||
|
||||
data.setBackgroundField(Inc, Dec, Btot)
|
||||
|
||||
xr = np.linspace(-300, 300, 41)
|
||||
yr = np.linspace(-300, 300, 41)
|
||||
X, Y = np.meshgrid(xr, yr)
|
||||
Z = np.ones((xr.size, yr.size))*150
|
||||
rxLoc = np.c_[Utils.mkvc(X), Utils.mkvc(Y), Utils.mkvc(Z)]
|
||||
data.rxLoc = rxLoc
|
||||
|
||||
prob = MagneticsDiffSecondary(mesh, model)
|
||||
prob.pair(data)
|
||||
|
||||
dpred = data.dpred(chi)
|
||||
|
||||
# fig = plt.figure( figsize = (8,5) )
|
||||
# ax = plt.subplot(111)
|
||||
# dat = plt.imshow(np.reshape(dpred, (xr.size, yr.size), order='F'), extent=[min(xr), max(xr), min(yr), max(yr)])
|
||||
# plt.colorbar(dat, ax = ax)
|
||||
# plt.show()
|
||||
|
||||
|
||||
def Intgrl_Fwr_Data(mesh,B,M,rxLoc,model,actv,flag):
|
||||
"""
|
||||
Forward model magnetic data using integral equation
|
||||
@@ -630,9 +588,9 @@ def Intgrl_Fwr_Data(mesh,B,M,rxLoc,model,actv,flag):
|
||||
inds = np.asarray([inds for inds, elem in enumerate(actv, 1) if elem], dtype = int) - 1
|
||||
else:
|
||||
inds = actv
|
||||
|
||||
|
||||
nC = len(inds)
|
||||
|
||||
|
||||
P = sp.csr_matrix((np.ones(nC),(inds, range(nC))), shape=(mesh.nC, nC))
|
||||
|
||||
xn = mesh.vectorNx;
|
||||
@@ -707,7 +665,7 @@ def Intgrl_Fwr_Data(mesh,B,M,rxLoc,model,actv,flag):
|
||||
|
||||
|
||||
#def Intrgl_Fwr_Op(mesh,B,M,rxLoc,actv,flag):
|
||||
# """
|
||||
# """
|
||||
#
|
||||
# Magnetic forward operator in integral form
|
||||
#
|
||||
@@ -739,7 +697,7 @@ def Intgrl_Fwr_Data(mesh,B,M,rxLoc,model,actv,flag):
|
||||
#
|
||||
# @author: dominiquef
|
||||
#
|
||||
# """
|
||||
# """
|
||||
# # Find non-zero cells
|
||||
# #inds = np.nonzero(actv)[0]
|
||||
# if actv.dtype=='bool':
|
||||
@@ -748,24 +706,24 @@ def Intgrl_Fwr_Data(mesh,B,M,rxLoc,model,actv,flag):
|
||||
# inds = actv
|
||||
#
|
||||
# nC = len(inds)
|
||||
#
|
||||
#
|
||||
# # Create active cell projector
|
||||
# P = sp.csr_matrix((np.ones(nC),(inds, range(nC))),
|
||||
# shape=(mesh.nC, nC))
|
||||
#
|
||||
#
|
||||
# # Create vectors of nodal location (lower and upper coners for each cell)
|
||||
# xn = mesh.vectorNx;
|
||||
# yn = mesh.vectorNy;
|
||||
# zn = mesh.vectorNz;
|
||||
#
|
||||
#
|
||||
# yn2,xn2,zn2 = np.meshgrid(yn[1:], xn[1:], zn[1:])
|
||||
# yn1,xn1,zn1 = np.meshgrid(yn[0:-1], xn[0:-1], zn[0:-1])
|
||||
#
|
||||
#
|
||||
# Yn = P.T*np.c_[mkvc(yn1), mkvc(yn2)]
|
||||
# Xn = P.T*np.c_[mkvc(xn1), mkvc(xn2)]
|
||||
# Zn = P.T*np.c_[mkvc(zn1), mkvc(zn2)]
|
||||
#
|
||||
# ndata = rxLoc.shape[0]
|
||||
#
|
||||
# ndata = rxLoc.shape[0]
|
||||
#
|
||||
# # Convert Bdecination from north to cartesian
|
||||
# D = (450.-float(B[1]))%360.
|
||||
@@ -799,10 +757,10 @@ def Intgrl_Fwr_Data(mesh,B,M,rxLoc,model,actv,flag):
|
||||
# elif flag == 'xyz':
|
||||
#
|
||||
# F = np.zeros((int(3*ndata), nC))
|
||||
#
|
||||
# elif flag == 'full':
|
||||
#
|
||||
# elif flag == 'full':
|
||||
# F = np.zeros((int(3*ndata), int(3*nC)))
|
||||
#
|
||||
#
|
||||
#
|
||||
# else:
|
||||
# print """Flag must be either 'tmi' | 'xyz' | 'full', please revised"""
|
||||
@@ -816,9 +774,9 @@ def Intgrl_Fwr_Data(mesh,B,M,rxLoc,model,actv,flag):
|
||||
# count = -1;
|
||||
# for ii in range(ndata):
|
||||
#
|
||||
#
|
||||
# tx, ty, tz = get_T_mat(Xn,Yn,Zn,rxLoc[ii,:])
|
||||
#
|
||||
#
|
||||
# tx, ty, tz = get_T_mat(Xn,Yn,Zn,rxLoc[ii,:])
|
||||
#
|
||||
# if flag=='tmi':
|
||||
# F[ii,:] = Ptmi.dot(np.vstack((tx,ty,tz)))*Mxyz
|
||||
#
|
||||
@@ -837,10 +795,10 @@ def Intgrl_Fwr_Data(mesh,B,M,rxLoc,model,actv,flag):
|
||||
# count = progress(ii,count,ndata)
|
||||
#
|
||||
# print "Done 100% ...forward operator completed!!\n"
|
||||
#
|
||||
#
|
||||
# return F
|
||||
|
||||
def get_T_mat(Xn,Yn,Zn,rxLoc):
|
||||
def get_T_mat(Xn, Yn, Zn, rxLoc):
|
||||
"""
|
||||
Load in the active nodes of a tensor mesh and computes the magnetic tensor
|
||||
for a given observation location rxLoc[obsx, obsy, obsz]
|
||||
@@ -863,10 +821,10 @@ def get_T_mat(Xn,Yn,Zn,rxLoc):
|
||||
|
||||
@author: dominiquef
|
||||
|
||||
"""
|
||||
|
||||
"""
|
||||
|
||||
eps = 1e-10 # add a small value to the locations to avoid /0
|
||||
|
||||
|
||||
nC = Xn.shape[0]
|
||||
|
||||
# Pre-allocate space for 1D array
|
||||
@@ -874,16 +832,16 @@ def get_T_mat(Xn,Yn,Zn,rxLoc):
|
||||
Ty = np.zeros((1,3*nC))
|
||||
Tz = np.zeros((1,3*nC))
|
||||
|
||||
|
||||
|
||||
dz2 = rxLoc[2] - Zn[:,0] + eps
|
||||
dz1 = rxLoc[2] - Zn[:,1] + eps
|
||||
|
||||
|
||||
dy2 = Yn[:,1] - rxLoc[1] + eps
|
||||
dy1 = Yn[:,0] - rxLoc[1] + eps
|
||||
|
||||
|
||||
dx2 = Xn[:,1] - rxLoc[0] + eps
|
||||
dx1 = Xn[:,0] - rxLoc[0] + eps
|
||||
|
||||
|
||||
|
||||
R1 = ( dy2**2 + dx2**2 )
|
||||
R2 = ( dy2**2 + dx1**2 )
|
||||
@@ -960,7 +918,7 @@ def get_T_mat(Xn,Yn,Zn,rxLoc):
|
||||
|
||||
return Tx,Ty,Tz
|
||||
|
||||
def progress(iter,prog,final):
|
||||
def progress(iter, prog, final):
|
||||
"""
|
||||
progress(iter,prog,final)
|
||||
|
||||
@@ -981,7 +939,7 @@ def progress(iter,prog,final):
|
||||
|
||||
return prog
|
||||
|
||||
def dipazm_2_xyz(dip,azm_N):
|
||||
def dipazm_2_xyz(dip, azm_N):
|
||||
"""
|
||||
dipazm_2_xyz(dip,azm_N)
|
||||
|
||||
@@ -1015,7 +973,7 @@ def dipazm_2_xyz(dip,azm_N):
|
||||
|
||||
return M
|
||||
|
||||
def get_dist_wgt(mesh,rxLoc,actv,R,R0):
|
||||
def get_dist_wgt(mesh, rxLoc, actv, R, R0):
|
||||
"""
|
||||
get_dist_wgt(xn,yn,zn,rxLoc,R,R0)
|
||||
|
||||
@@ -1042,29 +1000,29 @@ def get_dist_wgt(mesh,rxLoc,actv,R,R0):
|
||||
inds = np.asarray([inds for inds, elem in enumerate(actv, 1) if elem], dtype=int) - 1
|
||||
else:
|
||||
inds = actv
|
||||
|
||||
|
||||
nC = len(inds)
|
||||
|
||||
|
||||
# Create active cell projector
|
||||
P = sp.csr_matrix((np.ones(nC),(inds, range(nC))),
|
||||
shape=(mesh.nC, nC))
|
||||
|
||||
|
||||
# Geometrical constant
|
||||
p = 1/np.sqrt(3);
|
||||
|
||||
# Create cell center location
|
||||
Ym,Xm,Zm = np.meshgrid(mesh.vectorCCy, mesh.vectorCCx, mesh.vectorCCz)
|
||||
hY,hX,hZ = np.meshgrid(mesh.hy, mesh.hx, mesh.hz)
|
||||
|
||||
|
||||
# Rmove air cells
|
||||
Xm = P.T*mkvc(Xm)
|
||||
Ym = P.T*mkvc(Ym)
|
||||
Zm = P.T*mkvc(Zm)
|
||||
|
||||
|
||||
hX = P.T*mkvc(hX)
|
||||
hY = P.T*mkvc(hY)
|
||||
hZ = P.T*mkvc(hZ)
|
||||
|
||||
|
||||
V = P.T * mkvc(mesh.vol)
|
||||
wr = np.zeros(nC)
|
||||
|
||||
@@ -1104,10 +1062,10 @@ def get_dist_wgt(mesh,rxLoc,actv,R,R0):
|
||||
wr = np.sqrt(wr/(np.max(wr)))
|
||||
|
||||
print "Done 100% ...distance weighting completed!!\n"
|
||||
|
||||
|
||||
return wr
|
||||
|
||||
def writeUBCobs(filename,survey,d):
|
||||
def writeUBCobs(filename, survey, d):
|
||||
"""
|
||||
writeUBCobs(filename,B,M,rxLoc,d,wd)
|
||||
|
||||
@@ -1143,7 +1101,7 @@ def writeUBCobs(filename,survey,d):
|
||||
|
||||
print "Observation file saved to: " + filename
|
||||
|
||||
def getActiveTopo(mesh,topo,flag):
|
||||
def getActiveTopo(mesh, topo, flag):
|
||||
"""
|
||||
getActiveTopo(mesh,topo)
|
||||
|
||||
@@ -1162,6 +1120,8 @@ def getActiveTopo(mesh,topo,flag):
|
||||
"""
|
||||
import scipy.interpolate as interpolation
|
||||
|
||||
print "Please remove this function! use SimPEG.Utils.surface2ind_topo(mesh, topo, gridLoc='CC')"
|
||||
|
||||
if (flag=='N'):
|
||||
Zn = np.zeros((mesh.nNx,mesh.nNy))
|
||||
# wght = np.zeros((mesh.nNx,mesh.nNy))
|
||||
@@ -1188,15 +1148,15 @@ def getActiveTopo(mesh,topo,flag):
|
||||
|
||||
|
||||
actv = mkvc(actv==1)
|
||||
|
||||
|
||||
inds = np.asarray([inds for inds, elem in enumerate(actv, 1) if elem], dtype = int) - 1
|
||||
|
||||
|
||||
return inds
|
||||
|
||||
def plot_obs_2D(rxLoc,d = None ,varstr = 'Mag Obs', vmin = None, vmax = None, levels = None):
|
||||
def plot_obs_2D(rxLoc,d=None ,varstr='Mag Obs', vmin=None, vmax=None, levels=None):
|
||||
""" Function plot_obs(rxLoc,d)
|
||||
Generate a 2d interpolated plot from scatter points of data
|
||||
|
||||
|
||||
INPUT
|
||||
rxLoc : Observation locations [x,y,z]
|
||||
d : Data vector
|
||||
@@ -1208,107 +1168,53 @@ def plot_obs_2D(rxLoc,d = None ,varstr = 'Mag Obs', vmin = None, vmax = None, le
|
||||
Created on Dec, 27th 2015
|
||||
|
||||
@author: dominiquef
|
||||
|
||||
"""
|
||||
|
||||
|
||||
"""
|
||||
|
||||
from scipy.interpolate import griddata
|
||||
import pylab as plt
|
||||
|
||||
|
||||
|
||||
# Plot result
|
||||
plt.figure()
|
||||
plt.subplot()
|
||||
plt.scatter(rxLoc[:,0],rxLoc[:,1], c='k', s=10)
|
||||
|
||||
|
||||
if d is not None:
|
||||
|
||||
|
||||
if (vmin is None):
|
||||
vmin = d.min()
|
||||
|
||||
|
||||
if (vmax is None):
|
||||
vmax = d.max()
|
||||
|
||||
|
||||
# Create grid of points
|
||||
x = np.linspace(rxLoc[:,0].min(), rxLoc[:,0].max(), 100)
|
||||
y = np.linspace(rxLoc[:,1].min(), rxLoc[:,1].max(), 100)
|
||||
|
||||
|
||||
X, Y = np.meshgrid(x,y)
|
||||
|
||||
|
||||
# Interpolate
|
||||
d_grid = griddata(rxLoc[:,0:2],d,(X,Y), method ='linear')
|
||||
plt.imshow(d_grid, extent=[x.min(), x.max(), y.min(), y.max()],origin = 'lower', vmin = vmin, vmax = vmax)
|
||||
plt.imshow(d_grid, extent=[x.min(), x.max(), y.min(), y.max()], origin='lower', vmin=vmin, vmax=vmax)
|
||||
plt.colorbar(fraction=0.02)
|
||||
|
||||
|
||||
if levels is None:
|
||||
plt.contour(X,Y, d_grid,10,vmin = vmin, vmax = vmax)
|
||||
plt.contour(X,Y, d_grid, 10, vmin=vmin, vmax=vmax)
|
||||
else:
|
||||
plt.contour(X,Y, d_grid,levels = levels,colors = 'r', vmin = vmin, vmax = vmax)
|
||||
plt.contour(X,Y, d_grid, levels=levels, colors='r', vmin=vmin, vmax=vmax)
|
||||
|
||||
plt.title(varstr)
|
||||
plt.gca().set_aspect('equal', adjustable='box')
|
||||
|
||||
def readUBCmagObs(obs_file):
|
||||
|
||||
"""
|
||||
Read and write UBC mag file format
|
||||
|
||||
INPUT:
|
||||
:param fileName, path to the UBC obs mag file
|
||||
|
||||
OUTPUT:
|
||||
:param survey
|
||||
:param M, magnetization orentiaton (MI, MD)
|
||||
|
||||
"""
|
||||
|
||||
fid = open(obs_file,'r')
|
||||
|
||||
# First line has the inclination,declination and amplitude of B0
|
||||
line = fid.readline()
|
||||
B = np.array(line.split(),dtype=float)
|
||||
|
||||
# Second line has the magnetization orientation and a flag
|
||||
line = fid.readline()
|
||||
M = np.array(line.split(),dtype=float)
|
||||
|
||||
# Third line has the number of rows
|
||||
line = fid.readline()
|
||||
ndat = np.array(line.split(),dtype=int)
|
||||
|
||||
# Pre-allocate space for obsx, obsy, obsz, data, uncert
|
||||
line = fid.readline()
|
||||
temp = np.array(line.split(),dtype=float)
|
||||
|
||||
d = np.zeros(ndat, dtype=float)
|
||||
wd = np.zeros(ndat, dtype=float)
|
||||
locXYZ = np.zeros( (ndat,3), dtype=float)
|
||||
|
||||
for ii in range(ndat):
|
||||
|
||||
temp = np.array(line.split(),dtype=float)
|
||||
locXYZ[ii,:] = temp[:3]
|
||||
|
||||
if len(temp) > 3:
|
||||
d[ii] = temp[3]
|
||||
|
||||
if len(temp)==5:
|
||||
wd[ii] = temp[4]
|
||||
|
||||
line = fid.readline()
|
||||
|
||||
rxLoc = MAG.RxObs(locXYZ)
|
||||
srcField = MAG.SrcField([rxLoc],(B[2],B[0],B[1]))
|
||||
survey = MAG.LinearSurvey(srcField)
|
||||
survey.dobs = d
|
||||
survey.std = wd
|
||||
return survey
|
||||
|
||||
def read_MAGfwr_inp(input_file):
|
||||
|
||||
"""Read input files for forward modeling MAG data with integral form
|
||||
INPUT:
|
||||
input_file: File name containing the forward parameter
|
||||
|
||||
|
||||
OUTPUT:
|
||||
mshfile
|
||||
obsfile
|
||||
@@ -1319,291 +1225,84 @@ def read_MAGfwr_inp(input_file):
|
||||
# be specified.
|
||||
|
||||
Created on Jul 17, 2013
|
||||
|
||||
|
||||
@author: dominiquef
|
||||
"""
|
||||
|
||||
|
||||
|
||||
fid = open(input_file,'r')
|
||||
|
||||
|
||||
line = fid.readline()
|
||||
l_input = line.split('!')
|
||||
mshfile = l_input[0].rstrip()
|
||||
|
||||
|
||||
line = fid.readline()
|
||||
l_input = line.split('!')
|
||||
obsfile = l_input[0].rstrip()
|
||||
|
||||
|
||||
line = fid.readline()
|
||||
l_input = line.split('!')
|
||||
l_input = line.split('!')
|
||||
modfile = l_input[0].rstrip()
|
||||
|
||||
|
||||
line = fid.readline()
|
||||
l_input = line.split('!')
|
||||
l_input = line.split('!')
|
||||
if l_input=='null':
|
||||
magfile = []
|
||||
|
||||
|
||||
else:
|
||||
magfile = l_input[0].rstrip()
|
||||
|
||||
|
||||
|
||||
|
||||
line = fid.readline()
|
||||
l_input = line.split('!')
|
||||
l_input = line.split('!')
|
||||
if l_input=='null':
|
||||
topofile = []
|
||||
|
||||
|
||||
else:
|
||||
topofile = l_input[0].rstrip()
|
||||
|
||||
|
||||
return mshfile, obsfile, modfile, magfile, topofile
|
||||
|
||||
def read_MAGinv_inp(input_file):
|
||||
"""Read input files for forward modeling MAG data with integral form
|
||||
INPUT:
|
||||
input_file: File name containing the forward parameter
|
||||
|
||||
OUTPUT:
|
||||
mshfile
|
||||
obsfile
|
||||
topofile
|
||||
start model
|
||||
ref model
|
||||
mag model
|
||||
weightfile
|
||||
chi_target
|
||||
as, ax ,ay, az
|
||||
upper, lower bounds
|
||||
lp, lqx, lqy, lqz
|
||||
|
||||
# All files should be in the working directory, otherwise the path must
|
||||
# be specified.
|
||||
|
||||
Created on Dec 21th, 2015
|
||||
|
||||
@author: dominiquef
|
||||
"""
|
||||
|
||||
|
||||
fid = open(input_file,'r')
|
||||
|
||||
# Line 1
|
||||
line = fid.readline()
|
||||
l_input = line.split('!')
|
||||
mshfile = l_input[0].rstrip()
|
||||
|
||||
# Line 2
|
||||
line = fid.readline()
|
||||
l_input = line.split('!')
|
||||
obsfile = l_input[0].rstrip()
|
||||
|
||||
# Line 3
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input=='null':
|
||||
topofile = []
|
||||
|
||||
else:
|
||||
topofile = l_input[0].rstrip()
|
||||
|
||||
|
||||
# Line 4
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input[0]=='VALUE':
|
||||
mstart = float(l_input[1])
|
||||
|
||||
else:
|
||||
mstart = l_input[0].rstrip()
|
||||
|
||||
# Line 5
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input[0]=='VALUE':
|
||||
mref = float(l_input[1])
|
||||
|
||||
else:
|
||||
mref = l_input[0].rstrip()
|
||||
|
||||
|
||||
# Line 6
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input=='DEFAULT':
|
||||
magfile = []
|
||||
|
||||
else:
|
||||
magfile = l_input[0].rstrip()
|
||||
if __name__ == '__main__':
|
||||
import matplotlib.pyplot as plt
|
||||
hxind = ((5,25,1.3),(41, 12.5),(5,25,1.3))
|
||||
hyind = ((5,25,1.3),(41, 12.5),(5,25,1.3))
|
||||
hzind = ((5,25,1.3),(40, 12.5),(5,25,1.3))
|
||||
hx, hy, hz = Utils.meshTensors(hxind, hyind, hzind)
|
||||
mesh = Mesh.TensorMesh([hx, hy, hz], [-hx.sum()/2,-hy.sum()/2,-hz.sum()/2])
|
||||
|
||||
# Line 7
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input=='DEFAULT':
|
||||
wgtfile = []
|
||||
|
||||
else:
|
||||
wgtfile = l_input[0].rstrip()
|
||||
chibkg = 0.
|
||||
chiblk = 0.01
|
||||
chi = np.ones(mesh.nC)*chibkg
|
||||
sph_ind = spheremodel(mesh, 0., 0., 0., 100)
|
||||
chi[sph_ind] = chiblk
|
||||
model = BaseMag.BaseMagModel(mesh)
|
||||
# mu = (1.+chi)*mu_0
|
||||
|
||||
# Line 8
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
chi = float(l_input[0])
|
||||
data = BaseMag.BaseMagData()
|
||||
Inc = 90.
|
||||
Dec = 0.
|
||||
Btot = 51000
|
||||
|
||||
# Line 9
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
val = np.array(l_input[0:4])
|
||||
alphas = val.astype(np.float)
|
||||
data.setBackgroundField(Inc, Dec, Btot)
|
||||
|
||||
# Line 10
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input[0]=='VALUE':
|
||||
val = np.array(l_input[1:3])
|
||||
bounds = val.astype(np.float)
|
||||
|
||||
else:
|
||||
bounds = l_input[0].rstrip()
|
||||
xr = np.linspace(-300, 300, 41)
|
||||
yr = np.linspace(-300, 300, 41)
|
||||
X, Y = np.meshgrid(xr, yr)
|
||||
Z = np.ones((xr.size, yr.size))*150
|
||||
rxLoc = np.c_[Utils.mkvc(X), Utils.mkvc(Y), Utils.mkvc(Z)]
|
||||
data.rxLoc = rxLoc
|
||||
|
||||
# Line 11
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input[0]=='VALUE':
|
||||
val = np.array(l_input[1:6])
|
||||
lpnorms = val.astype(np.float)
|
||||
|
||||
else:
|
||||
lpnorms = l_input[0].rstrip()
|
||||
prob = MagneticsDiffSecondary(mesh, model)
|
||||
prob.pair(data)
|
||||
|
||||
return mshfile, obsfile, topofile, mstart, mref, magfile, wgtfile, chi, alphas, bounds, lpnorms
|
||||
dpred = data.dpred(chi)
|
||||
|
||||
def read_GOCAD_ts(tsfile):
|
||||
"""Read GOCAD triangulated surface (*.ts) file
|
||||
INPUT:
|
||||
tsfile: Triangulated surface
|
||||
|
||||
OUTPUT:
|
||||
vrts : Array of vertices in XYZ coordinates [n x 3]
|
||||
trgl : Array of index for triangles [m x 3]. The order of the vertices
|
||||
is important and describes the normal
|
||||
n = cross( (P2 - P1 ) , (P3 - P1) )
|
||||
|
||||
|
||||
Created on Jan 13th, 2016
|
||||
|
||||
Author: @fourndo
|
||||
"""
|
||||
|
||||
|
||||
fid = open(tsfile,'r')
|
||||
line = fid.readline()
|
||||
|
||||
# Skip all the lines until the vertices
|
||||
while re.match('TFACE',line)==None:
|
||||
line = fid.readline()
|
||||
|
||||
line = fid.readline()
|
||||
vrtx = []
|
||||
|
||||
# Run down all the vertices and save in array
|
||||
while re.match('VRTX',line):
|
||||
l_input = re.split('[\s*]',line)
|
||||
temp = np.array(l_input[2:5])
|
||||
vrtx.append(temp.astype(np.float))
|
||||
|
||||
# Read next line
|
||||
line = fid.readline()
|
||||
|
||||
vrtx = np.asarray(vrtx)
|
||||
|
||||
# Skip lines to the triangles
|
||||
while re.match('TRGL',line)==None:
|
||||
line = fid.readline()
|
||||
|
||||
# Run down the list of triangles
|
||||
trgl = []
|
||||
|
||||
# Run down all the vertices and save in array
|
||||
while re.match('TRGL',line):
|
||||
l_input = re.split('[\s*]',line)
|
||||
temp = np.array(l_input[1:4])
|
||||
trgl.append(temp.astype(np.int))
|
||||
|
||||
# Read next line
|
||||
line = fid.readline()
|
||||
|
||||
trgl = np.asarray(trgl)
|
||||
|
||||
return vrtx, trgl
|
||||
|
||||
def gocad2vtk(gcFile,mesh,bcflag,inflag):
|
||||
""""
|
||||
Function to read gocad polystructure file and output indexes of mesh with in the structure.
|
||||
|
||||
"""
|
||||
import vtk, vtk.util.numpy_support as npsup
|
||||
|
||||
print "Reading GOCAD ts file..."
|
||||
vrtx, trgl = read_GOCAD_ts(gcFile)
|
||||
# Adjust the index
|
||||
trgl = trgl - 1
|
||||
|
||||
# Make vtk pts
|
||||
ptsvtk = vtk.vtkPoints()
|
||||
ptsvtk.SetData(npsup.numpy_to_vtk(vrtx,deep=1))
|
||||
|
||||
# Make the polygon connection
|
||||
polys = vtk.vtkCellArray()
|
||||
for face in trgl:
|
||||
poly = vtk.vtkPolygon()
|
||||
poly.GetPointIds().SetNumberOfIds(len(face))
|
||||
for nrv, vert in enumerate(face):
|
||||
poly.GetPointIds().SetId(nrv,vert)
|
||||
polys.InsertNextCell(poly)
|
||||
|
||||
# Make the polydata, structure of connections and vrtx
|
||||
polyData = vtk.vtkPolyData()
|
||||
polyData.SetPoints(ptsvtk)
|
||||
polyData.SetPolys(polys)
|
||||
|
||||
# Make implicit func
|
||||
ImpDistFunc = vtk.vtkImplicitPolyDataDistance()
|
||||
ImpDistFunc.SetInput(polyData)
|
||||
|
||||
# Convert the mesh
|
||||
vtkMesh = vtk.vtkRectilinearGrid()
|
||||
vtkMesh.SetDimensions(mesh.nNx,mesh.nNy,mesh.nNz)
|
||||
vtkMesh.SetXCoordinates(npsup.numpy_to_vtk(mesh.vectorNx,deep=1))
|
||||
vtkMesh.SetYCoordinates(npsup.numpy_to_vtk(mesh.vectorNy,deep=1))
|
||||
vtkMesh.SetZCoordinates(npsup.numpy_to_vtk(mesh.vectorNz,deep=1))
|
||||
# Add indexes
|
||||
vtkInd = npsup.numpy_to_vtk(np.arange(mesh.nC),deep=1)
|
||||
vtkInd.SetName('Index')
|
||||
vtkMesh.GetCellData().AddArray(vtkInd)
|
||||
|
||||
extractImpDistRectGridFilt = vtk.vtkExtractGeometry() # Object constructor
|
||||
extractImpDistRectGridFilt.SetImplicitFunction(ImpDistFunc) #
|
||||
extractImpDistRectGridFilt.SetInputData(vtkMesh)
|
||||
|
||||
if bcflag is True:
|
||||
extractImpDistRectGridFilt.ExtractBoundaryCellsOn()
|
||||
|
||||
else:
|
||||
extractImpDistRectGridFilt.ExtractBoundaryCellsOff()
|
||||
|
||||
if inflag is True:
|
||||
extractImpDistRectGridFilt.ExtractInsideOn()
|
||||
|
||||
else:
|
||||
extractImpDistRectGridFilt.ExtractInsideOff()
|
||||
|
||||
print "Extracting indices from grid..."
|
||||
# Executing the pipe
|
||||
extractImpDistRectGridFilt.Update()
|
||||
|
||||
# Get index inside
|
||||
insideGrid = extractImpDistRectGridFilt.GetOutput()
|
||||
insideGrid = npsup.vtk_to_numpy(insideGrid.GetCellData().GetArray('Index'))
|
||||
|
||||
|
||||
# Return the indexes inside
|
||||
return insideGrid
|
||||
# fig = plt.figure( figsize = (8,5) )
|
||||
# ax = plt.subplot(111)
|
||||
# dat = plt.imshow(np.reshape(dpred, (xr.size, yr.size), order='F'), extent=[min(xr), max(xr), min(yr), max(yr)])
|
||||
# plt.colorbar(dat, ax = ax)
|
||||
# plt.show()
|
||||
|
||||
@@ -0,0 +1,261 @@
|
||||
import re, os
|
||||
from SimPEG import Mesh, np
|
||||
import BaseMag, Magnetics
|
||||
|
||||
class MagneticsDriver_Inv(object):
|
||||
"""docstring for MagneticsDriver_Inv"""
|
||||
|
||||
def __init__(self, input_file=None):
|
||||
if input_file is not None:
|
||||
self.basePath = os.path.sep.join(input_file.split(os.path.sep)[:-1])
|
||||
if len(self.basePath) > 0:
|
||||
self.basePath += os.path.sep
|
||||
self.readDriverFile(input_file.split(os.path.sep)[-1])
|
||||
|
||||
|
||||
def readDriverFile(self, input_file):
|
||||
"""
|
||||
Read input files for forward modeling MAG data with integral form
|
||||
INPUT:
|
||||
input_file: File name containing the forward parameter
|
||||
|
||||
OUTPUT:
|
||||
mshfile
|
||||
obsfile
|
||||
topofile
|
||||
start model
|
||||
ref model
|
||||
mag model
|
||||
weightfile
|
||||
chi_target
|
||||
as, ax ,ay, az
|
||||
upper, lower bounds
|
||||
lp, lqx, lqy, lqz
|
||||
|
||||
# All files should be in the working directory, otherwise the path must
|
||||
# be specified.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
fid = open(self.basePath + input_file,'r')
|
||||
|
||||
# Line 1
|
||||
line = fid.readline()
|
||||
l_input = line.split('!')
|
||||
mshfile = l_input[0].rstrip()
|
||||
|
||||
# Line 2
|
||||
line = fid.readline()
|
||||
l_input = line.split('!')
|
||||
obsfile = l_input[0].rstrip()
|
||||
|
||||
# Line 3
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input=='null':
|
||||
topofile = []
|
||||
|
||||
else:
|
||||
topofile = l_input[0].rstrip()
|
||||
|
||||
|
||||
# Line 4
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input[0]=='VALUE':
|
||||
mstart = float(l_input[1])
|
||||
|
||||
else:
|
||||
mstart = l_input[0].rstrip()
|
||||
|
||||
# Line 5
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input[0]=='VALUE':
|
||||
mref = float(l_input[1])
|
||||
|
||||
else:
|
||||
mref = l_input[0].rstrip()
|
||||
|
||||
|
||||
# Line 6
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input=='DEFAULT':
|
||||
magfile = []
|
||||
|
||||
else:
|
||||
magfile = l_input[0].rstrip()
|
||||
|
||||
# Line 7
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input=='DEFAULT':
|
||||
wgtfile = []
|
||||
|
||||
else:
|
||||
wgtfile = l_input[0].rstrip()
|
||||
|
||||
# Line 8
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
chi = float(l_input[0])
|
||||
|
||||
# Line 9
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
val = np.array(l_input[0:4])
|
||||
alphas = val.astype(np.float)
|
||||
|
||||
# Line 10
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input[0]=='VALUE':
|
||||
val = np.array(l_input[1:3])
|
||||
bounds = val.astype(np.float)
|
||||
|
||||
else:
|
||||
bounds = l_input[0].rstrip()
|
||||
|
||||
# Line 11
|
||||
line = fid.readline()
|
||||
l_input = re.split('[!\s]',line)
|
||||
if l_input[0]=='VALUE':
|
||||
val = np.array(l_input[1:6])
|
||||
lpnorms = val.astype(np.float)
|
||||
|
||||
else:
|
||||
lpnorms = l_input[0].rstrip()
|
||||
|
||||
self.mshfile = mshfile
|
||||
self.obsfile = obsfile
|
||||
self.topofile = topofile
|
||||
self.mstart = mstart
|
||||
self._mrefInput = mref
|
||||
self.magfile = magfile
|
||||
self.wgtfile = wgtfile
|
||||
self.chi = chi
|
||||
self.alphas = alphas
|
||||
self.bounds = bounds
|
||||
self.lpnorms = lpnorms
|
||||
|
||||
@property
|
||||
def mesh(self):
|
||||
if getattr(self, '_mesh', None) is None:
|
||||
self._mesh = Mesh.TensorMesh.readUBC(self.basePath + self.mshfile)
|
||||
return self._mesh
|
||||
|
||||
@property
|
||||
def survey(self):
|
||||
if getattr(self, '_survey', None) is None:
|
||||
self._survey = self.readMagneticsObservations(self.obsfile)
|
||||
return self._survey
|
||||
|
||||
@property
|
||||
def activeCells(self):
|
||||
if getattr(self, '_activeCells', None) is None:
|
||||
if self.topofile == 'null':
|
||||
self._activeCells = np.arange(mesh.nC)
|
||||
else:
|
||||
topo = np.genfromtxt(self.basePath + self.topofile, skip_header=1)
|
||||
# Find the active cells
|
||||
self._activeCells = Magnetics.getActiveTopo(self.mesh,topo,'N')
|
||||
return self._activeCells
|
||||
|
||||
|
||||
@property
|
||||
def nC(self):
|
||||
if getattr(self, '_nC', None) is None:
|
||||
self._nC = len(self.activeCells)
|
||||
return self._nC
|
||||
|
||||
@property
|
||||
def m0(self):
|
||||
if getattr(self, '_m0', None) is None:
|
||||
if isinstance(self.mstart, float):
|
||||
self._m0 = np.ones(self.nC) * self.mstart
|
||||
else:
|
||||
self._m0 = Utils.meshutils.readUBCTensorModel(self.basePath + self.mstart,self.mesh)
|
||||
self._m0 = self._m0[self.activeCells]
|
||||
|
||||
return self._m0
|
||||
|
||||
@property
|
||||
def mref(self):
|
||||
if getattr(self, '_mref', None) is None:
|
||||
if isinstance(self._mrefInput, float):
|
||||
self._mref = np.ones(self.nC) * self._mrefInput
|
||||
else:
|
||||
self._mref = Utils.meshutils.readUBCTensorModel(self.basePath + self._mrefInput, self.mesh)
|
||||
self._mref = self._mref[self.activeCells]
|
||||
return self._mref
|
||||
|
||||
|
||||
@property
|
||||
def magnetizationModel(self):
|
||||
"""
|
||||
magnetization vector
|
||||
"""
|
||||
|
||||
if self.magfile == 'DEFAULT':
|
||||
return Magnetics.dipazm_2_xyz(np.ones(self.nC) * self.survey.srcField.param[1], np.ones(self.nC) * self.survey.srcField.param[2])
|
||||
|
||||
else:
|
||||
raise NotImplementedError("this will require you to read in a three column vector model")
|
||||
self._mref = Utils.meshutils.readUBCTensorModel(self.basePath + self._mrefInput, self.mesh)
|
||||
return np.genfromtxt(self.magfile,delimiter=' \n',dtype=np.str,comments='!')
|
||||
|
||||
def readMagneticsObservations(self, obs_file):
|
||||
"""
|
||||
Read and write UBC mag file format
|
||||
|
||||
INPUT:
|
||||
:param fileName, path to the UBC obs mag file
|
||||
|
||||
OUTPUT:
|
||||
:param survey
|
||||
:param M, magnetization orentiaton (MI, MD)
|
||||
"""
|
||||
|
||||
fid = open(self.basePath + obs_file,'r')
|
||||
|
||||
# First line has the inclination,declination and amplitude of B0
|
||||
line = fid.readline()
|
||||
B = np.array(line.split(),dtype=float)
|
||||
|
||||
# Second line has the magnetization orientation and a flag
|
||||
line = fid.readline()
|
||||
M = np.array(line.split(),dtype=float)
|
||||
|
||||
# Third line has the number of rows
|
||||
line = fid.readline()
|
||||
ndat = np.array(line.split(),dtype=int)
|
||||
|
||||
# Pre-allocate space for obsx, obsy, obsz, data, uncert
|
||||
line = fid.readline()
|
||||
temp = np.array(line.split(),dtype=float)
|
||||
|
||||
d = np.zeros(ndat, dtype=float)
|
||||
wd = np.zeros(ndat, dtype=float)
|
||||
locXYZ = np.zeros( (ndat,3), dtype=float)
|
||||
|
||||
for ii in range(ndat):
|
||||
|
||||
temp = np.array(line.split(),dtype=float)
|
||||
locXYZ[ii,:] = temp[:3]
|
||||
|
||||
if len(temp) > 3:
|
||||
d[ii] = temp[3]
|
||||
|
||||
if len(temp)==5:
|
||||
wd[ii] = temp[4]
|
||||
|
||||
line = fid.readline()
|
||||
|
||||
rxLoc = BaseMag.RxObs(locXYZ)
|
||||
srcField = BaseMag.SrcField([rxLoc],param=(B[2],B[0],B[1]))
|
||||
survey = BaseMag.LinearSurvey(srcField)
|
||||
survey.dobs = d
|
||||
survey.std = wd
|
||||
return survey
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
47 47 20
|
||||
-60.00 -60.00 280.00
|
||||
50.00 30.00 20.00 41*10.00 20.00 30.00 50.00
|
||||
50.00 30.00 20.00 41*10.00 20.00 30.00 50.00
|
||||
17*10.00 20.00 30.00 50
|
||||
@@ -0,0 +1,619 @@
|
||||
90 0 50000
|
||||
90 0 1
|
||||
616
|
||||
105 155 240.831177 -0.7588417 1
|
||||
115 155 244.046936 -0.7915504 1
|
||||
125 155 247.198578 -0.805861 1
|
||||
135 155 250.256927 -0.798687 1
|
||||
145 155 253.192322 -0.7701055 1
|
||||
155 155 255.975342 -0.7241221 1
|
||||
165 155 258.576965 -0.6681905 1
|
||||
175 155 260.969513 -0.6113366 1
|
||||
185 155 263.126709 -0.5615882 1
|
||||
195 155 265.024445 -0.5237785 1
|
||||
205 155 266.641052 -0.4986475 1
|
||||
215 155 267.957825 -0.4833724 1
|
||||
225 155 268.95929 -0.4730379 1
|
||||
235 155 269.633667 -0.4623284 1
|
||||
245 155 269.9729 -0.4469757 1
|
||||
255 155 269.9729 -0.4247823 1
|
||||
265 155 269.633667 -0.39628 1
|
||||
275 155 268.95929 -0.3650762 1
|
||||
285 155 267.957825 -0.3378048 1
|
||||
295 155 266.641052 -0.3234333 1
|
||||
305 155 265.024445 -0.3316285 1
|
||||
315 155 263.126709 -0.3701661 1
|
||||
325 155 260.969513 -0.4418891 1
|
||||
335 155 258.576965 -0.5423904 1
|
||||
345 155 255.975342 -0.659748 1
|
||||
355 155 253.192322 -0.7770281 1
|
||||
365 155 250.256927 -0.8768104 1
|
||||
375 155 247.198608 -0.9458876 1
|
||||
105 165 242.760101 -0.8195894 1
|
||||
115 165 246.086945 -0.8419799 1
|
||||
125 165 249.347504 -0.8356238 1
|
||||
135 165 252.511536 -0.7963749 1
|
||||
145 165 255.54834 -0.7257527 1
|
||||
155 165 258.42749 -0.6322459 1
|
||||
165 165 261.119019 -0.5301054 1
|
||||
175 165 263.594238 -0.4354313 1
|
||||
185 165 265.825958 -0.3611376 1
|
||||
195 165 267.789246 -0.3131647 1
|
||||
205 165 269.4617 -0.2895989 1
|
||||
215 165 270.823975 -0.2825252 1
|
||||
225 165 271.860046 -0.281212 1
|
||||
235 165 272.557739 -0.2751351 1
|
||||
245 165 272.90863 -0.2561399 1
|
||||
255 165 272.90863 -0.2197196 1
|
||||
265 165 272.557739 -0.1658328 1
|
||||
275 165 271.860046 -0.09951203 1
|
||||
285 165 270.823975 -0.03119349 1
|
||||
295 165 269.4617 0.0236968 1
|
||||
305 165 267.789246 0.04674543 1
|
||||
315 165 265.825958 0.02064035 1
|
||||
325 165 263.594238 -0.06508273 1
|
||||
335 165 261.119019 -0.208611 1
|
||||
345 165 258.42749 -0.393637 1
|
||||
355 165 255.54834 -0.5925498 1
|
||||
365 165 252.511536 -0.7744437 1
|
||||
375 165 249.347534 -0.9143868 1
|
||||
105 175 244.517365 -0.8731715 1
|
||||
115 175 247.945435 -0.8756285 1
|
||||
125 175 251.305176 -0.83312 1
|
||||
135 175 254.56546 -0.739917 1
|
||||
145 175 257.694702 -0.6004066 1
|
||||
155 175 260.661377 -0.4314286 1
|
||||
165 175 263.434845 -0.2595249 1
|
||||
175 175 265.985352 -0.1129547 1
|
||||
185 175 268.284973 -0.01194964 1
|
||||
195 175 270.307983 0.03755872 1
|
||||
205 175 272.031311 0.04395232 1
|
||||
215 175 273.435028 0.0249682 1
|
||||
225 175 274.502655 0.001294248 1
|
||||
235 175 275.221558 -0.008426053 1
|
||||
245 175 275.58313 0.009649532 1
|
||||
255 175 275.58313 0.0634047 1
|
||||
265 175 275.221558 0.154099 1
|
||||
275 175 274.502655 0.2754614 1
|
||||
285 175 273.435028 0.4125105 1
|
||||
295 175 272.031311 0.5409548 1
|
||||
305 175 270.307983 0.6288864 1
|
||||
315 175 268.284973 0.6424912 1
|
||||
325 175 265.985352 0.5560076 1
|
||||
335 175 263.434845 0.3630851 1
|
||||
345 175 260.661377 0.08384954 1
|
||||
355 175 257.694702 -0.237926 1
|
||||
365 175 254.56546 -0.548451 1
|
||||
375 175 251.305176 -0.8018905 1
|
||||
105 185 246.083527 -0.9140503 1
|
||||
115 185 249.601807 -0.8826051 1
|
||||
125 185 253.049957 -0.7811191 1
|
||||
135 185 256.396027 -0.6012919 1
|
||||
145 185 259.607605 -0.3526822 1
|
||||
155 185 262.652374 -0.06704467 1
|
||||
165 185 265.498779 0.2074117 1
|
||||
175 185 268.116394 0.4220746 1
|
||||
185 185 270.476563 0.5463553 1
|
||||
195 185 272.552795 0.5775926 1
|
||||
205 185 274.321503 0.5378997 1
|
||||
215 185 275.762146 0.4625557 1
|
||||
225 185 276.857849 0.3880164 1
|
||||
235 185 277.595642 0.3444396 1
|
||||
245 185 277.966797 0.3530179 1
|
||||
255 185 277.966797 0.4259006 1
|
||||
265 185 277.595642 0.5663478 1
|
||||
275 185 276.857849 0.7675966 1
|
||||
285 185 275.762146 1.010183 1
|
||||
295 185 274.321503 1.259027 1
|
||||
305 185 272.552795 1.463291 1
|
||||
315 185 270.476563 1.563029 1
|
||||
325 185 268.116394 1.504866 1
|
||||
335 185 265.498779 1.263533 1
|
||||
345 185 262.652374 0.8593219 1
|
||||
355 185 259.607605 0.3588987 1
|
||||
365 185 256.396027 -0.1463404 1
|
||||
375 185 253.049988 -0.5744338 1
|
||||
105 195 247.440887 -0.9365266 1
|
||||
115 195 251.037354 -0.8525355 1
|
||||
125 195 254.562134 -0.6607845 1
|
||||
135 195 257.982544 -0.3485086 1
|
||||
145 195 261.265472 0.06623109 1
|
||||
155 195 264.37793 0.5262602 1
|
||||
165 195 267.287598 0.9466072 1
|
||||
175 195 269.963379 1.245725 1
|
||||
185 195 272.375977 1.379536 1
|
||||
195 195 274.498352 1.355977 1
|
||||
205 195 276.306335 1.223446 1
|
||||
215 195 277.778992 1.046257 1
|
||||
225 195 278.899048 0.8838316 1
|
||||
235 195 279.653259 0.7809416 1
|
||||
245 195 280.032623 0.7668838 1
|
||||
255 195 280.032623 0.8582527 1
|
||||
265 195 279.653259 1.060967 1
|
||||
275 195 278.899048 1.369147 1
|
||||
285 195 277.778992 1.760239 1
|
||||
295 195 276.306335 2.187949 1
|
||||
305 195 274.498352 2.577668 1
|
||||
315 195 272.375977 2.831963 1
|
||||
325 195 269.963379 2.852671 1
|
||||
335 195 267.287598 2.577787 1
|
||||
345 195 264.37793 2.01826 1
|
||||
355 195 261.265472 1.27011 1
|
||||
365 195 257.982544 0.4833555 1
|
||||
375 195 254.562134 -0.2003685 1
|
||||
105 205 248.573853 -0.9364405 1
|
||||
115 205 252.235565 -0.7778356 1
|
||||
125 205 255.82428 -0.4572914 1
|
||||
135 205 259.306763 0.0458342 1
|
||||
145 205 262.649292 0.7008426 1
|
||||
155 205 265.818176 1.409817 1
|
||||
165 205 268.78067 2.028682 1
|
||||
175 205 271.505005 2.42519 1
|
||||
185 205 273.961365 2.539679 1
|
||||
195 205 276.122253 2.404351 1
|
||||
205 205 277.963074 2.113149 1
|
||||
215 205 279.462433 1.774462 1
|
||||
225 205 280.602814 1.47808 1
|
||||
235 205 281.370697 1.284939 1
|
||||
245 205 281.756958 1.231368 1
|
||||
255 205 281.756958 1.337238 1
|
||||
265 205 281.370697 1.611238 1
|
||||
275 205 280.602814 2.050138 1
|
||||
285 205 279.462433 2.631077 1
|
||||
295 205 277.963074 3.2984 1
|
||||
305 205 276.122253 3.951254 1
|
||||
315 205 273.961365 4.444233 1
|
||||
325 205 271.505005 4.614739 1
|
||||
335 205 268.78067 4.339799 1
|
||||
345 205 265.818176 3.603591 1
|
||||
355 205 262.649292 2.534426 1
|
||||
365 205 259.306763 1.366716 1
|
||||
375 205 255.82431 0.3338567 1
|
||||
105 215 249.469238 -0.9136291 1
|
||||
115 215 253.182526 -0.6589502 1
|
||||
125 215 256.821808 -0.1698693 1
|
||||
135 215 260.353333 0.5874462 1
|
||||
145 215 263.74292 1.565753 1
|
||||
155 215 266.956482 2.607309 1
|
||||
165 215 269.960632 3.479923 1
|
||||
175 215 272.723358 3.978535 1
|
||||
185 215 275.214325 4.028715 1
|
||||
195 215 277.40564 3.707969 1
|
||||
205 215 279.2724 3.180547 1
|
||||
215 215 280.792847 2.615157 1
|
||||
225 215 281.94931 2.13744 1
|
||||
235 215 282.727997 1.823207 1
|
||||
245 215 283.11969 1.71236 1
|
||||
255 215 283.11969 1.825263 1
|
||||
265 215 282.727997 2.172536 1
|
||||
275 215 281.94931 2.755052 1
|
||||
285 215 280.792847 3.553031 1
|
||||
295 215 279.2724 4.505293 1
|
||||
305 215 277.40564 5.485875 1
|
||||
315 215 275.214325 6.295436 1
|
||||
325 215 272.723358 6.690773 1
|
||||
335 215 269.960632 6.463354 1
|
||||
345 215 266.956482 5.547766 1
|
||||
355 215 263.74292 4.10083 1
|
||||
365 215 260.353333 2.465151 1
|
||||
375 215 256.821838 1.000294 1
|
||||
105 225 250.116516 -0.8743188 1
|
||||
115 225 253.867065 -0.5101706 1
|
||||
125 225 257.542908 0.1755437 1
|
||||
135 225 261.109894 1.236342 1
|
||||
145 225 264.533508 2.606781 1
|
||||
155 225 267.779327 4.051729 1
|
||||
165 225 270.81366 5.220251 1
|
||||
175 225 273.604126 5.813692 1
|
||||
185 225 276.120087 5.748304 1
|
||||
195 225 278.333435 5.170528 1
|
||||
205 225 280.218872 4.338887 1
|
||||
215 225 281.754639 3.495014 1
|
||||
225 225 282.922668 2.801622 1
|
||||
235 225 283.709198 2.344926 1
|
||||
245 225 284.104828 2.16313 1
|
||||
255 225 284.104828 2.273224 1
|
||||
265 225 283.709198 2.685922 1
|
||||
275 225 282.922668 3.40649 1
|
||||
285 225 281.754639 4.420648 1
|
||||
295 225 280.218872 5.665849 1
|
||||
305 225 278.333435 6.995332 1
|
||||
315 225 276.120087 8.157348 1
|
||||
325 225 273.604126 8.82303 1
|
||||
335 225 270.81366 8.684887 1
|
||||
345 225 267.779327 7.610068 1
|
||||
355 225 264.533508 5.774337 1
|
||||
365 225 261.109894 3.638668 1
|
||||
375 225 257.542908 1.709743 1
|
||||
105 235 250.507996 -0.8317488 1
|
||||
115 235 254.281128 -0.3622331 1
|
||||
125 235 257.979034 0.5184553 1
|
||||
135 235 261.567444 1.888687 1
|
||||
145 235 265.011658 3.667592 1
|
||||
155 235 268.276978 5.534542 1
|
||||
165 235 271.32959 7.004851 1
|
||||
175 235 274.13678 7.678418 1
|
||||
185 235 276.667908 7.464011 1
|
||||
195 235 278.894531 6.593227 1
|
||||
205 235 280.791321 5.432199 1
|
||||
215 235 282.336304 4.298311 1
|
||||
225 235 283.511383 3.386243 1
|
||||
235 235 284.302643 2.786252 1
|
||||
245 235 284.700653 2.529866 1
|
||||
255 235 284.700653 2.62728 1
|
||||
265 235 284.302643 3.087025 1
|
||||
275 235 283.511383 3.917431 1
|
||||
285 235 282.336304 5.109731 1
|
||||
295 235 280.791321 6.60235 1
|
||||
305 235 278.894531 8.233635 1
|
||||
315 235 276.667908 9.70905 1
|
||||
325 235 274.13678 10.62564 1
|
||||
335 235 271.32959 10.58569 1
|
||||
345 235 268.276978 9.389627 1
|
||||
355 235 265.011658 7.223036 1
|
||||
365 235 261.567444 4.651613 1
|
||||
375 235 257.979065 2.317601 1
|
||||
105 245 250.639008 -0.8031906 1
|
||||
115 245 254.419678 -0.2567715 1
|
||||
125 245 258.125 0.7720825 1
|
||||
135 245 261.720581 2.386057 1
|
||||
145 245 265.171661 4.496398 1
|
||||
155 245 268.443542 6.708923 1
|
||||
165 245 271.502228 8.428509 1
|
||||
175 245 274.315063 9.166789 1
|
||||
185 245 276.851227 8.817329 1
|
||||
195 245 279.082336 7.692689 1
|
||||
205 245 280.98291 6.255138 1
|
||||
215 245 282.531006 4.884361 1
|
||||
225 245 283.708405 3.796578 1
|
||||
235 245 284.501251 3.0811 1
|
||||
245 245 284.900055 2.761007 1
|
||||
255 245 284.900055 2.838641 1
|
||||
265 245 284.501251 3.318654 1
|
||||
275 245 283.708405 4.209807 1
|
||||
285 245 282.531006 5.506134 1
|
||||
295 245 280.98291 7.146722 1
|
||||
305 245 279.082336 8.961084 1
|
||||
315 245 276.851227 10.62863 1
|
||||
325 245 274.315063 11.70051 1
|
||||
335 245 271.502228 11.72266 1
|
||||
345 245 268.443542 10.45331 1
|
||||
355 245 265.171661 8.084093 1
|
||||
365 245 261.720581 5.24673 1
|
||||
375 245 258.125 2.668323 1
|
||||
105 255 250.507996 -0.8032413 1
|
||||
115 255 254.281128 -0.2308932 1
|
||||
125 255 257.979034 0.8544926 1
|
||||
135 255 261.567444 2.570146 1
|
||||
145 255 265.011658 4.828936 1
|
||||
155 255 268.276978 7.205737 1
|
||||
165 255 271.32959 9.052127 1
|
||||
175 255 274.13678 9.832447 1
|
||||
185 255 276.667908 9.425632 1
|
||||
195 255 278.894531 8.181864 1
|
||||
205 255 280.791321 6.61156 1
|
||||
215 255 282.336304 5.126034 1
|
||||
225 255 283.511383 3.951786 1
|
||||
235 255 284.302643 3.176769 1
|
||||
245 255 284.700653 2.818616 1
|
||||
255 255 284.700653 2.874094 1
|
||||
265 255 284.302643 3.343708 1
|
||||
275 255 283.511383 4.233653 1
|
||||
285 255 282.336304 5.536428 1
|
||||
295 255 280.791321 7.189605 1
|
||||
305 255 278.894531 9.020029 1
|
||||
315 255 276.667908 10.70241 1
|
||||
325 255 274.13678 11.78181 1
|
||||
335 255 271.32959 11.79881 1
|
||||
345 255 268.276978 10.51058 1
|
||||
355 255 265.011658 8.114479 1
|
||||
365 255 261.567444 5.25268 1
|
||||
375 255 257.979065 2.659622 1
|
||||
105 265 250.116516 -0.8364838 1
|
||||
115 265 253.867065 -0.2987034 1
|
||||
125 265 257.542908 0.730639 1
|
||||
135 265 261.109894 2.367063 1
|
||||
145 265 264.533508 4.533685 1
|
||||
155 265 267.779327 6.832248 1
|
||||
165 265 270.81366 8.639468 1
|
||||
175 265 273.604126 9.430596 1
|
||||
185 265 276.120087 9.076918 1
|
||||
195 265 278.333435 7.902471 1
|
||||
205 265 280.218872 6.395443 1
|
||||
215 265 281.754639 4.956879 1
|
||||
225 265 282.922668 3.811898 1
|
||||
235 265 283.709198 3.049655 1
|
||||
245 265 284.104828 2.688498 1
|
||||
255 265 284.104828 2.724281 1
|
||||
265 265 283.709198 3.154537 1
|
||||
275 265 282.922668 3.980581 1
|
||||
285 265 281.754639 5.189228 1
|
||||
295 265 280.218872 6.714512 1
|
||||
305 265 278.333435 8.387216 1
|
||||
315 265 276.120087 9.900153 1
|
||||
325 265 273.604126 10.83422 1
|
||||
335 265 270.81366 10.77838 1
|
||||
345 265 267.779327 9.531084 1
|
||||
355 265 264.533508 7.293797 1
|
||||
365 265 261.109894 4.659332 1
|
||||
375 265 257.542908 2.288398 1
|
||||
105 275 249.469238 -0.8944128 1
|
||||
115 275 253.182526 -0.4425263 1
|
||||
125 275 256.821808 0.4343149 1
|
||||
135 275 260.353333 1.834889 1
|
||||
145 275 263.74292 3.697208 1
|
||||
155 275 266.956482 5.696558 1
|
||||
165 275 269.960632 7.30593 1
|
||||
175 275 272.723358 8.066821 1
|
||||
185 275 275.214325 7.854281 1
|
||||
195 275 277.40564 6.91226 1
|
||||
205 275 279.2724 5.644381 1
|
||||
215 275 280.792847 4.401628 1
|
||||
225 275 281.94931 3.394523 1
|
||||
235 275 282.727997 2.714301 1
|
||||
245 275 283.11969 2.385276 1
|
||||
255 275 283.11969 2.406946 1
|
||||
265 275 282.727997 2.775713 1
|
||||
275 275 281.94931 3.487118 1
|
||||
285 275 280.792847 4.520212 1
|
||||
295 275 279.2724 5.80555 1
|
||||
305 275 277.40564 7.185402 1
|
||||
315 275 275.214325 8.390831 1
|
||||
325 275 272.723358 9.072539 1
|
||||
335 275 269.960632 8.907607 1
|
||||
345 275 266.956482 7.763454 1
|
||||
355 275 263.74292 5.837826 1
|
||||
365 275 260.353333 3.625323 1
|
||||
375 275 256.821838 1.653854 1
|
||||
105 285 248.573853 -0.9591397 1
|
||||
115 285 252.235565 -0.6212285 1
|
||||
125 285 255.82428 0.051057 1
|
||||
135 285 259.306763 1.132654 1
|
||||
145 285 262.649292 2.578346 1
|
||||
155 285 265.818176 4.151248 1
|
||||
165 285 268.78067 5.462206 1
|
||||
175 285 271.505005 6.15344 1
|
||||
185 285 273.961365 6.103346 1
|
||||
195 285 276.122253 5.464153 1
|
||||
205 285 277.963074 4.527912 1
|
||||
215 285 279.462433 3.569985 1
|
||||
225 285 280.602814 2.771323 1
|
||||
235 285 281.370697 2.220876 1
|
||||
245 285 281.756958 1.949892 1
|
||||
255 285 281.756958 1.963643 1
|
||||
265 285 281.370697 2.258935 1
|
||||
275 285 280.602814 2.826297 1
|
||||
285 285 279.462433 3.638017 1
|
||||
295 285 277.963074 4.624463 1
|
||||
305 285 276.122253 5.647346 1
|
||||
315 285 273.961365 6.489984 1
|
||||
325 285 271.505005 6.89047 1
|
||||
335 285 268.78067 6.628548 1
|
||||
345 285 265.818176 5.643015 1
|
||||
355 285 262.649292 4.113403 1
|
||||
365 285 259.306763 2.412046 1
|
||||
375 285 255.82431 0.9149938 1
|
||||
105 295 247.440887 -1.011423 1
|
||||
115 295 251.037354 -0.7896024 1
|
||||
125 295 254.562134 -0.3250723 1
|
||||
135 295 257.982544 0.4339865 1
|
||||
145 295 261.265472 1.458079 1
|
||||
155 295 264.37793 2.590895 1
|
||||
165 295 267.287598 3.574395 1
|
||||
175 295 269.963379 4.158915 1
|
||||
185 295 272.375977 4.235457 1
|
||||
195 295 274.498352 3.878613 1
|
||||
205 295 276.306335 3.27391 1
|
||||
215 295 277.778992 2.615522 1
|
||||
225 295 278.899048 2.044877 1
|
||||
235 295 279.653259 1.641445 1
|
||||
245 295 280.032623 1.439964 1
|
||||
255 295 280.032623 1.450583 1
|
||||
265 295 279.653259 1.671221 1
|
||||
275 295 278.899048 2.089455 1
|
||||
285 295 277.778992 2.674484 1
|
||||
295 295 276.306335 3.36202 1
|
||||
305 295 274.498352 4.039838 1
|
||||
315 295 272.375977 4.548412 1
|
||||
325 295 269.963379 4.711965 1
|
||||
335 295 267.287598 4.401741 1
|
||||
345 295 264.37793 3.60888 1
|
||||
355 295 261.265472 2.480467 1
|
||||
365 295 257.982544 1.271313 1
|
||||
375 295 254.562134 0.2239833 1
|
||||
105 305 246.083527 -1.037815 1
|
||||
115 305 249.601807 -0.9153721 1
|
||||
125 305 253.049957 -0.6277985 1
|
||||
135 305 256.396027 -0.1413393 1
|
||||
145 305 259.607605 0.5270341 1
|
||||
155 305 262.652374 1.283511 1
|
||||
165 305 265.498779 1.970314 1
|
||||
175 305 268.116394 2.427473 1
|
||||
185 305 270.476563 2.56995 1
|
||||
195 305 272.552795 2.421773 1
|
||||
205 305 274.321503 2.085502 1
|
||||
215 305 275.762146 1.684076 1
|
||||
225 305 276.857849 1.317886 1
|
||||
235 305 277.595642 1.051018 1
|
||||
245 305 277.966797 0.9164558 1
|
||||
255 305 277.966797 0.9264848 1
|
||||
265 305 277.595642 1.080114 1
|
||||
275 305 276.857849 1.364457 1
|
||||
285 305 275.762146 1.750175 1
|
||||
295 305 274.321503 2.183568 1
|
||||
305 305 272.552795 2.581238 1
|
||||
315 305 270.476563 2.836312 1
|
||||
325 305 268.116394 2.843435 1
|
||||
335 305 265.498779 2.53956 1
|
||||
345 305 262.652374 1.942758 1
|
||||
355 305 259.607605 1.161767 1
|
||||
365 305 256.396027 0.3578575 1
|
||||
375 305 253.049988 -0.3240296 1
|
||||
105 315 244.517365 -1.033498 1
|
||||
115 315 247.945435 -0.9854098 1
|
||||
125 315 251.305176 -0.8302344 1
|
||||
135 315 254.56546 -0.5464416 1
|
||||
145 315 257.694702 -0.1422417 1
|
||||
155 315 260.661377 0.3302703 1
|
||||
165 315 263.434845 0.7810533 1
|
||||
175 315 265.985352 1.11401 1
|
||||
185 315 268.284973 1.26902 1
|
||||
195 315 270.307983 1.245204 1
|
||||
205 315 272.031311 1.091521 1
|
||||
215 315 273.435028 0.8779288 1
|
||||
225 315 274.502655 0.6689956 1
|
||||
235 315 275.221558 0.5111202 1
|
||||
245 315 275.58313 0.4313801 1
|
||||
255 315 275.58313 0.4413795 1
|
||||
265 315 275.221558 0.5408217 1
|
||||
275 315 274.502655 0.7183567 1
|
||||
285 315 273.435028 0.9495843 1
|
||||
295 315 272.031311 1.194077 1
|
||||
305 315 270.307983 1.395294 1
|
||||
315 315 268.284973 1.488117 1
|
||||
325 315 265.985352 1.416343 1
|
||||
335 315 263.434845 1.155969 1
|
||||
345 315 260.661377 0.7327568 1
|
||||
355 315 257.694702 0.2205752 1
|
||||
365 315 254.56546 -0.2842715 1
|
||||
375 315 251.305176 -0.6998433 1
|
||||
105 325 242.760101 -1.001009 1
|
||||
115 325 246.086945 -1.002393 1
|
||||
125 325 249.347504 -0.9365406 1
|
||||
135 325 252.511536 -0.7895898 1
|
||||
145 325 255.54834 -0.5643467 1
|
||||
155 325 258.42749 -0.2877616 1
|
||||
165 325 261.119019 -0.008496879 1
|
||||
175 325 263.594238 0.2185697 1
|
||||
185 325 265.825958 0.3539491 1
|
||||
195 325 267.789246 0.3879928 1
|
||||
205 325 269.4617 0.3399999 1
|
||||
215 325 270.823975 0.245651 1
|
||||
225 325 271.860046 0.1425535 1
|
||||
235 325 272.557739 0.06089945 1
|
||||
245 325 272.90863 0.02018288 1
|
||||
255 325 272.90863 0.02955809 1
|
||||
265 325 272.557739 0.08900298 1
|
||||
275 325 271.860046 0.1897431 1
|
||||
285 325 270.823975 0.3137744 1
|
||||
295 325 269.4617 0.4335785 1
|
||||
305 325 267.789246 0.5141889 1
|
||||
315 325 265.825958 0.5195781 1
|
||||
325 325 263.594238 0.423505 1
|
||||
335 325 261.119019 0.2213678 1
|
||||
345 325 258.42749 -0.06328931 1
|
||||
355 325 255.54834 -0.383331 1
|
||||
365 325 252.511536 -0.6835498 1
|
||||
375 325 249.347534 -0.9195023 1
|
||||
105 335 240.831177 -0.9470594 1
|
||||
115 335 244.046936 -0.9776354 1
|
||||
125 335 247.198578 -0.9667871 1
|
||||
135 335 250.256927 -0.9053537 1
|
||||
145 335 253.192322 -0.7932306 1
|
||||
155 335 255.975342 -0.643329 1
|
||||
165 335 258.576965 -0.4807753 1
|
||||
175 335 260.969513 -0.3357394 1
|
||||
185 335 263.126709 -0.2327569 1
|
||||
195 335 265.024445 -0.1823665 1
|
||||
205 335 266.641052 -0.1795066 1
|
||||
215 335 267.957825 -0.2082184 1
|
||||
225 335 268.95929 -0.2487825 1
|
||||
235 335 269.633667 -0.2835538 1
|
||||
245 335 269.9729 -0.300115 1
|
||||
255 335 269.9729 -0.2922643 1
|
||||
265 335 269.633667 -0.2600168 1
|
||||
275 335 268.95929 -0.209445 1
|
||||
285 335 267.957825 -0.1524777 1
|
||||
295 335 266.641052 -0.1060946 1
|
||||
305 335 265.024445 -0.08997072 1
|
||||
315 335 263.126709 -0.121989 1
|
||||
325 335 260.969513 -0.212178 1
|
||||
335 335 258.576965 -0.3573267 1
|
||||
345 335 255.975342 -0.5393556 1
|
||||
355 335 253.192322 -0.7294713 1
|
||||
365 335 250.256927 -0.8969562 1
|
||||
375 335 247.198608 -1.018534 1
|
||||
105 345 238.751434 -0.8795042 1
|
||||
115 345 241.847382 -0.9247606 1
|
||||
125 345 244.881653 -0.9446973 1
|
||||
135 345 247.82608 -0.9330818 1
|
||||
145 345 250.65213 -0.8885093 1
|
||||
155 345 253.331451 -0.8165421 1
|
||||
165 345 255.836212 -0.7295913 1
|
||||
175 345 258.139618 -0.6437526 1
|
||||
185 345 260.216461 -0.5736571 1
|
||||
195 345 262.043518 -0.5278839 1
|
||||
205 345 263.599884 -0.5071621 1
|
||||
215 345 264.867584 -0.5057246 1
|
||||
225 345 265.831787 -0.5144912 1
|
||||
235 345 266.481018 -0.5243066 1
|
||||
245 345 266.807617 -0.5281933 1
|
||||
255 345 266.807617 -0.5225207 1
|
||||
265 345 266.481018 -0.5073952 1
|
||||
275 345 265.831787 -0.4866288 1
|
||||
285 345 264.867584 -0.4673505 1
|
||||
295 345 263.599884 -0.4590167 1
|
||||
305 345 262.043518 -0.4715563 1
|
||||
315 345 260.216461 -0.5125949 1
|
||||
325 345 258.139618 -0.5843691 1
|
||||
335 345 255.836212 -0.6815979 1
|
||||
345 345 253.331451 -0.7916309 1
|
||||
355 345 250.65213 -0.8974017 1
|
||||
365 345 247.82608 -0.9822296 1
|
||||
375 345 244.881653 -1.034367 1
|
||||
105 355 236.542786 -0.8053916 1
|
||||
115 355 239.511536 -0.8559309 1
|
||||
125 355 242.421112 -0.8909921 1
|
||||
135 355 245.244568 -0.9062259 1
|
||||
145 355 247.954498 -0.8998395 1
|
||||
155 355 250.523712 -0.8737812 1
|
||||
165 355 252.925537 -0.8338691 1
|
||||
175 355 255.134338 -0.7884543 1
|
||||
185 355 257.125824 -0.7460073 1
|
||||
195 355 258.877808 -0.712674 1
|
||||
205 355 260.370239 -0.6909303 1
|
||||
215 355 261.585815 -0.6797073 1
|
||||
225 355 262.510406 -0.6756343 1
|
||||
235 355 263.132996 -0.6746618 1
|
||||
245 355 263.446106 -0.6734288 1
|
||||
255 355 263.446106 -0.6701413 1
|
||||
265 355 263.132996 -0.6649869 1
|
||||
275 355 262.510406 -0.6601467 1
|
||||
285 355 261.585815 -0.6594277 1
|
||||
295 355 260.370239 -0.667488 1
|
||||
305 355 258.877808 -0.6886132 1
|
||||
315 355 257.125824 -0.7251665 1
|
||||
325 355 255.134338 -0.7761745 1
|
||||
335 355 252.925537 -0.8366687 1
|
||||
345 355 250.523712 -0.8982714 1
|
||||
355 355 247.954498 -0.9510985 1
|
||||
365 355 245.244568 -0.986296 1
|
||||
375 355 242.421143 -0.9982168 1
|
||||
105 365 234.227783 -0.7301244 1
|
||||
115 365 237.063202 -0.7803932 1
|
||||
125 365 239.842102 -0.8211433 1
|
||||
135 365 242.538727 -0.8492868 1
|
||||
145 365 245.126953 -0.8630885 1
|
||||
155 365 247.58078 -0.8628479 1
|
||||
165 365 249.874756 -0.8510816 1
|
||||
175 365 251.984314 -0.8319991 1
|
||||
185 365 253.886353 -0.8103872 1
|
||||
195 365 255.559631 -0.7903531 1
|
||||
205 365 256.985046 -0.7744435 1
|
||||
215 365 258.146057 -0.7634233 1
|
||||
225 365 259.029114 -0.756661 1
|
||||
235 365 259.623718 -0.7528488 1
|
||||
245 365 259.922791 -0.7507278 1
|
||||
255 365 259.922791 -0.7496345 1
|
||||
265 365 259.623718 -0.7497882 1
|
||||
275 365 259.029114 -0.7523054 1
|
||||
285 365 258.146057 -0.7589456 1
|
||||
295 365 256.985046 -0.7716019 1
|
||||
305 365 255.559631 -0.7915938 1
|
||||
315 365 253.886353 -0.8188929 1
|
||||
325 365 251.984314 -0.8515587 1
|
||||
335 365 249.874756 -0.8856623 1
|
||||
345 365 247.58078 -0.9158597 1
|
||||
355 365 245.126953 -0.9365292 1
|
||||
365 365 242.538727 -0.9430979 1
|
||||
375 365 239.842102 -0.9330602 1
|
||||
@@ -0,0 +1,11 @@
|
||||
Mesh_10m.msh ! Mesh file
|
||||
Obs_loc_TMI.obs ! Obsfile
|
||||
Gaussian.topo ! Topofile | null
|
||||
VALUE 1e-4 ! Starting model
|
||||
VALUE 0 ! Reference model
|
||||
DEFAULT !..\AzmDip.dat ! Magnetization vector model
|
||||
DEFAULT ! Cell based weight file
|
||||
1 ! target chi factor | DEFAULT=1
|
||||
1 1 1 1 ! alpha s, x ,y ,z
|
||||
VALUE 0 1 ! Lower and Upper Bounds for p-component
|
||||
VALUE 0 1 1 1 1 ! lp-norm for amplitude inversion FILE pqxqyqzr.dat ! Norms VALUE p, qx, qy, qz, r | FILE m-by-5 matrix
|
||||
@@ -0,0 +1,29 @@
|
||||
import unittest
|
||||
from SimPEG import *
|
||||
from simpegPF import BaseMag
|
||||
import matplotlib.pyplot as plt
|
||||
import simpegPF as PF
|
||||
from scipy.constants import mu_0
|
||||
|
||||
|
||||
|
||||
class MagSensProblemTests(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def test_magnetics_inversion(self):
|
||||
|
||||
driver = PF.MagneticsDriver.MagneticsDriver_Inv('assets/magnetics/SimPEG_MAG3D_inv.inp')
|
||||
|
||||
print driver.mesh
|
||||
print driver.survey
|
||||
print driver.m0
|
||||
print driver.mref
|
||||
print driver.activeCells
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -3,3 +3,4 @@ import BaseMag
|
||||
import Magnetics
|
||||
import BaseGrav
|
||||
import Gravity
|
||||
import MagneticsDriver
|
||||
|
||||
Reference in New Issue
Block a user