Tuesday, May 19, 2009

Processing a Line from Scratch

This topic is precipitated by a very good suggestion made by Walid Osman on 25 March 2009,
on the seisunix listserver group. Mr. Osman wrote:


http://www.freeusp.org/RaceCarWebsite/TechTransfer/Tutorials/Processing_2D/Data/2D_Land_data_2ms.tgz
this is a link for Seismic 2 D line which we can share knowledge and efforts to start working on it and it will be a good tutorial for all of us.
so would you help each other amd start this project step by step.



Glen Reynolds wrote:

I loaded the geometry with:

0. suwind < shots.su key="trid" min="1">data.su
- strips the auxiliaries

1. gawk -f geom.awk Line_001.XPS < myheaders.txt
makes all the headers. It is a script that loads the SPS,RPS and XPS files
and writes sx,sy,selev,sstat,gx,gy,gelev,gstat,offset in that order, as
tab-separated text. It's at the bottom of this note.

2a. wc < myheaders.txt
2b. surange < data.su
- confirms we have the right number of headers - both commands return 70782

3a. a2b myheaders.bin
- makes the geometry binary - note that the filesize is 4*9*70782=2548152,
which is correct (9 headers in my implementation at 4 bytes per float for
binary storage)

3b. sushw < data.su infile=myheaders.bin
key=sx,sy,selev,sstat,gx,gy,gelev,gstat,offset >data_with_geom.su
- merges geometry into the trace headers. use "key=key1,key2,..." as the
infile=binary method in sushw's help doesn't work





GEOM.AWK
----------------------------------------------
BEGIN{
FIELDWIDTHS="1 16 8 1 2 4 4 4 2 4 9 10 6 3 6"

while(getline < "Line_001.SPS"){
if($1=="S"){
ep=$3
sx[ep]=$11
sy[ep]=$12
selev[ep]=$13
stats[ep]=$6
#print ep,sx[ep],sy[ep],selev[ep],stats[ep]
}
}

while(getline < "Line_001.RPS"){
if($1=="R"){
rp=$3+0.0
gx[rp]=$11
gy[rp]=$12
gelev[rp]=$13
gstat[rp]=$6
#print rp,gx[rp],gy[rp],gelev[rp],gstat[rp]
}
}
FIELDWIDTHS="1 6 4 1 1 16 8 1 4 4 1 16 8 8 1"
OFMT="%.8g"
OFS="\t"
}
/X/{

fldr=$3;ep=$7;
ch1=$9;ch2=$10;
r1=$13+0.0;r2=$14
for(i=r1;i<=r2;i++){
ox=gx[i]-sx[ep];oy=gy[i]-sy[ep]
cdpx=(sx[ep]+gx[i])/2
cdpy=(sy[ep]+gy[i])/2
print

sx[ep],sy[ep],selev[ep],stats[ep],gx[i],gy[i],gelev[i],gstat[i],sqrt(ox^2+oy^2)
}
}

So, please post furthur comments as replies to this post.
Welcome to The Seismic Un*x User, a blogspace for posting materials related to the CWP/SU:Seismic Un*x
open source seismic processing and research environment.