How to easily update the binary header
Update your binary header using Perl
The perl script has been written with a minimum of libraries and should run without modification
under unix.
Perl is fast, in less than a second, a hundred files can be checked. Here are the steps you need to follow.
- Download the program updatebin.pl
If your processing sequence doesn't fit, send me (Eric) a request and I'll add your proposal!
- Edit the script for the following:
- Edit #!/usr/global/bin/perl -Tw to the location of your perl compilier
- Make a list of files you want to check in the file junk and run the program!
Three different options can be accessed from the command line. You can overide the datum with a -d for
datum, -v for replacement velocity and -t for the total number of traces. If you don't use the -t command
the program will count the number of traces for you. This does take a bit of time. Here's how to run
the program to set the datum to 0 (sea level), the replacement velocity to 3600 meters per second and
to let the prgram count the total number of traces.
ls *sgy > junk
~ekeyser/perl/updatebin.pl -d 0 -v 3600
Datum=0
Vel=3600
Working on line
P172685.BURNT_MALLIK_M3D.f-pstm.200507.ver.sgy P172685 BURNT_MALLIK_M3D
Input Binary Line Header
Reference Number = ""
Line Name =""
SI NS FORMAT sort_code num_traces START_X START_Y START_Z
4000 1250 1 4 60 0 0 0
END_X END_Y END_Z GEOMETRY sxflag encanaflag START_WIND END_WIND
0 0 0 3 91 100 0 0
PEAK AVE RMS TRACE_SORT DATUM VEL MAX_ENSEMBLE AXIS_TRACE
0 0 0 0 0 0 0 1
AXIS_LINE AXIS_TIME PHASE GAIN GAIN_EXP ROTATION CT_1 CT_2 CT_3
2 3 0 0 1 0 0 0 0
I found 20000 traces
Output Binary Line Header
Reference Number = "P172685"
Line Name ="BURNT_MALLIK_M3D"
SI NS FORMAT sort_code num_traces START_X START_Y START_Z
4000 1250 6 4 20000 0 0 0
END_X END_Y END_Z GEOMETRY sxflag encanaflag START_WIND END_WIND
0 0 0 3 92 100 0 0
PEAK AVE RMS TRACE_SORT DATUM VEL MAX_ENSEMBLE AXIS_TRACE
0 0 0 0 0 3600 0 1
AXIS_LINE AXIS_TIME PHASE GAIN GAIN_EXP ROTATION CT_1 CT_2 CT_3
2 3 0 0 1 0 0 0 0
fini --
Note the following corrections were made:
- The Reference number was updated using the first field of the external line name
- The line Name was updated using the second field of the external line name
- the Format code was changed from a 1 to the number 6 (CSEG IEEE 32 bit float)
- the SeisX format flag was changed from 91 to 92 (SeisX 4.0 format)
- The total number of traces was counted and placed in the header (the number 60 changed to 20,000)
You may find the following encana_v100_stack.fmt useful to
manually edit the binary header with SeisX 4.0. Copy this file to your SeisX project. Here's
what this data look likes from (General), (Segy File Viewer). Here's what the viewer looks like for
the above data:
- SeisX 4.0 viewer
- SeisX 4.0 viewer using the encana_v100_stack.fmt template
Yes, you can manually make the changes to your segy file using the encana_v100_stack.fmt template
but it's a whole lot faster and more accurate to use the perl script
Site Owner: Eric Keyser
Last Updated: August 4, 2005