up [pdf]
from rsf.proj import *

def Grey(data,name):
    Result(data,
           '''
           grey title=" %s " 
           title=" " 
           '''%name)

def Color(data,name):
    Result(data,
           '''
           grey color=j title=" %s "
           scalebar=y title=""
           '''%name)

##############
# Clean data  
##############
Flow('sigmoid',None,
     '''
     sigmoid d1=.004 n1=200 d2=.008 n2=200 taper=n |
     smooth rect1=3 diff1=1 | smooth rect1=3
     ''')
Grey('sigmoid','sigmoid')

##############
# Noise data
##############

Flow('noise',None,
     '''
     sigmoid d1=.004 n1=200 d2=.008 n2=200  taper=no |
     smooth rect1=3 diff1=1 | smooth rect1=3 |
     noise seed=2011 var=4.e-7 
     ''')
Grey('noise','noisy')

#########################################
# Dip estimation based on Riesz transform
#########################################

Flow('nriesz','noise','bandpass fhi=60 |riesz order=10')
Flow('nrt','nriesz','window n3=1')
Flow('nrx','nriesz','window f3=1 | scale dscale=-1')

Grey('nrt','time  componet')
Grey('nrx','space componet')
re=5
Flow('rizdip','nrx nrt','divn den=${SOURCES[1]} rect1=%d rect2=%d'%(re,re))
Color('rizdip','Riesz transform Dip')

#############################
# Dip estimation based on PWD
#############################
ns0=5 # smoothing radius

Flow('dip','noise','bandpass fhi=60 | dip rect1=%d rect2=%d' % (ns0,ns0))
Color('dip','PWD Dip')

End()

sfsigmoid
sfsmooth
sfgrey
sfnoise
sfbandpass
sfriesz
sfwindow
sfscale
sfdivn
sfdip