Hi
I'm trying to use ObsPy to convert some GCF files into SEG-Y, however I'm running into problems when the number of samples in a trace is larger than 32767. It seems the problem occurs while trying to write the header.
The error output is:
>>> print stream
1 Trace(s) in Stream:
Seq. No. in line: 1 | 2013-01-24T11:15:00.000000Z - 2013-01-24T11:19:59.995000Z | 200.0 Hz, 60000 samples
>>> stream.write(out, format='SEGY')
File "/usr/lib/python2.7/dist-packages/obspy/core/stream.py", line 1418, in write
writeFormat(self, filename, **kwargs)
File "/usr/lib/python2.7/dist-packages/obspy/segy/core.py", line 432, in writeSEGY
segy_file.write(filename, data_encoding=data_encoding, endian=byteorder)
File "/usr/lib/python2.7/dist-packages/obspy/segy/segy.py", line 228, in write
self._write(file, data_encoding=data_encoding, endian=endian)
File "/usr/lib/python2.7/dist-packages/obspy/segy/segy.py", line 268, in _write
self.binary_file_header.write(file, endian=endian)
File "/usr/lib/python2.7/dist-packages/obspy/segy/segy.py", line 411, in write
file.write(pack(format, getattr(self, name)))
struct.error: 'h' format requires -32768 <= number <= 32767
So the question is, can I specify the header to be written with some other format than 'h' and how do I do this
regards Peter