up [pdf]
from rsf.proj import *
Flow('velx',None,
     '''
     spike n1=512 d1=5 k1=98 n2=512 d2=5 k2=98 |
     math output="800+0.0001*(x1-1000)*(x1-1000)+0.0001*(x2-1200)*(x2-1200)"
     ''')
Result('velx',
       '''
       grey transp=n pclip=100 screenration=1 color=i
       label1="X" label2="Z" scalebar=y poly=y bias=1000
       unit1= unit2=  title=Vx 
       ''')
Plot('velx',
       '''
       grey transp=n pclip=100 screenration=1 color=i
       label1="X" label2="Z" scalebar=y poly=y bias=1000
       unit1= unit2=  title=Vx 
       ''')
Flow('velz',None,
     '''
     spike n1=512 d1=5 k1=98 n2=512 d2=5 k2=98 |
     math output="700+0.0001*(x2-1200)*(x2-1200)"
     ''')
Result('velz',
       '''
       grey transp=n pclip=100 screenration=1 color=i
       label1="X" label2="Z" scalebar=y poly=y bias=800
       unit1= unit2=  title=Vz 
       ''')
Plot('velz',
       '''
       grey transp=n pclip=100 screenration=1 color=i
       label1="X" label2="Z" scalebar=y poly=y bias=800
       unit1= unit2=  title=Vz 
       ''')
Flow('yita_c',None,
     '''
     spike n1=512 d1=5 k1=98 n2=512 d2=5 k2=98 |
     math output=0.3
     ''')
Result('yita_c',
       '''
       grey transp=n pclip=100 screenration=1 color=i
       label1="X" label2="Z" scalebar=y poly=y bias=0.1
       unit1= unit2=  title=Yita
       ''')
Flow('seta_45',None,
     '''
     spike n1=512 d1=5 k1=98 n2=512 d2=5 k2=98 |
     math output=45
     ''')
Result('seta_45',
       '''
       grey transp=n pclip=100 screenration=1 color=i
       label1="X" label2="Z" scalebar=y poly=y bias=0.1
       unit1= unit2=  title=seta
       ''')
nt=1500
dt=0.001
Flow('source',None,
     '''
     spike n1=%d d1=%g k1=100 | 
     ricker1 frequency=20 
     '''%(2*nt,dt))
Result('source','graph  title="Source Wavelet" ')


Flow('wavffd4_TTI_45_sm',['source','velx','velz','yita_c','seta_45'],
     '''
     ffdantti4b_smsr velx=${SOURCES[1]}  velz=${SOURCES[2]} yita=${SOURCES[3]} seta=${SOURCES[4]} dt=%g nt=%d isx=256 isz=256 nbt=0 nbb=0 nbl=0 nbr=0 
     ct=0.01 cb=0.01 cl=0.01 cr=0.01
     '''%(dt,2*nt) )
Plot('wavffd4_TTI_45_sm',
     ''' 
     window j3=50  |
     grey poly=y label2="Z" label1="X" title="TTI 45"
     yreverse=y transp=n gainpanel=each pclip=100 screenratio=1
     ''',view=1)
Flow('TTI-snapshot','wavffd4_TTI_45_sm','window n3=1 f3=1000')
Result('TTI-snapshot',
     '''
     grey poly=y label2="Z" label1="X" title="TTI 45 degree" screenratio=1
     yreverse=y transp=n gainpanel=all pclip=100 unit1=m unit2=m
     ''')

Flow('snapshot','wavffd4_TTI_45_sm','window j3=300 max3=1.5 | stack axis=3')
Result('snapshot',
       '''
       grey label2="Z" label1="X" title="Fourier Finite Differences" screenratio=1
       yreverse=y transp=n gainpanel=all unit1=m unit2=m
       ''')

Plot('TTI-snapshot',
     '''
     grey poly=y label2="Z" label1="X" title="TTI 45 degree" screenratio=1
     yreverse=y transp=n gainpanel=all pclip=100 unit1=m unit2=m
     ''')
Result('tti','velx velz TTI-snapshot','TwoRows')

Flow('vxc','velx','math output=800')
Flow('vzc','velz','math output=800')
Flow('yic','yita_c','math output=0')
Flow('sc','seta_45','math output=0')
#Flow('wavtti_45_sm',['source','vxc','vzc','yic','sc'],
#Flow('wavtti_try',['source','velx','velz','yita_c','seta_45'],
#     '''
#     ffdtti4 velx=${SOURCES[1]}  velz=${SOURCES[2]} yita=${SOURCES[3]} seta=${SOURCES[4]} dt=%g nt=%d isx=256 isz=256 nbt=0 nbb=0 nbl=0 nbr=0 
#     ct=0.01 cb=0.01 cl=0.01 cr=0.01  
#     '''%(dt,2*nt) )
##     ct=0.01 cb=0.01 cl=0.01 cr=0.01 err=0.04 
#Result('wavtti_45_sm',
#Result('wavtti_try',
#       ''' 
#       window j3=100  |
#       grey poly=y label2="Z" label1="X" title="TTI 45"
#       yreverse=y transp=n gainpanel=each pclip=100 screenratio=1
#       ''' )
#Flow('ttisnapshot','wavtti_45_sm','window n3=1 f3=1000')
#Result('ttisnapshot',
#     '''
#     grey poly=y label2="Z" label1="X" title="TTI 45 degree" screenratio=1
#     yreverse=y transp=n gainpanel=all pclip=100 unit1=m unit2=m
#     ''')

End()

sfspike
sfmath
sfgrey
sfricker1
sfgraph
sfffdantti4b_smsr
sfwindow
sfstack