problems with Seismic Unix in Obspy

Dear list,
I'm having a problem with using Seismic Unix files in Obspy. I have files
that are supposedly in Seismic Unix form, which have been generated by
SPECFEM3D. An example is found at:
/import/segfault-data/schiemenz/0_dz_SU

When I naively try to open the file with Obspy, I get an error:

from obspy.segy.core import readSEGY
st = readSEGY('0_dz_SU')

SEGYError: Unable to determine the endianness of the file. Please specify it.

Regardless of the 'endianness' that I specify, I get the same error:

st = readSEGY('0_dz_SU','<')

NotImplementedError: Extended textual headers are supported yet. Please
contact the developers.

st = readSEGY('0_dz_SU','>')

NotImplementedError: Extended textual headers are supported yet. Please
contact the developers.

... Any idea what's going on?
Thanks,
Alan

Hi Alan,

you are trying to read it as a SEG Y file not a Seismic Unix file.

The easiest way to read SU files is to just use ObsPy's normal read method:

from obspy.core import read
st = read("SU_file.su")

You could also use the obspy.segy.core.readSU() method but since SU has
no file wide headers it does not matter which method you use.

Best wishes,

Lion