up [pdf]
from rsfproj import *
import math

Flow('spike1',None,
     'spike n1=275 n2=1 d2=0.008 nsp=4 k1=101,151,201,251 mag=-1,1,-1,1')
Flow('spike2',None,
     'spike n1=275 n2=1 d2=0.008 nsp=5 k1=39,89,139,189,239 mag=-1,1,-1,1,-1')

for case in (1,2):
    spike = 'spike%d' % case
    trace = 'trace%d' % case
    zero = 'zero%d' % case
    imp = 'imp%d' % case
    mig = 'mig%d' % case
    mod = 'mod%d' % case
    h = 0.25*(2-case)
    Flow(zero,None,
         'spike n1=275 n2=100 n3=1 n4=1 d2=0.008 o2=-0.8 nsp=0 o4=%g' % h)
    Flow(trace,spike,'ricker1 frequency=40')
    Flow(imp,[zero,trace],
         'cat axis=2 ${SOURCES[1]} ${SOURCES[0]} | smooth rect1=3 rect2=5')
    Plot(imp,'grey pclip=100 title="Data (h=%g km)" ' % h)
    Flow(mig,imp,'preconstkirch vel=2')
    Plot(mig,'grey title=Image ')
    h = 0.25*(case-1)
    Flow(mod,mig,'preconstkirch vel=2 inv=y zero=y nh=1 h0=%g dh=0' % h)
    Plot(mod,'grey title="Data (h=%g km)" ' % h)

Result('yalei1','imp1 mod1 mig1','SideBySideAniso',vppen='txscale=1.5')
Result('yalei2','mod2 imp2 mig2','SideBySideAniso',vppen='txscale=1.5')

End()

sfspike
sfricker1
sfcat
sfsmooth
sfgrey
sfpreconstkirch