# problems with Seismic Unix in Obspy

**URL:** https://discourse.obspy.org/t/problems-with-seismic-unix-in-obspy/95
**Category:** Users Mailing List Archive
**Tags:** archive
**Created:** [January 10, 2012, 8:28pm UTC](https://discourse.obspy.org/t/problems-with-seismic-unix-in-obspy/95 "2012-01-10T20:28:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![schiemenz](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/s/839c29/32.png) [@schiemenz](https://discourse.obspy.org/u/schiemenz)
#### Post date: [January 10, 2012, 8:28pm UTC](https://discourse.obspy.org/t/problems-with-seismic-unix-in-obspy/95/1 "2012-01-10T20:28:26Z")

</div>

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

---

<div class="post-metadata">

### Author: ![LionKrischer](https://discourse.obspy.org/user_avatar/discourse.obspy.org/lionkrischer/32/219_2.png) [@LionKrischer](https://discourse.obspy.org/u/LionKrischer)
#### Post date: [January 11, 2012, 8:11am UTC](https://discourse.obspy.org/t/problems-with-seismic-unix-in-obspy/95/2 "2012-01-11T08:11:08Z")

</div>

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
