obspy.io.segy.segy.SEGYTrace.__init__¶
- SEGYTrace.__init__(file=None, data_encoding=4, endian='>', unpack_headers=False, filesize=None, headonly=False)[source]¶
Convenience class that internally handles a single SEG Y trace.
Parameters: - file Open file like object with the file pointer of the beginning of a trace. If it is None, an empty trace will be created.
- data_encoding
The data sample format code as defined in the binary file header:
- 1:
- 4 byte IBM floating point
- 2:
- 4 byte Integer, two’s complement
- 3:
- 2 byte Integer, two’s complement
- 4:
- 4 byte Fixed point with gain
- 5:
- 4 byte IEEE floating point
- 8:
- 1 byte Integer, two’s complement
Defaults to 4.
- big_endian (bool) True means the header is encoded in big endian and False corresponds to a little endian header.
- unpack_headers (bool) Determines whether or not all headers will be unpacked during reading the file. Has a huge impact on the memory usage and the performance. They can be unpacked on-the-fly after being read. Defaults to False.
- filesize (int) Filesize of the file. If not given it will be determined using fstat which is slow.
- headonly bool
- headonly Determines whether or not the actual data records will be read and unpacked. Has a huge impact on memory usage. Data will not be unpackable on-the-fly after reading the file. Defaults to False.