sixty-north / segpy

A Python package for reading and writing SEG Y files.
Other
99 stars 54 forks source link

cannot get the trace header #96

Open muhdamir opened 1 year ago

muhdamir commented 1 year ago

Im having this issue where I couldnt get the trace header

seg_y_dataset = create_reader(segy_in_file, endian='>') 
        for trace_index in seg_y_dataset.trace_indexes():
               trace_header = seg_y_dataset.trace_header(trace_index)

EOFError: Trace header truncated when reading from position 3600 with packer BijectiveHeaderPacker(TraceHeaderRev1)

myak555 commented 9 months ago

The issue seems to be related to handling enums, such as "Trace use". The standard has two valid values 1 (production) and 2 (test). The other similar enum fields are related to vibroseis: correlation, sweep switches, etc.

The unofficial use of 0 (unknown) for enums is common, but somehow is not supported by segpy any longer. Strangely enough, the Enum* classes all have UNKNOWN.

Windows, Python 3.10.