In this example, we will demonstrate how to change the byte format when writing a Segy file. We will be modifying the code from Creating a virtual seismic dataset and writing it to disk as a Segy file.
By default, the INTGeo API creates Segy files using the standard Segy format by the byte offset.
We are going to change the header format so that the INLINE offset is at 21 (offset index 20) and the XLINE offset is at 25 (offset index 24).
In the LogoSeismicData class, a header mapping needs to be added to the list in getLookupObjects() that contains the new desired format.
First, the standard segy header mapping is built and then the offsets for INLINE and XLINE header fields are changed to the desired offset.
With the new changes added, the resulting format looks like the following:
If you don't want to define the header byte format programmatically, you can do it dynamically by using a descriptor file. This is demonstrated in the code below. The descriptor file used in this example can be downloaded at the bottom of this page.
To create a descriptor file for your current byte format, you can use the code below.