How to use the function in segyio

To help you get started, we’ve selected a few segyio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / seismic-deeplearning / interpretation / deepseismic_interpretation / View on Github external
def read_segy(filename):
    Read in a SEGY-format file given a filename

        filename: input filename

        numpy data array and its info as a dictionary (tuple)

    """"Loading data cube from {filename}")

    # Read full data cube
    data =

    # Read meta data
    segyfile =, "r")
    print("  Crosslines: ", segyfile.xlines[0], ":", segyfile.xlines[-1])
    print("  Inlines:    ", segyfile.ilines[0], ":", segyfile.ilines[-1])
    print("  Timeslices: ", "1", ":", data.shape[2])

    # Make dict with cube-info
    # TODO: read this from segy
    # Read dt and other params needed to do create a new
    data_info = {
        "crossline_start": segyfile.xlines[0],
        "inline_start": segyfile.ilines[0],
        "timeslice_start": 1,
        "shape": data.shape,
github softwareunderground / subsurface / subsurface / io / View on Github external
Seismic: Seismic data object based on xarray.DataArray.
    with as sf:
        sf.mmap()  # memory mapping
        xlines = sf.xlines
        ilines = sf.ilines
        samples = sf.samples
        header = sf.bin
    coords = [ 
        ("ilines", ilines), 
        ("xlines", xlines),
        ("samples", samples)

    cube =
    return Seismic(cube, coords=coords)