up [pdf]
from rsf.proj import *

filters = {
    'lines': [1,-1],
    'oscil': [1,1],
    'best': [1.0001,.0001,-1],
    'parab': [-0.5,1,-0.5],
    'seis': [.3333,-1,1,-.3333]
    }

input = [0,0,0,0,0.5,0,1,0.5,1,0,0,0,0,0,0]

def filter(filt):
    return ('echo %s in=$TARGET n1=%d esize=0 data_format=ascii_float' %
            (string.join(map(str,filt),' '),len(filt)))

Flow('in0.asc',None,filter(input))
Flow('in','in0.asc','dd form=native')
for case in filters.keys():
    name = 'm'+case
    Flow(case+'0.asc',None,filter(filters[case]))
    Flow(case,case+'0.asc','dd form=native')
    Flow(name,['in',case],'miss1 filtin=${SOURCES[1]}')
    Result(name,[case,name,'in'],
           '''
           pad n1=%d |
           cat axis=2 ${SOURCES[1:3]} |
           dots labels=filter:interp:given
           dots=2 connect=0 gaineach=0 overlap=1.30 labelsz=14
           ''' % len(input))

###########################################################################

End()

sfdd
sfmiss1
sfpad
sfcat
sfdots