PWP wiki processor

SuHeaderModify

| StartPage | WikiPages | AdditionalFiles |

Modifying Segy Headers with Seismic Unix

This page describes the usage of Seismic Unix for modifying header values in a seismic section (eg: adding offset information to a section that has none). For a detailed discussion of Seismic Unix, see the SU documentation and archives at »http://www.cwp.mines.edu/cwpcodes/

The following procedure adds offset information to a segy file that doesn't contain any. Its best intended for a seismic section that does not have a regular shot spacing.

segyread tape=segyfile.sgy endian=0

sugethw key=tracl,offset output=geom > traceInfo.txt

a2b < su_trace_offsets.txt > su_trace_offsets.bin

segyread tape=segyfile.sgy endian=0 > sufile.su
sushw < sufile.su infile=su_trace_offsets.bin key=tracl,offset |
segyhdrs |
segywrite tape=segyoutput.sgy endian=0

If the segy file has a regular shot spacing, it is much easier to add offsets to the file using sushw. This example sets the offset of the first trace to 20, and the next to 70 (20+50), then 130, and so on. The two numbers set in the "b" array correspond to the keywords set in "key". Therefore it is processing every trace. The "endian=0" flag is necessary on a small endian machine such as linux on an intel / amd computer.

#!/bin/bash
segyread tape=segyfile.sgy endian=0 > sufile.su
sushw < sufile.su key=offset,tracl a=20, b=50,1 |
segyhdrs |
segywrite tape=segyoutput.sgy endian=0

   (Powered by PWP Version 1-4-3 )