from rsf.proj import *
from rsf.prog import RSFROOT
Result('samiss','grey label1=Time unit1=s label2=Offset unit2=km title=" " ')
Flow('datacpx','samiss','rtoc')
Nt=1500
dt=0.004
t0=0
Nx=240
dx=0.0125
x0=0.262
Ntau=Nt
dtau=dt
tau0=t0
Np=800
p0=0.4
dp=(0.8-p0)/Np
Flow('fftdata','datacpx','fft3 axis=1 pad=1 | window n1=750 f1=750')
Result('fftabs-f','fftdata','math output="abs(input)" | real | grey title=" " label1=Frequency unit1=Hz label2=Offset unit2=km')
Flow('fftdatac','fftdata','window n1=300 f1=50')
Flow('dimod-f','samiss','diradon2 ntau=%d dtau=%g tau0=%g np=%d dp=%g p0=%g | math output=input*%g' % (Ntau,dtau,tau0,Np,dp,p0,dx))
Result('dimod-f','grey label1=Time unit1=s label2=Slowness unit2=s/km title=" " ')
Flow('bfio.bin',os.path.join(RSFROOT,'include','bfio.bin'),'/bin/cp $SOURCE $TARGET',stdin=0,stdout=-1)
Flow('fmod-f','fftdatac bfio.bin','radon2 ntau=%d dtau=%g tau0=%g np=%d dp=%g p0=%g fi=1 EL=0 N=128 EPSx1=7 EPSx2=5 EPSk1=7 EPSk2=5 | math output=input*%g' % (Ntau,dtau,tau0,Np,dp,p0,2*dx/Nt))
Result('fmod-f','real | grey label1=Time unit1=s label2=Slowness unit2=s/km title=" " ')
End() |