up [pdf]
from rsf.proj import *

Flow('lag.asc',None,
     '''
     echo 1 2 3 96 97 98 99 100 101
     n1=9 n=100,10 data_format=ascii_int
     in=$TARGET
     ''')
Flow('lag','lag.asc','dd form=native')

Flow('flt.asc','lag',
     '''
     echo 0.42937  0.0515658 0.0174064 
     0.0142803 0.0335131 0.0808008 0.254267 0.35213  0.155342
     n1=9 data_format=ascii_float
     in=$TARGET lag=$SOURCE a0=-1.60935
     ''')
Flow('flt','flt.asc','dd form=native')

Flow('spike',None,'spike n1=30 n2=30 k1=20 k2=10')
Flow('inp2',None,'spike n1=30 n2=30 k1=15 k2=20')
Flow('inp','spike flt inp2','helicon filt=${SOURCES[1]} | add  ${SOURCES[2]}')

Flow('div', 'inp flt','helicon adj=0 div=1 filt=${SOURCES[1]}')
Flow('div2','div flt','helicon adj=1 div=1 filt=${SOURCES[1]}')

def grey(title):
    return 'grey pclip=100 wantaxis=n crowd=0.88 title="%s" ' % title

Plot('inp',grey('input'))
Plot('div',grey('input/filter'))
Plot('div2',grey('(input/filter)/filter\''))
Plot('con2','div2',
     '''
     contour wantaxis=n pclip=100 c0=0.15 nc=10 dc=0.05 crowd=0.88
     title=contours
     ''')

Result('inv-laplace','inp div div2 con2','TwoRows')

End()

sfdd
sfspike
sfhelicon
sfadd
sfgrey
sfcontour