コード例 #1
0
ファイル: run_synthetic.py プロジェクト: leouieda/seg2011
# Show the seeds first to confirm that they are right
fig = mlab.figure()
fig.scene.background = (1, 1, 1)
vis.plot_prism_mesh(model, style='wireframe', xy2ne=True)
plot = vis.plot_prism_mesh(seed_mesh, style='surface', xy2ne=True)
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)
mlab.show()

# Run the inversion
results = gplant.grow(data, mesh, seeds, compactness=10.**(20), power=7,
                      threshold=1*10**(-4), norm=1, neighbor_type='reduced',
                      jacobian_file=None, distance_type='radial')

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

# Pickle results for later
log.info("Pickling results")
output = open('mesh.pickle', 'w')
pickle.dump(mesh, output)
output.close()
seed_file = open("seeds.pickle", 'w')
pickle.dump(seeds, seed_file)
seed_file.close()
コード例 #2
0
ファイル: run_synthetic.py プロジェクト: whigg/sbgf2011
                 nb_labels=5,
                 extent=extent,
                 ranges=ranges,
                 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)
mlab.show()

# Run the inversion
results = gplant.grow(data,
                      mesh,
                      seeds,
                      compactness=10.**(5),
                      power=3,
                      threshold=10 * 10**(-7),
                      norm=2,
                      neighbor_type='reduced',
                      jacobian_file=None,
                      distance_type='cell')

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

# Pickle results for later
log.info("Pickling results")
io.dump('adjusted.txt', adjusted['gz'])
#output = open('mesh.pickle', 'w')
コード例 #3
0
ファイル: run_synthetic.py プロジェクト: cloudroid/sbgf2011
# Show the seeds first to confirm that they are right
fig = mlab.figure()
fig.scene.background = (1, 1, 1)
vis.plot_prism_mesh(model, style='wireframe', xy2ne=True)
plot = vis.plot_prism_mesh(seed_mesh, style='surface', xy2ne=True)
axes = mlab.axes(plot, nb_labels=5, extent=extent, ranges=ranges, 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)
mlab.show()

# Run the inversion
results = gplant.grow(data, mesh, seeds, compactness=10.**(5), power=3,
                      threshold=10*10**(-7), norm=2, neighbor_type='reduced',
                      jacobian_file=None, distance_type='cell')

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

# Pickle results for later
log.info("Pickling results")
io.dump('adjusted.txt', adjusted['gz'])
#output = open('mesh.pickle', 'w')
#pickle.dump(mesh, output)
#output.close()
output = open('model.pickle', 'w')
コード例 #4
0
pylab.ylabel('Easting [m]')

pylab.show()

fig = mlab.figure()
fig.scene.background = (1, 1, 1)
fig.scene.camera.yaw(230)
plot = vis.plot_prism_mesh(mesh, opacity=0.4)
plot = vis.plot_prism_mesh(seed_mesh)
axes = mlab.axes(plot, nb_labels=5, extent=[xmin,xmax,ymin,ymax,-zmax,-zmin])

mlab.show()

# Run the inversion
results = gplant.grow(data, mesh, seeds, compactness=10**(5), power=5, norm=1,
                      threshold=5*10**(-5), jacobian_file=None,
                      distance_type='radial')

estimate, residuals, misfits, goals = results

adjusted = gplant.adjustment(data, residuals)

fatiando.mesh.fill(estimate, mesh, fillNone=False)

log.info("Pickling results")

output = open('mesh.pickle', 'w')
pickle.dump(mesh, output)
output.close()

seed_file = open("seeds.pickle", 'w')
コード例 #5
0
ファイル: run_synthetic.py プロジェクト: whigg/seg2011
fig.scene.background = (1, 1, 1)
vis.plot_prism_mesh(model, style='wireframe', xy2ne=True)
plot = vis.plot_prism_mesh(seed_mesh, style='surface', xy2ne=True)
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)
mlab.show()

# Run the inversion
results = gplant.grow(data,
                      mesh,
                      seeds,
                      compactness=10.**(20),
                      power=7,
                      threshold=1 * 10**(-4),
                      norm=1,
                      neighbor_type='reduced',
                      jacobian_file=None,
                      distance_type='radial')

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

# Pickle results for later
log.info("Pickling results")
output = open('mesh.pickle', 'w')
pickle.dump(mesh, output)
output.close()
コード例 #6
0
ファイル: plant.py プロジェクト: whigg/eage2011
fig.scene.background = (1, 1, 1)
fig.scene.camera.yaw(230)
plot = vis.plot_prism_mesh(mesh, opacity=0.4)
plot = vis.plot_prism_mesh(seed_mesh)
axes = mlab.axes(plot,
                 nb_labels=5,
                 extent=[xmin, xmax, ymin, ymax, -zmax, -zmin])

mlab.show()

# Run the inversion
results = gplant.grow(data,
                      mesh,
                      seeds,
                      compactness=10**(5),
                      power=5,
                      norm=1,
                      threshold=5 * 10**(-5),
                      jacobian_file=None,
                      distance_type='radial')

estimate, residuals, misfits, goals = results

adjusted = gplant.adjustment(data, residuals)

fatiando.mesh.fill(estimate, mesh, fillNone=False)

log.info("Pickling results")

output = open('mesh.pickle', 'w')
pickle.dump(mesh, output)