Open EvanBianco opened 5 years ago
I thought we got SEG-2 files (their RAD
, RA1
, RA2
files) from US Radar's software, not SEG-Y?
We did get some files that are named SEG-Y. But we also have RA files for these, so In this case, the SEGY is redundant. I can't confirm if it is SEG-2 or SEG-Y format.
You could try:
from struct import unpack
with open(fname, 'rb') as f:
file_descriptor_block = f.read(32)
first_byte, = unpack(b'B', file_descriptor_block[0:1])
if (first_byte == 0x55) or (first_byte == 0x3a):
print('This is consistent with being a SEG2 file.')
Test some SEGY files from USRadar and make sure the i/o works