up [pdf]
from rsf.proj import *

def plot(title):
    return 'grey wantaxis1=n label1=Sample label2=Trace title="%s" ' % title

Flow('make',None,'make n1=100 n2=20')
Plot('make',plot('original'))

Flow('hole mask','make','hole maskout=${TARGETS[1]}')
Plot('hole',plot('gapped'))

Flow('pq','hole mask','twodip2 mask=${SOURCES[1]} verb=y gauss=n')

Plot('dip1','pq','window n3=1 | ' + plot('first dip'))
Plot('dip2','pq','window f3=1 | ' + plot('second dip'))

for prec in [0,1]:
    miss = 'miss%d' % prec

    Flow(miss,'hole mask pq',
         'planemis2 dip=${SOURCES[2]} mask=${SOURCES[1]} verb=y prec=%d' % prec)
    Plot(miss,plot('restored'))

    Result('hole%d' % prec,['make','hole','dip1','dip2',miss],
           'SideBySideAniso',vppen='txscale=2')

End()

sfmake
sfgrey
sfhole
sftwodip2
sfwindow
sfplanemis2