obspy.io.segy.core._read_su

_read_su(filename, headonly=False, byteorder=None, unpack_trace_headers=False, **kwargs)[source]

Reads a Seismic Unix (SU) file and returns an ObsPy Stream object.

Warning

This function should NOT be called directly, it registers via the ObsPy read() function, call this instead.

Parameters:
  • filename (str) – SU file to be read.

  • headonly (bool, optional) – If set to True, read only the header and omit the waveform data.

  • byteorder (str or None) – Determines the endianness of the file. Either '>' for big endian or '<' for little endian. If it is None, it will try to autodetect the endianness. The endianness is always valid for the whole file. Defaults to None.

  • unpack_trace_headers (bool, optional) – Determines whether or not all trace header values will be unpacked during reading. If False it will greatly enhance performance and especially memory usage with large files. The header values can still be accessed and will be calculated on the fly but tab completion will no longer work. Look in the headers.py for a list of all possible trace header values. Defaults to False.

Returns:

A ObsPy Stream object.

Example

>>> from obspy import read
>>> st = read("/path/to/1.su_first_trace")
>>> st 
<obspy.core.stream.Stream object at 0x...>
>>> print(st)  
1 Trace(s) in Stream:
... | 2005-12-19T15:07:54.000000Z - ... | 4000.0 Hz, 8000 samples