Esempio n. 1
0
from fatiando.seismic import epicenter, traveltime
from fatiando import vis, logger, utils, inversion, gridder, ui
import cPickle as pickle

area = (0, 10, 0, 10)
vp, vs = 2, 1
model = [Square(area, props={'vp': vp, 'vs': vs})]

with open('dados.pickle') as f:
    src, rec_points, ttr, error, ttr_true = pickle.load(f)

srcs, recs = utils.connect_points(src, rec_points)

shape = (50, 50)
xs, ys = gridder.regular(area, shape)
goals = epicenter.mapgoal(xs, ys, ttr, recs, vp, vs)

pyplot.figure()
ax = pyplot.subplot(1, 1, 1)
pyplot.axis('scaled')
pyplot.suptitle("Escolha a estimativa inicial")
vis.map.contourf(xs, ys, goals, shape, 50)
vis.map.points(rec_points, '^r')
vis.map.points(src, '*y')
initial = ui.picker.points(area, ax, marker='*', color='k')
if len(initial) > 1:
    log.error("Don't be greedy! Pick only one initial estimate")
    sys.exit()
initial = initial[0]

nsolver = inversion.gradient.newton(initial)
Esempio n. 2
0
from fatiando.seismic import epicenter, traveltime
from fatiando import vis, utils, inversion, gridder, ui
import cPickle as pickle

params = __import__('exercicio2_entrada')
damping = params.norma_minima

with open(params.dados) as f:
    recs, src, ttr, error = pickle.load(f)

area = (0, 100000, 0, 100000)
vp, vs = 2000, 1000

shape = (50, 50)
xs, ys = gridder.regular(area, shape)
goals = epicenter.mapgoal(xs, ys, ttr, recs, vp, vs, damping=damping)

pyplot.figure()
ax = pyplot.subplot(1, 1, 1)
pyplot.axis('scaled')
pyplot.suptitle("Escolha a estimativa inicial")
vis.map.contourf(xs, ys, goals, shape, 30)
vis.map.points(recs, '^r')
vis.map.points(src, '*y')
inicial = ui.picker.points(area, ax, marker='*', color='k')[0]

solver = inversion.gradient.newton(initial=inicial)
result = epicenter.flat_earth(ttr, recs, vp, vs, solver, damping=damping)
estimate, residuals = result
predicted = ttr - residuals
Esempio n. 3
0
pyplot.figure()
ax = pyplot.subplot(1, 1, 1)
pyplot.axis('scaled')
pyplot.suptitle("Escolha o valor de referencia")
vis.map.points(recs, '^r')
vis.map.points(src, '*y')
xref, yref = ui.picker.points(area, ax, marker='*', color='w')[0]
ref = {'x': xref, 'y': yref}

shape = (50, 50)
xs, ys = gridder.regular(area, shape)
goals = epicenter.mapgoal(xs,
                          ys,
                          ttr,
                          recs,
                          vp,
                          vs,
                          equality=equality,
                          ref=ref)

pyplot.figure()
ax = pyplot.subplot(1, 1, 1)
pyplot.axis('scaled')
pyplot.suptitle("Escolha a estimativa inicial")
vis.map.contourf(xs, ys, goals, shape, 30)
vis.map.points(recs, '^r')
vis.map.points([[xref, yref]], '*w', label="Referencia")
vis.map.points(src, '*y')
inicial = ui.picker.points(area, ax, marker='*', color='k')[0]

solver = inversion.gradient.newton(initial=inicial)
Esempio n. 4
0
from fatiando.mesher.dd import Square
from fatiando.seismic import epicenter, traveltime
from fatiando import vis, logger, utils, inversion, gridder, ui
import cPickle as pickle
area = (0, 10, 0, 10)
vp, vs = 2, 1
model = [Square(area, props={'vp':vp, 'vs':vs})]

with open('dados.pickle') as f:
    src, rec_points, ttr, error, ttr_true = pickle.load(f)
    
srcs, recs = utils.connect_points(src, rec_points)

shape = (50, 50)
xs, ys = gridder.regular(area, shape)
goals = epicenter.mapgoal(xs, ys, ttr, recs, vp, vs)
    
pyplot.figure()
ax = pyplot.subplot(1, 1, 1)
pyplot.axis('scaled')
pyplot.suptitle("Escolha a estimativa inicial")
vis.map.contourf(xs, ys, goals, shape, 50)
vis.map.points(rec_points, '^r')
vis.map.points(src, '*y')
initial = ui.picker.points(area, ax, marker='*', color='k')
if len(initial) > 1:
    log.error("Don't be greedy! Pick only one initial estimate")
    sys.exit()
initial = initial[0]
    
nsolver = inversion.gradient.newton(initial)
Esempio n. 5
0
from fatiando.seismic import epicenter, traveltime
from fatiando import vis, utils, inversion, gridder, ui
import cPickle as pickle

params = __import__('exercicio2_entrada')
damping = params.norma_minima

with open(params.dados) as f:
    recs, src, ttr, error = pickle.load(f)
    
area = (0, 100000, 0, 100000)
vp, vs = 2000, 1000

shape = (50, 50)
xs, ys = gridder.regular(area, shape)
goals = epicenter.mapgoal(xs, ys, ttr, recs, vp, vs, damping=damping)

pyplot.figure()
ax = pyplot.subplot(1, 1, 1)
pyplot.axis('scaled')
pyplot.suptitle("Escolha a estimativa inicial")
vis.map.contourf(xs, ys, goals, shape, 30)
vis.map.points(recs, '^r')
vis.map.points(src, '*y')
inicial = ui.picker.points(area, ax, marker='*', color='k')[0]

solver = inversion.gradient.newton(initial=inicial)
result = epicenter.flat_earth(ttr, recs, vp, vs, solver, damping=damping)
estimate, residuals = result
predicted = ttr - residuals
                               
Esempio n. 6
0
    
area = (0, 100000, 0, 100000)
vp, vs = 2000, 1000

pyplot.figure()
ax = pyplot.subplot(1, 1, 1)
pyplot.axis('scaled')
pyplot.suptitle("Escolha o valor de referencia")
vis.map.points(recs, '^r')
vis.map.points(src, '*y')
xref, yref = ui.picker.points(area, ax, marker='*', color='w')[0]
ref = {'x':xref, 'y':yref}

shape = (50, 50)
xs, ys = gridder.regular(area, shape)
goals = epicenter.mapgoal(xs, ys, ttr, recs, vp, vs, equality=equality, ref=ref)

pyplot.figure()
ax = pyplot.subplot(1, 1, 1)
pyplot.axis('scaled')
pyplot.suptitle("Escolha a estimativa inicial")
vis.map.contourf(xs, ys, goals, shape, 30)
vis.map.points(recs, '^r')
vis.map.points([[xref, yref]], '*w', label="Referencia")
vis.map.points(src, '*y')
inicial = ui.picker.points(area, ax, marker='*', color='k')[0]

solver = inversion.gradient.newton(initial=inicial)
result = epicenter.flat_earth(ttr, recs, vp, vs, solver, equality=equality, ref=ref)
estimate, residuals = result
predicted = ttr - residuals