Пример #1
0
                                        nx=50, ny=50, height=150, field=field)
    data[field]['value'] = utils.contaminate(data[field]['value'],
                                                    stddev=error,
                                                    percent=False)
    data[field]['error'] = error*numpy.ones(len(data[field]['value']))

# PERFORM THE INVERSION
################################################################################
#~ # Generate a prism mesh
mesh = fatiando.mesh.prism_mesh(x1=x1, x2=x2, y1=y1, y2=y2, z1=z1, z2=z2,
                                nx=30, ny=30, nz=30)
 
# Set the seeds and save them for later use
log.info("Setting seeds in mesh:")
seeds = []
seeds.append(gplant.get_seed((1501, 1501, 1501), 1000, mesh))

# Make a mesh for the seeds to plot them
seed_mesh = numpy.array([seed['cell'] for seed in seeds])
#~ 
#~ # Run the inversion
#~ results = gplant.grow(data, mesh, seeds, compactness=10**(4), 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)

#with open('mesh.pickle', 'w') as f:
Пример #2
0
spoints.append((4200, 3250, 550))
sdens.append(1000)

spoints.append((3300, 2050, 550))
sdens.append(1000)
spoints.append((3600, 2050, 550))
sdens.append(1000)
spoints.append((4000, 2050, 550))
sdens.append(1000)
spoints.append((4300, 2050, 550))
sdens.append(1000)

spoints.append((1000, 1000, 550))
sdens.append(600)

seeds = [gplant.get_seed(p, dens, mesh) for p, dens in zip(spoints, sdens)]

# Make a mesh for the seeds to plot them
seed_mesh = numpy.array([seed['cell'] for seed in seeds])

# 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()
Пример #3
0
spoints2 = []
sdens2 = []
dx = 3000
for x in numpy.arange(25000 + dx, 55000, dx):
    spoints2.append((x, 39500, 500))
    sdens2.append(400)

pylab.savetxt("seeds2.txt", numpy.array(spoints2))

spoints = []
spoints.extend(spoints1)
spoints.extend(spoints2)
sdens = []
sdens.extend(sdens1)
sdens.extend(sdens2)
seeds = [gplant.get_seed(p, dens, mesh) for p, dens in zip(spoints, sdens)]

# Make a mesh for the seeds to plot them
seed_mesh = numpy.array([seed['cell'] for seed in seeds])

# 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)
Пример #4
0
#vis.contourf(data[field], levels=10)
#pylab.show()

with open("data.pickle", 'w') as f:
    pickle.dump(data, f)

# PERFORM THE INVERSION
################################################################################
#~ # Generate a prism mesh
mesh = fatiando.mesh.prism_mesh(x1=x1, x2=x2, y1=y1, y2=y2, z1=z1, z2=z2,
                                nx=75, ny=45, nz=45)
 
# Set the seeds and save them for later use
log.info("Setting seeds in mesh:")
seeds = []
seeds.append(gplant.get_seed((1100, 1500, 1300), 500, mesh))
seeds.append(gplant.get_seed((3900, 1500, 2100), 1000, mesh))

# Make a mesh for the seeds to plot them
seed_mesh = numpy.array([seed['cell'] for seed in seeds])

fig = mlab.figure()
fig.scene.background = (1, 1, 1)
p = vis.plot_prism_mesh(seed_mesh, style='surface')
p = vis.plot_prism_mesh(model, style='wireframe')
mlab.outline(color=(0,0,0), extent=extent)
mlab.show()
 
# Run the inversion
results = gplant.grow(data, mesh, seeds, compactness=10**(4), power=3,
                      threshold=10**(-4), norm=2, neighbor_type='reduced',
Пример #5
0
#vis.contourf(data[field], levels=10)
#pylab.show()

with open("data.pickle", 'w') as f:
    pickle.dump(data, f)

# PERFORM THE INVERSION
################################################################################
#~ # Generate a prism mesh
mesh = fatiando.mesh.prism_mesh(x1=x1, x2=x2, y1=y1, y2=y2, z1=z1, z2=z2,
                                nx=25, ny=15, nz=15)
 
# Set the seeds and save them for later use
log.info("Setting seeds in mesh:")
seeds = []
seeds.append(gplant.get_seed((1100, 1500, 1300), 500, mesh))
seeds.append(gplant.get_seed((3900, 1500, 2100), 1000, mesh))

# Make a mesh for the seeds to plot them
seed_mesh = numpy.array([seed['cell'] for seed in seeds])

#fig = mlab.figure()
#fig.scene.background = (1, 1, 1)
#p = vis.plot_prism_mesh(seed_mesh, style='surface')
#p = vis.plot_prism_mesh(model, style='wireframe')
#mlab.show()
 
# Run the inversion
results = gplant.grow(data, mesh, seeds, compactness=10**(4), power=3,
                      threshold=10**(-3), norm=2, neighbor_type='reduced',
                      jacobian_file=None, distance_type='radial')
Пример #6
0
seedpoints.append(((901, 701, 301), 1300))
seedpoints.append(((901, 1201, 301), 1300))
seedpoints.append(((901, 1701, 301), 1300))
seedpoints.append(((901, 2201, 301), 1300))
seedpoints.append(((901, 2701, 301), 1300))
seedpoints.append(((901, 3201, 301), 1300))
seedpoints.append(((901, 3701, 301), 1300))
seedpoints.append(((2951, 3951, 301), 1200))
seedpoints.append(((2951, 3951, 701), 1200))
seedpoints.append(((2001, 2751, 301), 1500))
seedpoints.append(((2501, 2751, 301), 1500))
seedpoints.append(((3001, 2751, 301), 1500))
seedpoints.append(((3501, 2751, 301), 1500))
seedpoints.append(((4001, 2751, 301), 1500))

seeds = [gplant.get_seed(point, dens, mesh) for point, dens in seedpoints]

# Make a mesh for the seeds to plot them
seed_mesh = numpy.array([seed['cell'] for seed in seeds])

# Plot the seeds ontop of the data
pylab.figure()
#pylab.title()
pylab.axis('scaled')
vis.contourf(data['gzz'], 10)
cb = pylab.colorbar()
cb.set_label(r'$E\"otv\"os$', fontsize=14)
xs = []
ys = []
for p, dens in seedpoints:
    xs.append(p[0])