seismic_deep_learning icon indicating copy to clipboard operation
seismic_deep_learning copied to clipboard

Error while trying to open the segy file

Open 576dhunu opened this issue 3 years ago • 3 comments

SEG Y file './Seismic_data.sgy' of 2220 bytes is too short. This error message is shown while trying to open the segyfile with the help of segpy.reader.create_reader

576dhunu avatar May 26 '22 08:05 576dhunu

I have the same error

ThomasMGeo avatar Jun 24 '22 17:06 ThomasMGeo

@576dhunu @ThomasMGeo , I managed to make it run after using segpy=2.1.0 with the following command.

filename = "Seismic_data.sgy"
    
with open(filename, 'rb') as segy:
    segy_reader = segpy.reader.create_reader(segy)
    data = np.zeros((segy_reader.num_inlines(), segy_reader.num_trace_samples(1), segy_reader.num_xlines()))
    for inline_num, xline_num in segy_reader.inline_xline_numbers():
        trace_index = segy_reader.trace_index((inline_num, xline_num))        
        inline_start = segy_reader.inline_numbers()[0]
        xline_start  = segy_reader.xline_numbers()[0]        
        data[inline_num-inline_start,:,xline_num-xline_start] = segy_reader.trace_samples(trace_index)

leocd91 avatar Aug 05 '23 03:08 leocd91

文件超过一定大小后,实际上下载的是html界面 需要手动跳转下载

izyq avatar Nov 15 '23 15:11 izyq