up [pdf]
from rsf.proj import *
import sigs,fdmod,spmig

# ------------------------------------------------------------
par=sigs.param() # Sigsbee2A parameters

par['verb']='y'
par['eps']=0.1
par['nrmax']=3
par['dtmax']=0.00005
par['tmx']=16

par['jw']=1

par['nw']=400
par['ow']=1

#par['nw']=200
#par['ow']=3

#par['nw']=4
#par['ow']=3

par['nx']=par['nx']/3
par['dx']=par['dx']*3
lox=3.32
nnx=500

fdmod.param(par) # plotting parameters
par['labelattr']=' wantaxis=n '

# ------------------------------------------------------------
# prepare velocity
sigs.getmigvel('velo',par)
sigs.getstrvel('vstr',par)

for i in ('velo','vstr'):
    Result(i,fdmod.cgrey('color=j allpos=y bias=1.5',par))

# prepare slowness
spmig.slowness('slow','velo',par)
Flow('sd','slow','window squeeze=n n3=2 j3=244')

Flow('s0','slow','window')                       # migrate from surface
Flow('s1','slow','window squeeze=n      f3=244') # migrate from datum
Flow('s2','s1',  'window squeeze=n n3=400 j3=2') # migrate from datum (window)
for i in range(3):
    Result('s'+str(i),'window | transp |'
           + fdmod.cgrey('color=j allpos=y bias=0.221',par))

# ------------------------------------------------------------
spmig.param(par) # shot-record migration parameters
# ------------------------------------------------------------

# prepare data
sigs.getdata('data',par)
sigs.makeshots('shot','data',par)

par['ns']=5
par['fs']=10
par['js']=20
Flow('swin','shot','window n3=%(ns)d f3=%(fs)d j3=%(js)d' % par)

# wavelet
Flow('wav',None,'spike nsp=1 mag=1 k1=1 n1=%(nt)d d1=%(dt)g o1=%(ot)g' % par)
Result('wav','window n1=500 |' +fdmod.waveplot('',par))

# surface SR wavefields
spmig.wflds ('dos','dor','wav','swin',par)
# datumed SR wavefields
spmig.datum3('dfs','dfr','sd','dos','dor',par)
# windowed wavefield
Flow('dxs','dfs','window squeeze=n min1=%g n1=%g' % (lox,nnx))
Flow('dxr','dfr','window squeeze=n min1=%g n1=%g' % (lox,nnx))

# ------------------------------------------------------------
# migration
par['misc']='itype=o'
spmig.imagePW3('jo','joc','s1','dxs','dxr',par)
Result('jo','window | transp |'
       + fdmod.cgrey('pclip=97',par))

End()

sfsegyread
sfscale
sfput
sfgrey
sfwindow
sfmath
sftransp
sfspray
sfdd
sfheadermath
sfcat
sfintbin
sfmutter
sfspike
sfgraph
sffft1
sfsrsyn
sfzomig3
sfsrmig3

data/sigsbee/sigsbee2a_migvel.sgy
data/sigsbee/sigsbee2a_stratigraphy.sgy
data/sigsbee/sigsbee2a_nfs.sgy