SEG2 to SEGY loosing info

Hello,

I am trying to conver my SEG2 files ( from geometrics) to SEGY. What I’ve done is read the SEG2 and then write it as SEGY
filename = ‘113.dat’
su_file = read(filename, format = ‘SEG2’)
su_file.write(filename[:3] + ‘.sgy’,format = ‘SEGY’)

However in doing so im loosing part of the header, specifically the offsets ( maybe more but that is what i need to use).
I dont find any extra variable to add to either read or write to improve this.

Ideas ?

Thanks

I don’t know if SEG2 and SEGY support the same headers. If they do, you can copy the dictionary from trace.stats.seg2 to trace.stats.segy. Otherwise you need to copy the headers individually. Alternatively, find another software for this conversion which automatically preserves headers.

Hi, no headers are not the same, that’s why copying them does not work.
I ended up solving it with segyio.
Thanks

I think I also remember something about SEG2 having weird extended headers that aren’t even standardized or something like that, and I’m not sure we even read those. It’s just not the most well thought out data formats, sadly