The following are Frequently Asked Questions concerning the DDS Revision Level 3 version of bridge.
If you would like to contribute to this FAQ, please send mail to pgarossino@freeusp.org.
Last updated December 8, 2005
The Basics
Scanning SEGY Headers
2.0 How can I scan my SEGY trace header entries?
2.1 How can I scan my SEGY EBCDIC/ASCII header entries?
2.2 Where can I get a SEG-Y Format description?
2.3 Can bridge deal with SEG-Y Classic Rev 1. formats?
SEGY EBCDIC/ASCII Header Editting
SEGY and Magnetic Tape Devices
4.0 How do I handle SEGY tape input?
4.1 How do I handle SEGY tape output?
4.2 How do I read a multi-tape SEGY dataset?
4.3 How do I create a multi-tape SEGY dataset?
4.4 How do I read multiple SEGY datasets from a single tape?
4.5 Can I read multi-tape datasets from more that 1 tape drive?
4.6 Can bridge_r2 handle 3480 cartridges?
SEGY and 3rd Party Software
5.0 What do I have to do to create a dataset readable by Landmark?
5.1 What do I have to do to create a dataset readable by ProMax?
5.2 What do I have to do to create a dataset readable by GeoQuest?
Header Mapping
6.0 How do I do trace header mapping between SEGY and USP?
6.1 How do I do line header mapping between SEGY and USP?
6.2 How do I access bytes 181 - 240 in the SEGY trace header?
6.3 How do I put data into bytes 181 - 240 in the SEGY trace header?
6.4 How can I map into TVPTnn and TVPVnn entries in the USP trace header?
Header Arithmetic
Trace Padding
8.0 How do I do USP trace padding when reading SEGY data?
8.1 Can I get USP trace padding based on TrcNum and have RecNum be assigned sequential?
8.2 Can I write a SEGY dataset without dead traces?
Handling SEGY Format Variations
9.0 How can I handle non-standard SEGY trace header formats?
9.1 How can I handle auxillary traces, for instance dropping them on the way in from SEGY to USP?
1.1 HOW DO I RUN BRIDGE?
bridge in_data=[] in_format=[] out=[] out_data=[] out_format=[] par=[]
uman bridge
You can also find this information at the DDS website entry for bridge.
You can also use the DDS routine ddscan to examine your SEG-Y header structure. bridge makes it easier to see the spare area as the diff report dumps the spare area cast in each of the available unions [I2, I4, F4IBM, F4].
You could also utilize ddscan to view the header
which will print out a complete listing of USP and SEGY header formats.
Here is a the original SEG-Y format.
Here is the Revision 1 format.
in_format= segy
for the new SEG-Y revision 1 format use:
in_format= segy1
There are 40 cards, 80 columns each (delimited by double quotes). They use the following dictionary definition:
segy_card3200= "C 1 STUFF ON THE FIRST CARD" "C 2 SECOND CARD" ... "C40 THE LAST CARD"
The first 3 columns are usually "Cxx", where xx is the card number.
If you want an "=" in one of the cards, it must be "\" escaped, i.e.
segy_card3200= "C 1 LOW CUT\= 20 Hz" "C 2 ..."If you put this stuff on the command line, you must protect the double quotes from the shell using single quotes.
If you pipe out of bridge and use another device driver such as xcram or dd to output to tape your blocking will be screwed up and chances are you will not be able to read the tape with any other routine or workstation software that is expecting legal SEG-Y format.
when you execute bridge it will ask that you load RE0001 to rst8. It will then read the tape until it encounters a double EOF (EOT) mark. It will then eject the tape and put up a request that you load tape RE0002. All you need to do is insert the RE0002 tape and close the drive door. bridge will sense the drive back online and continue execution. Of course in this example rst8 and the tape names are purely imaginary. In your real life example these will be what ever you are using. Note that the tape names are used only to prompt the user for tape mount and DO NOT need to be correct. You could use '"1 2"' instead and the program would work the same.
bridge par= parameter.file
SEG-Y to USP mapping is accomplished using the DDS mapping syntax:
map:segy:usp.mnemonic= segy_mnemonic
where the appropriate USP or SEG-Y mnemonic is substituted as needed. A complete list of mnemonics is available using the USP hdrdesc command.
Say we have a value in the SEG-Y entry FieldRecNum that I would like mapped into the USP trace header entry RecNum, then use:
map:segy:usp.RecNum= FieldRecNum
USP to SEG-Y mapping is done in an analogous fashion:
map:usp:segy.FieldRecNum= RecNum
segy_NumRec= 1234 segy_NumTrc= 24
If you know which bytes you are interested in accessing life is easy. If you do not then use 2.0 above to examine the trace header spare area and determine what you need to do. In this example let's say that we have data stored in bytes 181-2 and 185-8 that we wish to assign to the USP trace header entries RecNum and DpPtLt.
In the first instance we wish to read a two byte integer so the mapping expression would look like:
which is the first entry in the Spare.I2[] union. These unions use C indexing. That is the first entry is zero as opposed to 1. I know that this is not straight forward for a user, but it is for a programmer, and in this case, since the DDS guys are writing and maintaining bridge, I am not going to complain. So there will be 30 possible entries for the Spare.I2[0-29] untion, 15 for the Spare.I4[0-14] union, 15 for the Spare.F4[0-14] union and 15 for Spare.F4ibm[0-14]
In the second instance we wish to read a four byte entry so the mapping would now be:
which is the second entry in the spare area as decoded using 4 byte logic.
map:usp:segy.Spare.I4[0]= RecNum
would do the trick. You may utilize any of Spare.I2[], Spare.I4[], Spare.F4[] and Spare.F4ibm[] on the left side of the mapping expression. Be careful if you are using the map expression on the command line rather than in the parameter file as the [ is a special character in UNIX and will need to be put in quotes. Here is an example:
bridge in_data= datain in_format=usp out=tmp: out_data=segyout out_format=segy 'map:usp:segy.SpareI2[0]=RecNum'
map:segy:usp.TVPT10= FieldRecNum
If you want to pad on the "x" axis, specify that the "x" axis is dense
by adding the dense.x or dense.2 attribute on the format:
out_format=segy dense.x
Pick a trace header that should go from 1 to size.x by 1 and if it other
than TrcNum, set it to be the x-axis sort header by:
sort.x= TrcNum (which is the default)
This is not necessary for TrcNum since that's the default. Example, if
you want to pad in traces/records for both TrcNum and RecNum then simply
specify
out_format=usp dense.2 dense.3
and dead traces and records will be padded based on filling in missing TrcNum and RecNum values.
So for USP guys/gals, you would need to map something into RecNum and TrcNum that was sequential. With the statements that Jerry indicates above, anytime the sequence was broken a dead trace or record would be padded in. Of course padded traces do not have trace indexing so you may still have some work to do after this step, but at least you can do the padding on the fly on the way in.
sort.x= TrcNum out_format= dense.2 write:out.RecNum= 1 + ordinal(3) edit:out=force.3So here the padding is turned on for the x-axis and sequential numbering is turned on for the y-axis. The t-axis is left unreferenced and the input data is assumed to have an axis definition of axis= t x y which is the default.
edit:in= drop_dead
bridge in_data= uspdataset in_format=usp edit:out= drop_dead out_data_data= stdout: |\ bridge in_data=stdin: in_format=usp out=tmp: out_data= segydataset out_format= segy par= mappingfileHere the first bridge drops dead traces and the second writes SEG-Y data. Of course you could short circuit the first bridge by utilizing:
pad -N uspdataset -R |\ bridge in_data=stdin: in_format=usp out=tmp: out_data= segydataset out_format= segy par= mappingfile
1) find the file that describes the SEGY format to bridge. It is currently located at /home/trcgp/dds/src/lib/dds3/segy.fmt.dds
2) copy segy.fmt.dds into your current working directory the new filename must remain segy.fmt.dds
3) change the lines that describe the format of SrcX, SrcY, GrpX, GrpY from...
NOTE: If you want to change the name of the variable you need to make the change in two places in the segy format definition file. Firstly on the line defining the format and secondly in the section at the head of the trace header format section where the structure is listed.
4) Set the DDS_PATH3 environmental variable to point at this directory:
5) Execute bridge. The customized SEG-Y format will now override the one used to compile bridge.
in_format=segy edit:in= drop_dead
To drop any SEGY trace not having a trace ID of 1 use:
in_format=segy edit:in= drop_dead edit:in= drop_aux
To keep all dead and auxillary traces and drop all seismic traces:
in_format= segy edit:in= drop_live
To keep only the auxillary traces:
in_format=segy edit:in= drop_live edit:in=drop_dead
size.t=< n>
where n is the real number of samples per trace. You can find n by doing a
let it run for a bit then do
od -x < test | more
and count the number of bytes in the trace. You can spot the trace time series by looking for the 256 byte trace header and counting the number of bytes until the next one. Remember a sample is 4 bytes on a Sun/SGI machine and 8 bytes on the cray.
out_format= segy float 4 ieee
The same syntax works for input if you think someone has given you non-standard SEGY floating point data.