How to merge SEGY file

How to merge SEGY file

The SEG Yfile format is one of several standards developed by the Society of Exploration Geophysicists for storing geophysical data.

The official standard SEG-Y consists of the following components:

  • a 3200-byte EBCDIC descriptive reel header record
  • a 400-byte binary reel header record
  • trace records consisting of
    • a 240-byte binary trace header
    • trace data

We can describe a SEG-Y structure file like picture below :

In this post, I try to describe how to merge/join some of SEG-Y file using Linux. Before we do join/merge SEG-Y file, we must check dt (sampling time) and ns (number of sample) of our SEGY file. We can check this variable in binary header at byte location 17-18 (dt header) and 21-22 (ns header). Header dt and ns from our SEG-Y file must equal. We can merge/join SEG-Y file with dd and cat command in Linux.

Example, we have 3 SEG-Y file with name : file1.sgy, file2.sgy and file3.sgy. This is steps how to merge this 3 SEG-Y file :

  • remove header text (3200 byte) and binary header (400 byte) from second SEG-Y file (file2.sgy).

Use this command : dd if=file2.sgy of=tmp_file2.sgy skip=1 bs=3600

  • remove header text (3200 byte) and binary header (400 byte) from third SEG-Y file (file3.sgy).

Use this command : dd if=file3.sgy of=tmp_file3.sgy skip=1 bs=3600

  • merge SEG-Y file with cat command : cat file1.sgy tmp_file2.sgy tmp_file3.sgy > merge_file.sgy

This is a simple method how merge SEG-Y file in Linux. If you have other method, please share..

Source :

Add a Comment

Your email address will not be published. Required fields are marked *