Example #1
0
def sergey():
  for nrms in [0.0,0.5,1.0]:
    f,p = FakeData.seismicAndSlopes2d2014A(nrms)
    plot(f,cmin=fmin,cmax=fmax,title="input image")
    plot(p,cmin=pmin,cmax=pmax,title="known slopes")
    fname = "f"+str(int(nrms*10))
    pname = "p"
    writeImage(fname,f)
    writeImage(pname,p)
Example #2
0
def slopesPwd():
    f, p = FakeData.seismicAndSlopes2d2014A(nrms)
    pmax = max(abs(min(p)), abs(max(p)))
    pwd = PlaneWaveDestructor(pmin, pmax)
    pwd.setSmoothness(1.5, 0.5)
    pwd.setLateralBias(0.0)  # 0.0 is the default
    pwd.setOuterIterations(10)  # 5 is the default
    q = pwd.findSlopes(f)
    g = pwd.applyFilter(q, f)
    plot(f, cmin=fmin, cmax=fmax, title="input image")
    plot(g, cmin=emin, cmax=emax, title="output image")
    plot(p, cmin=pmin, cmax=pmax, cmap=jet, title="slopes: pwd")
Example #3
0
def slopesPwd():
  f,p = FakeData.seismicAndSlopes2d2014A(nrms)
  pmax = max(abs(min(p)),abs(max(p)))
  pwd = PlaneWaveDestructor(pmin,pmax)
  pwd.setSmoothness(1.5,0.5)
  pwd.setLateralBias(0.0) # 0.0 is the default
  pwd.setOuterIterations(10) # 5 is the default
  q = pwd.findSlopes(f)
  g = pwd.applyFilter(q,f)
  plot(f,cmin=fmin,cmax=fmax,title="input image")
  plot(g,cmin=emin,cmax=emax,title="output image")
  plot(p,cmin=pmin,cmax=pmax,cmap=jet,title="slopes: pwd")
Example #4
0
def compare():
    sigma1, sigma2 = 12, 2
    eps1, eps2 = 2.0, 0.5
    nrms = 0.50
    f, p = FakeData.seismicAndSlopes2d2014A(nrms)
    pwd = PlaneWaveDestructor(-8, 8)
    pwd.setOuterIterations(10)  # 5 is the default
    pwd.setSmoothness(eps1, eps2)
    pa = pwd.findSlopes(f)
    ea = sub(pa, p)
    ga = pwd.applyFilter(pa, f)
    lsf = LocalSlopeFinder(sigma1, sigma2, 8)
    pb = zerofloat(n1, n2)
    lsf.findSlopes(f, pb, None)
    eb = sub(pb, p)
    gb = pwd.applyFilter(pb, f)
    plot(p, cmin=pmin, cmax=pmax, cmap=jet, title="slopes: syn")
    plot(pa, cmin=pmin, cmax=pmax, cmap=jet, title="slopes: pwd")
    plot(pb, cmin=pmin, cmax=pmax, cmap=jet, title="slopes: lsf")
    plot(ea, cmin=0.5 * pmin, cmax=0.5 * pmax, cmap=jet, title="errors: pwd")
    plot(eb, cmin=0.5 * pmin, cmax=0.5 * pmax, cmap=jet, title="errors: lsf")
    plot(ga, cmin=emin, cmax=emax, title="output image: pwd")
    plot(gb, cmin=emin, cmax=emax, title="output image: lsf")
    plot(f, cmin=fmin, cmax=fmax, title="input image")
Example #5
0
def compare():
  sigma1,sigma2 = 12,2
  eps1,eps2 = 2.0,0.5
  nrms = 0.50
  f,p = FakeData.seismicAndSlopes2d2014A(nrms)
  pwd = PlaneWaveDestructor(-8,8)
  pwd.setOuterIterations(10) # 5 is the default
  pwd.setSmoothness(eps1,eps2)
  pa = pwd.findSlopes(f)
  ea = sub(pa,p)
  ga = pwd.applyFilter(pa,f)
  lsf = LocalSlopeFinder(sigma1,sigma2,8)
  pb = zerofloat(n1,n2)
  lsf.findSlopes(f,pb,None)
  eb = sub(pb,p)
  gb = pwd.applyFilter(pb,f)
  plot(p ,cmin=pmin,cmax=pmax,cmap=jet,title="slopes: syn")
  plot(pa,cmin=pmin,cmax=pmax,cmap=jet,title="slopes: pwd")
  plot(pb,cmin=pmin,cmax=pmax,cmap=jet,title="slopes: lsf")
  plot(ea,cmin=0.5*pmin,cmax=0.5*pmax,cmap=jet,title="errors: pwd")
  plot(eb,cmin=0.5*pmin,cmax=0.5*pmax,cmap=jet,title="errors: lsf")
  plot(ga,cmin=emin,cmax=emax,title="output image: pwd")
  plot(gb,cmin=emin,cmax=emax,title="output image: lsf")
  plot(f,cmin=fmin,cmax=fmax,title="input image")