SYNOPSIS
PERL PROGRAM NAME:
AUTHOR: Juan Lorenzo (Perl module only)
DATE:
DESCRIPTION:
Version:
USE
NOTES
Examples
SYNOPSIS
SEISMIC UNIX NOTES SETBHED - SET the fields in a SEGY Binary tape HEaDer file, as would be
produced by segyread and segyhdrs
setbhed par= [optional parameters]
Required parameter:
none
Optional parameters:
bfile=binary output binary tape header file
par= =parfile
Set field by field, if desired:
jobid= job id field
lino= line number (only one line per reel)
reno= reel number
format= data format
... etc....
To set any binary header field, use sukeyword to find out
the appropriate keyword, then use the getpar form:
keyword=value to set keyword to value
Notes:
As with all other programs in the CWP/SU package that use getpars,
(GET PARameters from the command line) a file filled with such
statments may be included via option par=parfile. In particular, a
parfile created by "bhedtopar" may be used as input for the program
"setbhed".
The binary header file that results from running segyread may have the
wrong byte order. You will need to use "swapbhed" to change the byte,"
order before applying this program.
Example:
segyread tape=yourdata.segy bfile=yourdata.b > yourdata.su
If
bhedtopar < yourdata.b | more
shows impossible values, then apply
swapbhed < yourdata.b > swapped.b
then apply
bhedtopar < swapped.b | more
bhedtopar < swapped.b outpar=parfile
hand edit parfile, and then apply
setbhed par=parfile bfile=swapped.b > new.b
then apply
segywrite tape=fixeddata.segy bfile=new.b < yourdata.su
Caveat: This program breaks if a "short" isn't 2 bytes since
the SEG-Y standard demands a 2 byte integer for ns.
Credits:
CWP: John Stockwell 11 Nov 1994
User's notes
V0.0.1 -untested
CHANGES and their DATES
September 3, 2021
Import packages
instantiation of packages
Encapsulated hash of private variables
sub Step
collects switches and assembles bash instructions by adding the program name
sub note
collects switches and assembles bash instructions by adding the program name
sub clear
sub bfile
sub format
sub jobid
sub keyword
sub lino
sub outpar
sub par
sub reno
sub tape
sub get_max_index
max index = number of input variables -1