from rsf.proj import *
from math import *
import srpmig
par = {
'nx':2133, 'dx':0.01143, 'ox':3.05562,
'nz':1201, 'dz':0.00762, 'oz':0.,
'nt':1500, 'dt':0.008, 'ot':0.,
'ns':500, 'ds':150., 'os':10925.,
'nh':348, 'dh':75., 'oh':0.
}
par['ft2km'] = 0.0003048
par['dsm'] = par['ds']*par['ft2km']
par['osm'] = par['os']*par['ft2km']
par['dhm'] = par['dh']*par['ft2km']
par['ohm'] = par['oh']*par['ft2km']
migvfile = 'sigsbee2a_migvel.sgy'
Fetch(migvfile,'sigsbee')
Flow('dmvel tmvel dm.head dm.bhead',migvfile,
'''
segyread
tape=$SOURCE
tfile=${TARGETS[1]}
hfile=${TARGETS[2]}
bfile=${TARGETS[3]}
''',stdin=0,local=1)
Flow('mvel','dmvel',
'''
scale rscale=%(ft2km)g |
put o1=%(oz)g d1=%(dz)g label1=Depth unit1=km
o2=%(ox)g d2=%(dx)g label2=Distance unit2=km
''' % par,local=1 )
Result('mvel',
'''
grey color=j allpos=y title= scalebar=y
barlabel=Velocity barunit=km/s
label1=Depth unit1=km label2=Lateral unit2=km
barreverse=y pclip=100 screenratio=0.375 screenht=6.5
''',local=1)
data = 'sigsbee2a_nfs.sgy'
Fetch(data ,'sigsbee')
Flow('ddata tdata dd.head dd.bhead',data,
'''
segyread
tape=$SOURCE
tfile=${TARGETS[1]}
hfile=${TARGETS[2]}
bfile=${TARGETS[3]}
''',stdin=0,local=1)
Flow('tss','tdata','dd type=float | headermath output="%(os)g + fldr*(%(ds)g)" | window' % par,local=1)
Flow('tsi','tss','math output=input/%(ds)g' % par,local=1)
Flow('too','tdata','dd type=float | headermath output="offset" | window',local=1)
Flow('toi','too','math output=input/%(dh)g' % par,local=1)
Flow('tos','toi tsi','cat axis=2 space=n ${SOURCES[1]} | transp | dd type=int',local=1)
Flow('sraw','ddata tos','intbin head=${SOURCES[1]} xkey=0 ykey=1',local=1)
Flow('shots','sraw',
'''
put label1=Time unit1=s
d2=0.075 o2=0.0 label2=Offset
d3=0.150 o3=10.925 label3=Shot |
mutter half=false t0=1.0 v0=6.0 |
put d2=%(dhm)g o2=%(ohm)g unit2=km d3=%(dsm)g o3=%(osm)g unit3=km
''' % par,local=1)
par.update({'s1':6., 's2':12., 's3':18., 'zero':0})
Plot('shot1','shots','window n3=1 min3=%g | grey wantframenum=y title=Shot' % par['s1'],local=1)
Plot('shot2','shots','window n3=1 min3=%g | grey wantframenum=y title=Shot' % par['s2'],local=1)
Plot('shot3','shots','window n3=1 min3=%g | grey wantframenum=y title=Shot' % par['s3'],local=1)
Result('shotimg','shot1 shot2 shot3','SideBySideAniso',local=1)
Result('zero','shots','window n2=1 min2=0 | grey title=Zero',local=1)
par.update({'nss':500, 'jss':1, 'fss':0})
Flow('shot','shots','window n3=%(nss)d f3=%(fss)d j3=%(jss)d' % par,local=1)
par.update({'nwt':751, 'dwt':0.0833333})
par.update({'nw':600, 'jw':1, 'ow':1})
par.update({'nmx':2133, 'dmx':0.01143, 'omx':3.05562})
par.update({'jsx':1, 'jsz':1})
srpmig.fwaveslow('shot','mvel',par)
Plot('rwav',
'''
window | math output="abs(input)" | real |
grey title=Wavefield
label1=Frequency unit1=Hz label2=Distance unit2=km
''',local=1,view=1)
Flow('img cig','stra rtra slow',
'''
srmig3 nrmax=20 dtmax=5e-05 eps=0.01 --readwrite=y verb=y ompnth=1
tmx=16 rwf=${SOURCES[1]} slo=${SOURCES[2]} cig=${TARGETS[1]}
itype=o
''',split=[4,500,[0,1]],reduce='add')
Flow('img2','img','window | transp | put label1=Depth unit1=km label2=Lateral unit2=km',local=1)
Result('image','img2','grey title="PSPI wave equation image"',local=1)
Result('agc','img2','agc rect1=600 rect2=400 | grey title="PSPI wave equation image"',local=1)
Flow('imgsigsbee','img','window --out=stdout',local=1)
End() |