import os
from rsfproj import *
def greym(title):
return '''
sfdd form=native |sfcut n1=60 |sfwindow n1=875|sfput d1=0.004 d2=25 o2=0| sfagc|
sfgrey xinch=6 yinch=8 clip=2.5 grid2=y g2num=1.0 parallel2=n
label1="Time" unit1="s" label2="Shot location" unit2="m"
labelsz=6.0 titlesz=6.0 title="%s"
''' % (title)
def greym1(title):
return '''
sfdd form=native |sfcut n1=125 |sfwindow n1=875|sfput d1=0.004 d2=25 o2=0| sfagc|
sfgrey xinch=6 yinch=8 clip=2.5 grid2=y g2num=1.0 parallel2=n
label1="Time" unit1="s" label2="Shot location" unit2="m"
labelsz=6.0 titlesz=6.0 title="%s"
''' % (title)
Plot('F2a','saga_data.rsf',greym(''))
Plot('F2b','saga_mult.rsf',greym1(''))
Plot('F2c','saga_srme.rsf',greym(''))
Plot('F2d','saga_Bayes3D.rsf',greym(''))
Flow('diff-data-srme',['saga_data.rsf','saga_srme.rsf'], \
' sfmath a=${SOURCES[1]} output="input-a"')
Flow('diff-data-bayes',['saga_data.rsf','saga_Bayes3D.rsf'], \
' sfmath a=${SOURCES[1]} output="input-a"')
Flow('diff-srme-bayes',['saga_srme.rsf','saga_Bayes3D.rsf'], \
' sfmath a=${SOURCES[1]} output="input-a"')
Flow('noise',['saga_data.rsf','saga_Bayes3D.rsf','saga_Bayes3D_mult.rsf'], \
' sfmath a=${SOURCES[1]} b=${SOURCES[2]} output="input-(a+b)"')
Plot('diff-data-srme',greym1('diff-data-srme'))
Plot('diff-data-bayes',greym1('diff-data-bayes'))
Plot('diff-srme-bayes',greym1('diff-srme-bayes'))
Plot('bayes-mult','saga_Bayes3D_mult.rsf',greym1('bayes mult'))
Plot('noise',greym1('noise'))
labels = (
(6.6,7.25,''),
(7.0,3.0,'')
)
nlabels = len(labels)
annot = []
for i in range(nlabels):
annot.append('annot%d' % i)
Plot(annot[i],None,
'''
box x0=%g y0=%g label="%s"
xt=0.5 yt=0.4 lab_fat=0
boxit=1 size=0.2 pointer=1 x_oval=0.0 y_oval=0.0
''' % labels[i])
Plot('antNone',None,'box x0=6.85 y0=5.7 label="" xt=0.0 yt=0.0 lab_fat=0 boxit=1 \
size=0.0 pointer=1 x_oval=0.0 y_oval=0.0')
Result('Figure2-a',['F2a']+annot,'Overlay')
Result('Figure2-b',['F2b']+annot,'Overlay')
Result('Figure2-c',['F2c']+annot,'Overlay')
Result('Figure2-d',['F2d']+annot,'Overlay')
Result('Figure2-e',['diff-data-srme']+['antNone'],'Overlay')
Result('Figure2-f',['diff-data-bayes']+['antNone'],'Overlay')
Result('Figure2-g',['diff-srme-bayes']+['antNone'],'Overlay')
Result('Figure2-h',['bayes-mult']+['antNone'],'Overlay')
Result('Figure2-i',['noise']+['antNone'],'Overlay')
End() |