Skip to content

Can't read specific, but seemingly valid SEG-Y file #577

Open
@TheZappie

Description

I can't read specific, but seemingly valid SEG-Y file. What in segyio is triggering this (and is it an issue with the file or code)?

The file can be reached here: https://drive.google.com/file/d/1MXw_5dqoSYJlMoXWB7BJvqSY75GQnCsQ/view?usp=sharing

from pathlib import Path

path = r"/path/to/AN-A401.sgy"

a = Path(path).stat().st_size - 3600
trace_lenth = 2560 
b = trace_lenth * 4 + 240
assert (a % b == 0)
# asserting that the file length is exactly as it should be

import segyio

segyio.open(path, ignore_geometry=True, mode="r", endian='big')
# yields error: RuntimeError: trace count inconsistent with file size, trace lengths possibly of non-uniform
# Other programs do work, including seisee and obspy.
from obspy.io.segy.core import _read_segy
st = _read_segy(path, format="SEGY")

image

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions