up [pdf]
from rsf.proj import *

Flow('mod',None,
     '''
     sigmoid n1=200 d2=.008 n2=200 |
     smooth rect1=3 diff1=1 adj=1 |
     smooth rect1=3
     ''')

Result('amosmo','mod','grey labelsz=12 title=model')

plots = {'mod':'zoomed model',
         'kir':'nearest neighbor',
         'kne':'reciprocity',
         'kaa':'triangles'}

Flow('mkn','mod','kirchnew adj=n v0=1.5')
Flow('kne','mkn','kirchnew adj=y v0=1.5')

Plot('mkn','grey labelsz=12 title=data')
Plot('kne','grey labelsz=12 title=image')
Result('amormm','mkn kne','SideBySideAniso')

for sw in (1,2):
    for case in ('mod','mkn'):
        img = (case=='mkn')
        branch = '%s%d' % (case,sw)
        Flow(branch,case,'kirchnew adj=%d v0=1.5 sw=%d' % (img,sw))
        Plot(branch,
             '''
             grey labelsz=12 title="%s %s"
             ''' % (('flat','steep')[sw-1],('data','image')[img]))

Result('amormo','mod1 mod2','SideBySideAniso')
Result('amormi','mkn1 mkn2','SideBySideAniso')

Flow('mki','mod',
     '''
     spray axis=2 o=0 n=1 |
     transp plane=24 |
     halfint inv=y adj=n |
     preconstkirch vel=1.5 inv=y aal=n |
     window
     ''')
Flow('kir','mki',
     '''
     spray axis=2 o=0 n=1 |
     preconstkirch vel=1.5 aal=n |
     halfint inv=y adj=y |
     window
     ''')

Flow('mka','mod',
     '''
     spray axis=2 o=0 n=1 |
     transp plane=24 |
     halfint inv=y adj=n |
     preconstkirch vel=1.5 inv=y |
     window
     ''')
Flow('kaa','mka',
     '''
     spray axis=2 o=0 n=1 |
     preconstkirch vel=1.5 |
     halfint inv=y adj=y |
     window
     ''')

for plot in plots.keys():
    Plot(plot+'w',plot,
         '''
         window n1=100 n2=100 f1=50 f2=50 |
         grey Xlabelsz=16 Xtitlesz=20 title="%s"
         ''' % plots[plot])
    Flow(plot+'s',plot,'spectra all=y | scale axis=1')

Result('amosmi','modw kirw knew kaaw','TwoRows')
Result('amospe','mods kirs knes kaas',
       '''
       cat axis=2 ${SOURCES[1:4]} |
       dots yreverse=y labels="model:kirchfast:reciprocity:triangles"
       label1=Frequency unit1=Hz
       ''')

End()

sfsigmoid
sfsmooth
sfgrey
sfkirchnew
sfspray
sftransp
sfhalfint
sfpreconstkirch
sfwindow
sfspectra
sfscale
sfcat
sfdots