up [pdf]
from rsfproj import *

Flow('model',None,
     '''
     spike n1=201 d1=0.02 k1=20,40,60,80,121,141,161,181
     mag=1,-1,1,-1,-1,1,-1,1 nsp=8 |
     boxsmooth rect1=6
     ''')

Flow('vel0','model','math output=1.5')
Flow('vel1','model',
     '''
     math output="0.5*(x1+0.01)" |
     math output="1.5*sqrt((exp(input)-1)/input)"
     ''')

Flow('empty','model','scale dscale=0')

labels = "Model:::::::::::Synthe-:tic data:::::::::::Stack"

for alpha in [0,1]:
    vel = 'vel%d' % alpha + sfsuffix
    nmo = 'nmoalfa%d' % alpha
    strat = 'strat%d' % alpha + sfsuffix
    Flow(nmo,['model',vel],
         '''
         spray axis=2 n=20 o=0.6 d=0.16 |
         inmo velocity=${SOURCES[1]} half=n
         ''')
    Flow(strat,[nmo+sfsuffix,vel],
         'nmo velocity=${SOURCES[1]} half=n str=0 | stack')
    Result(nmo,['model','empty',nmo+sfsuffix,'empty',strat],
           '''
           cat axis=2 ${SOURCES[1:5]} |
           dots dots=0 yreverse=1 gaineach=0 labels="%s" overlap=1.85
           title="alpha=%g"
           ''' % (labels,0.5*alpha))

End()

sfspike
sfboxsmooth
sfmath
sfscale
sfspray
sfinmo
sfnmo
sfstack
sfcat
sfdots