equinor / segyio

Fast Python library for SEGY files.
Other
471 stars 213 forks source link

I want to know which data represent final_clusters? Thanks in anticipation #522

Closed farooqad0 closed 1 year ago

farooqad0 commented 2 years ago

I want to know which data represent final_clusters? Thanks in anticipation


spec = segyio.spec()
file = 'segy_attribute_classifications_run2.segy'
spec.format = 1
spec.xline = 193
spec.iline = 189
spec.offsets = [0]
spec.samples = np.unique(final_values[:,2])
spec.ilines = np.unique(final_values[:,0])
spec.xlines = np.unique(final_values[:,1])
with segyio.create(file, spec) as f:
    ix = len_ilines*len_xlines
    f.trace[:ix] = final_clusters[:ix]
    hdx = 0
    for ilno in spec.ilines:
        for xlno in spec.xlines:
            f.header[hdx] = {segyio.TraceField.INLINE_3D: int(ilno),
                             segyio.TraceField.CROSSLINE_3D: int(xlno),
                             segyio.TraceField.offset:0}
            hdx = hdx+1

c = segyio.open(file, 'r+')
da-wad commented 2 years ago

Is this code from nitishkannan23's issue?

ErlendHaa commented 1 year ago

Closing due to inactivity