Example #1
0
                      power=3,
                      threshold=10**(-3),
                      norm=2,
                      neighbor_type='reduced',
                      jacobian_file=None,
                      distance_type='radial')

# Unpack the results and calculate the adjusted data
estimate, residuals, misfits, goals = results
fatiando.mesh.fill(estimate, mesh)
adjusted = gplant.adjustment(data, residuals)

# PLOT THE INVERSION RESULTS
################################################################################
log.info("Plotting")

# Plot the adjusted model plus the skeleton of the synthetic model
fig = mlab.figure()
fig.scene.background = (1, 1, 1)
plot = vis.plot_prism_mesh(seed_mesh, style='surface', label='Density')
plot = vis.plot_prism_mesh(mesh, style='surface', label='Density')
plot = vis.plot_prism_mesh(mesh, style='surface', label='Density')
axes = mlab.axes(plot, nb_labels=5, extent=extent, color=(0, 0, 0))
axes.label_text_property.color = (0, 0, 0)
axes.title_text_property.color = (0, 0, 0)
axes.axes.label_format = "%-#.0f"
mlab.outline(color=(0, 0, 0), extent=extent)
Y, X, Z = utils.extract_matrices(data['gzz'])
mlab.surf(X, Y, Z)
mlab.show()
Example #2
0
#p.actor.property.color = (0,0,0)

p = vis.plot_prism_mesh(mesh, style='surface', opacity=0.4)
#p.actor.mapper.scalar_visibility = False
#p.actor.property.color = (0,0,0)
p.actor.property.line_width = 5

#a = mlab.axes(p, nb_labels=0, extent=extent, color=(0,0,0))
#a.label_text_property.color = (0,0,0)
#a.title_text_property.color = (0,0,0)
#a.axes.label_format = ""
#a.axes.x_label, a.axes.y_label, a.axes.z_label = "", "", ""
#a.property.line_width = 3

for field, pos, scale in zip(fields, [500, 2000], [25, 40]):
    Y, X, Z = utils.extract_matrices(data[field])
    p = mlab.contour_surf(X, Y, Z, contours=10, colormap='Greys')
    p.contour.filled_contours = True
    p.actor.actor.position = (0,0,pos)
    p.actor.actor.scale = (1,1,scale)

    #a = mlab.axes(p, nb_labels=0, extent=[0,3000,0,3000,pos,pos + scale*Z.max()], color=(0,0,0))
    #a.label_text_property.color = (0,0,0)
    #a.title_text_property.color = (0,0,0)
    #a.axes.label_format = ""
    #a.axes.x_label, a.axes.y_label, a.axes.z_label = "", "", ""
    #a.property.line_width = 3
    
fig.scene.camera.position = [-3146.9567922907049, -9163.4060799024755, 5741.7604134051016]
fig.scene.camera.focal_point = [1480.0106958881547, 1276.2836085370318, -489.3486831029677]
fig.scene.camera.view_angle = 30.0
Example #3
0
    data = pickle.load(f)['gz']
with open("adj.pickle") as f:
    adj = pickle.load(f)['gz']
with open("model.pickle") as f:
    model = pickle.load(f)
with open("changes.pickle") as f:
    changes = pickle.load(f)
    
estimate = mesh.ravel()
x1, x2 = 0, 5000
y1, y2 = 0, 3000
z1, z2 = 0, 3000
extent = [y1, y2, x1, x2, -z2, -z1]
ranges = [0,3,0,5,3,0]
dshape = (data['ny'], data['nx'])
Y, X, Z = utils.extract_matrices(data)
neighborcolor = (0.1, 0.1, 0.1)

def setden(e,d):
    e['value'] = d
    return e

def setview(scene):    
    scene.scene.camera.position = [-11978.536823271232, -925.93553026480663, 2177.903325392459]
    scene.scene.camera.focal_point = [818.377739158537, 2580.2852687956774, -345.59067831382299]
    scene.scene.camera.view_angle = 30.0
    scene.scene.camera.view_up = [0.18327538439221325, 0.038083300249243945, 0.9823236715655449]
    scene.scene.camera.clipping_range = [8864.9794387069087, 20780.748659615412]
    scene.scene.camera.compute_view_plane_normal()
    scene.scene.render()