from rsf.suproj import *
Fetch('31_81_IM.JPG',
server='http://certmapper.cr.usgs.gov',
top='nersl/NPRA/SEISMIC/1981/31_81',
dir='IMAGES')
oodraw = WhereIs('oodraw')
if oodraw:
Result('prevstack','31_81_IM.JPG',
oodraw + ' $SOURCE',stdin=0)
pdfread = WhereIs('acroread') or WhereIs('kpdf') or WhereIs('evince') or \
WhereIs('xpdf') or WhereIs('gv') or WhereIs('open')
if pdfread:
Fetch('31_81_S.PDF',
server='http://certmapper.cr.usgs.gov',
top='nersl/NPRA/SEISMIC/1981/31_81',
dir='DOCUMENTS')
Result('surveylog','31_81_S.PDF',
pdfread + ' $SOURCE')
Fetch('31_81_O.PDF',
server='http://certmapper.cr.usgs.gov',
top='nersl/NPRA/SEISMIC/1981/31_81',
dir='DOCUMENTS')
Result('observerlog','31_81_O.PDF',
pdfread + ' $SOURCE')
segyread = '''
segyread bfile=${TARGETS[1]} hfile=${TARGETS[2]}
tape=$SOURCE endian=%d |
segyclean
''' % (1-little_endian())
rawsegy=['L23535','L23536','L23537']
for file in rawsegy :
Fetch(file+'.SGY',
server='http://certmapper.cr.usgs.gov',
top='nersl/NPRA/SEISMIC/1981/31_81',
dir='DMUX')
Flow([file, file+'.bin', file+'.asc'],
file+'.SGY',segyread,stdin=0)
Flow ('line', rawsegy,
'cat ${SOURCES}',stdin=0)
Flow('list1','line','surange; echo list1 complete',stdout=0)
Flow('list2','line',
'''
suwind count=3000
| sugethw key=fldr,tracf,cdp,cdpt,offset ;
echo list2 complete
''',
stdout=0)
Result('first','line',
'suwind count=3000 | suximage perc=90')
Result('zoomfirst','line',
'''
suwind key=tracl min=1000 max=1250 tmin=0 tmax=3 |
suximage perc=90
''')
Result('firstmovie','line',
'''
suxmovie n2=101 loop=1 fframe=1 dframe=1
title="record %g" perc=20
''')
Result('firstrec24','line',
'''
suwind key=tracl min=2324 max=2424 tmin=0 tmax=6 |
suximage perc=90
''')
Flow ('hdrfile.txt','line',
'sugethw output=geom key=tracl,fldr,tracf')
Flow ('hdrfile1.txt',
'hdrfile.txt InterpText.py spnElev.txt recnoSpn.txt',
'''
./InterpText.py
''',stdin=0)
Flow ('binary_hdrfile1.dat','hdrfile1.txt',
'''
a2b n1=13
''')
keys='ep,sx,sy,gx,gy,cdp,tracf,offset,' \
'selev,gelev,sstat,gstat,tstat'
Flow ('allshots', 'line binary_hdrfile1.dat',
'''
sushw
infile=${SOURCES[1]}
key=%s |
sushw
key=f1
a=0 |
suwind
key=cdp
min=-999998
max=999999 |
suwind
key=ep
min=-999998
max=999999 |
suwind
key=ep
reject=149
''' % keys)
Result('allshots','allshots',
'''
suxmovie n2=96 loop=1 fframe=1 dframe=1
title="allshots record %g" perc=20
''')
Fetch('31_81_PR.SGY',
server='http://certmapper.cr.usgs.gov',
top='nersl/NPRA/SEISMIC/1981/31_81',
dir='PROCESSED')
file='checkstack'
Flow([file, file+'.bin', file+'.asc'],
'31_81_PR.SGY',segyread,
stdin=0)
Result('checkstack','checkstack',
'suximage title="checkstack" perc=90')
Result('zoomcheckstack','checkstack',
'''
suwind tmin=0 tmax=3 |
suximage title="zoom checkstack" perc=90
''')
Flow('allvelfilt_shot','allshots alaskavelfilt.sh',
'./${SOURCES[1]} 100 155')
Result('movie_velfilt','allvelfilt_shot',
'''
suxmovie n2=96 loop=1 fframe=1 dframe=1
title="record %g" perc=20
''')
Result('velfiltrec24','allvelfilt_shot',
'''
suwind key=tracl min=2324 max=2424 tmin=0 tmax=6 |
suximage perc=90
''')
Flow('velfiltcdpsmute','allvelfilt_shot',
'''
susort cdp ep |
sunmo
par=vbruteorig.txt |
sumute
xmute=-5225,-2970,-55,55,2970,5225
tmute=.700,.280,.100,.100,.280,.700
mode=0
key=offset
taper=50 |
sunmo
par=vbruteorig.txt
invert=1
''' )
Result('movie_cdps','velfiltcdpsmute',
'''
suxmovie n2=96 loop=1 fframe=1 dframe=1
title="record %g" perc=20
''')
Result('cdp250-251','velfiltcdpsmute',
'''
suwind key=cdp min=250 max=251 tmin=0 tmax=3 |
suwigb perc=90
''')
Flow('vbrute.txt','vbruteorig.txt velfiltcdpsmute',
'''
./iva.sh
"cmp1=373 numCMPs=1"
${SOURCES[1]} ${TARGETS[0]} ${SOURCES[0]} 7000 100
''',stdout=0,stdin=0)
Flow('velfiltcdpsnmo','velfiltcdpsmute vbrute.txt',
'''
suchw
key1=tstat
key2=offset
a=-200
b=.0861
| sustatic
hdrs=1
sign=1
| supef
maxlag=.2
pnoise=.01
mincor=.25
maxcor=5
| sustatic
hdrs=1
sign=-1
| sunmo
par=${SOURCES[1]}
| sugain
agc=1
wagc=.1
| sumute
xmute=55,2970,5225
tmute=.100,.280,.700
mode=0
key=offset
taper=50
''')
Result('movie_velfiltcdpsnmo','velfiltcdpsnmo',
'''
suxmovie n2=96 loop=1 fframe=1 dframe=1
title="velfiltcdpsnmo record %g" perc=20
''')
Flow('brutestack','velfiltcdpsnmo',
'''
sustack
key=cdp
normpow=1
''')
Result('brutestack','brutestack',
'''
suximage title="brutestack" perc=90
''')
Result('zoombrutestack','brutestack',
'''
suwind tmin=0 tmax=3.0 |
suximage title="brutestack" perc=90
''')
Flow('statics_in','velfiltcdpsnmo',
'''
sufilter f=2,6,50,60 |
suwind tmin=1.0 tmax=3.0 |
suresamp rf=2 comment="upsample to 1 ms"
''')
Flow('sourcestatic.dat recstatic.dat',
'statics_in',
'''
suresstat \
ssol=${TARGETS[0]}
rsol=${TARGETS[1]}
niter=5
ntraces=5280
ntpick=25 comment="samples at 1 ms"
nshot=167
nr=668
nc=636
sfold=96
rfold=96
cfold=48
verbose=1
''',stdout=0)
Result('sourcestatic','sourcestatic.dat',
'xwigb n1=167 title="source static"')
Result('recstatic','recstatic.dat',
'xwigb n1=668 title="receiver static"')
Flow('velfiltcdpsmuterstat',
'velfiltcdpsnmo ' \
'sourcestatic.dat recstatic.dat ' \
'vbrute.txt',
'''
sushw key=tstat a=0
| sushw key=sstat a=0
| sushw key=gstat a=0
| sustatic
hdrs=3
sou_file=${SOURCES[1]}
rec_file=${SOURCES[2]}
ns=167
nr=668
no=96
| sunmo
par=${SOURCES[3]}
invert=1
''')
Flow('vpick.txt','vpickorig.txt velfiltcdpsmuterstat',
'''
./iva.sh
"cmp1=181 cmp2=229 cmp3=277 cmp4=325 cmp5=373
cmp6=421 cmp7=469 cmp8=517 cmp9=565 numCMPs=9"
${SOURCES[1]} ${TARGETS[0]} ${SOURCES[0]} 7000 100
''',stdout=0,stdin=0)
Flow('rstack','velfiltcdpsmuterstat vpick.txt',
'''
sunmo
par=vpick.txt
| sustack
key=cdp
normpow=1
''')
Result('rstack','rstack',
'suximage title="rvstack" perc=90')
Result('zoomrstack','rstack',
'''
suwind tmin=0 tmax=3.0 |
suximage title="rvstack" perc=90
''')
Flow('statics_in1','velfiltcdpsmuterstat vpick.txt',
'''
sufilter f=2,6,50,60 |
suwind tmin=.3 1.0 tmax=3.0 |
sunmo par=vpick.txt |
suresamp rf=2 comment="upsample to 1 ms"
''')
Flow('sourcestatic1.dat recstatic1.dat',
'statics_in1',
'''
suresstat \
ssol=${TARGETS[0]}
rsol=${TARGETS[1]}
niter=5
ntraces=5280
ntpick=25 comment="samples at 1 ms"
nshot=167
nr=668
nc=636
sfold=96
rfold=96
cfold=48
verbose=1
''',stdout=0)
Flow('rstack1',
'velfiltcdpsmuterstat sourcestatic1.dat recstatic1.dat',
'''
sunmo par=vpick.txt
| sushw key=tstat a=0
| sushw key=sstat a=0
| sushw key=gstat a=0
| sustatic
hdrs=3
sou_file=${SOURCES[1]}
rec_file=${SOURCES[2]}
ns=167
nr=668
no=96
| sustack
key=cdp
normpow=1
''')
Result('rstack1','rstack1',
'suximage title="rvrstack" f2=101 perc=90')
Result('zoomrstack1','rstack1',
'''
suwind tmin=0 tmax=3.0 |
suximage title="rvrstack" f2=101 perc=90
''')
Flow('stkvel1.intp2.bin','010_Velocity_Interp_IVA.sh',
'''
./010_Velocity_Interp_IVA.sh
''')
Result('vfile','stkvel1.intp2.bin',
'''
ximage n1=3000 d1=.002 f2=101 d2=1 cmap=rgb11
wclip=8000 bclip=12000
''')
Result('contourvfile','stkvel1.intp2.bin',
'''
xcontour n1=3000 d1=.002 f2=101 d2=1 cmap=rdb11
wclip=8000 bclip=12000
''')
Flow('mig','rstack1 stkvel1.intp2.bin',
'''
sufrac power=.5 sign=1 |
suktmig2d vfile=${SOURCES[1]} dx=55 hoffset=0
verbose=1 dcdp=1 fcdpdata=1 firstcdp=101
''')
Result('mig','mig',
'''
suximage title="mig" perc=90
''')
Result('zoommig','mig',
'''
suwind tmin=0 tmax=3.0 |
suximage title="mig" perc=90
''')
Flow('migps','rstack1',
'''
sumigps
dx=55 dt=.002
tmig=.15,.45,.87,1.36,1.91,2.41,4.31
vmig=7612,8051,9512,12590,12315,15031,15700
nxpad=500 ltaper=20 verbose=1 tmpdir=.
''')
Result('migps','migps',
'''
suximage title="migps" perc=90
''')
Result('zoommigps','migps',
'''
suwind tmin=0 tmax=3.0 |
suximage title="migps" perc=90
''')
End() |