up [pdf]
from rsfproj import *

def impulse(h0,h1,f1,tpow,title):
    return '''
    spike n1=275 n2=201 n3=1 n4=1 d1=.004 d2=.008 o2=-.8 k1=150 k2=100 o4=%g |
    preconstkirch vel=2 |
    math output="cos(40*(abs(x2)&x1))^6*input" |
    preconstkirch vel=2 inv=y zero=y nh=1 h0=%g dh=0.25 |
    window n1=120 f1=%d | pow pow1=%g |
    grey pclip=99 title="%s"
    ''' % (h0,h1,f1,tpow,title)

Result('sergey',None,impulse(0,0.5,120,-2,'Inverse(DMO+NMO)'))
Result('frocca',None,impulse(0.5,0,  0, 0,'Rocca'))

Flow('spike',None,
     '''
     spike n1=275 n2=201 d1=.004 d2=.008 o2=-.8 n3=1 n4=1 o4=0.5
     nsp=7 k1=35,70,105,140,175,210,245 k2=101,101,101,101,101,101,101 |
     smooth rect1=3 rect2=3
     ''')

Result('Cos0','spike',
       '''
       preconstkirch vel=2 inv=y zero=y nh=1 h0=0.5 dh=0.25 |
       grey title=Constant_offset
       ''')
Result('Cos1','spike','preconstkirch vel=2 | grey title=Constant_offset')

Result('coffs','spike',
       '''
       dmo velhalf=1 h=0.5 adj=n |
       grey title=Cheops_after_NMO
       ''')
Result('dmatt','spike',
       '''
       dmo velhalf=1 h=0.5 adj=y |
       grey title=Roccas_smiles
       ''')

End()

sfspike
sfpreconstkirch
sfmath
sfwindow
sfpow
sfgrey
sfsmooth
sfdmo