Exemplo n.º 1
0
# Load the exact reflection coefficient
# exact_amplitude = np.loadtxt('sim/reflection.dat').T

pylab.plot(q, 1e4 * r.real * q**2)
pylab.plot(q, 1e4 * r.imag * q**2)

if var.number_measurements == 2:
    var.plot_r_branches()
    var.plot_r_choose(1)
    pylab.show()

    R, _, _ = var.choose(1)

if var.number_measurements > 2:
    var.plot_phase()
    pylab.show()

    R = var.R

from dinv.glm import PotentialReconstruction
from dinv.fourier import FourierTransform

fourier = FourierTransform(var.Q / 2.0, R.real, R.imag, offset=-50)
# fourier.method = fourier.cosine_transform
rec = PotentialReconstruction(250, 4, cutoff=2)
pot = rec.reconstruct(fourier)
x_space = np.linspace(0, 250, 1001)

pylab.plot(x_space, [pot(x) for x in x_space])
pylab.show()