from rsf.proj import *
Flow('mod',None,
'''
sigmoid n1=200 d2=.008 n2=200 | smooth rect1=3 diff1=1 adj=y | smooth rect1=3
''')
Result('mod','grey title=Model')
Flow('mkaa','mod','kirchnew adj=0 v0=1.5')
Flow('kaa','mkaa','kirchnew adj=1 v0=1.5')
Flow('msto','mod','pad n2=400 | cosft sign2=1 | stolt vel=-1.5 pad=500 | cosft sign2=-1 | window n2=200')
Flow('sto','msto','pad n2=400 | cosft sign2=1 | stolt vel=1.5 pad=500 | cosft sign2=-1 | window n2=200')
Flow('mpha','mod','pad n2=400 | cosft sign2=1 | gazdag vel=1.5 inv=y pad=500 | cosft sign2=-1 | window n2=200')
Flow('pha','mpha','pad n2=400 | cosft sign2=1 | gazdag vel=1.5 inv=n pad=500 | cosft sign2=-1 | window n2=200')
Flow('mvel','mod','pad beg2=100 end2=100 | velcon vel=0.75 adj=n | window f2=100 n2=200')
Flow('vel','mvel','pad beg2=100 end2=100 | velcon vel=0.75 adj=y | window f2=100 n2=200')
Flow('stk','msto','kirchnew adj=1 v0=1.5')
Flow('stp','msto','pad n2=400 | cosft sign2=1 | gazdag vel=1.5 inv=n pad=500 | cosft sign2=-1 | window n2=200')
Flow('stv','msto','pad beg2=100 end2=100 | velcon vel=0.7 adj=y | window f2=100 n2=200')
titles = {'kaa':'Kirchhoff',
'sto':'Stolt',
'pha':'Phase Shift',
'vel':'Velocity Continuation',
'stp':'Stolt -> Phase Shift',
'stk':'Stolt -> Kirchhoff',
'stv':'Stolt -> Velocity Continuation'}
Flow('spec','mod','spectra all=y | scale axis=1')
for case in titles.keys():
Flow('spec'+case,case,'spectra all=y | scale axis=1')
Plot(case,'grey title="%s" ' % titles[case])
Plot('spec'+case,['spec'+case,'spec'],
'''
cat axis=2 ${SOURCES[1]} | dots labels="recon:model" label1=Frequency dots=0 labelsz=10 titlesz=12
''')
Result('vlc'+case,[case,'spec'+case],'SideBySideAniso')
if not case in Split('stp stk stv'):
Result(case,'m'+case,'grey title="%s Modeling" ' % titles[case])
End() |