Test script for multiple *.ts surfaces to block model (Lalor model)

This commit is contained in:
D Fournier
2016-01-18 17:10:31 -08:00
parent 6a7d72bf85
commit b2fc35ee75
11 changed files with 121607 additions and 65 deletions
+14
View File
@@ -65,15 +65,29 @@ if magfile=='DEFAULT':
else:
M_xyz = np.genfromtxt(magfile,delimiter=' \n',dtype=np.str,comments='!')
# Get index of the center
midx = int(mesh.nCx/2)
midy = int(mesh.nCy/2)
# Create forward operator
F = PF.Magnetics.Intrgl_Fwr_Op(mesh,B,M_xyz,rxLoc,actv,'tmi')
# Get distance weighting function
wr = PF.Magnetics.get_dist_wgt(mesh,rxLoc,3.,np.min(mesh.hx)/4)
wrMap = PF.BaseMag.WeightMap(mesh, wr)
Utils.writeUBCTensorModel(home_dir+dsep+'wr.dat',mesh,wr)
# Write out the predicted
pred = F.dot(mstart)
PF.Magnetics.writeUBCobs(home_dir + dsep + 'Pred.dat',B,M,rxLoc,pred,wd)
#%%
plt.figure()
ax = plt.subplot()
mesh.plotSlice(wr, ax = ax, normal = 'Y', ind=midx)
plt.title('Distance weighting')
plt.xlabel('x');plt.ylabel('z')
plt.gca().set_aspect('equal', adjustable='box')