any plans to add a FULL SEED reader to obspy

Hi All,

The subject says it all. Are there any plans to add full seed reading capability to ObsPy? Or maybe it's already there and I missed it in the docs?



Hi Paul,

both, the data and the metadata part can be read, although separately:

Reading data:
>>> import obspy
>>> st ="full_seed_file")

Reading the metadata:
>>> from obspy.xseed import Parser
>>> p = Parser("full_seed_file")

All the best!


Greatings Lion,

Thanks, however a waveform read for the full seed volume obtained from the DMC as a test just now did not seem to work at all (with the obspy tar.gz I downloaded last week).

pauls-MacBook-Air-2:induced paulf$ python2.7
Python 2.7.3 (default, Oct 22 2012, 06:12:32)
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.58)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import obspy.core
>>> st = read('Ohio_events_Nov3-.86526.seed')
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
NameError: name 'read' is not defined
>>> st ='events_nov3-.86526.seed')
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy-0.0.0_tar_zipball-py2.7-macosx-10.7-x86_64.egg/obspy/core/", line 247, in read
     st.extend(_read(file, format, headonly, **kwargs).traces)
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy-0.0.0_tar_zipball-py2.7-macosx-10.7-x86_64.egg/obspy/core/util/", line 151, in wrapped_func
     result = func(filename, *args, **kwargs)
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy-0.0.0_tar_zipball-py2.7-macosx-10.7-x86_64.egg/obspy/core/", line 288, in _read
     headonly=headonly, **kwargs)
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy-0.0.0_tar_zipball-py2.7-macosx-10.7-x86_64.egg/obspy/core/util/", line 413, in _readFromPlugin
     list_obj = readFormat(filename, **kwargs)
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy-0.0.0_tar_zipball-py2.7-macosx-10.7-x86_64.egg/obspy/mseed/", line 178, in readMSEED
     info = util.getRecordInformation(mseed_object)
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy-0.0.0_tar_zipball-py2.7-macosx-10.7-x86_64.egg/obspy/mseed/", line 245, in getRecordInformation
     info = _getRecordInformation(f, offset=offset)
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy-0.0.0_tar_zipball-py2.7-macosx-10.7-x86_64.egg/obspy/mseed/", line 305, in _getRecordInformation
     while[6] != 'D':
IndexError: string index out of range

Lion Krischer wrote:

Hi Paul,

interesting. Can you send me the file? It works just fine when using one of the files from the ObsPy example data page:

In [1]: import obspy

In [2]: print"")
3 Trace(s) in Stream:
EE.VSU..BHE | 2010-02-06T04:52:17.645000Z - 2010-02-06T05:05:40.745000Z

20.0 Hz, 16063 samples

EE.VSU..BHN | 2010-02-06T04:52:13.695000Z - 2010-02-06T05:05:30.195000Z

20.0 Hz, 15931 samples

EE.VSU..BHZ | 2010-02-06T04:52:10.645000Z - 2010-02-06T05:05:35.745000Z

20.0 Hz, 16103 samples



Thanks for the file!

That was actually quite a serious bug. For the last couple of releases ObsPy was not able to read fullSEED files whose first data record does not have dataquality "D"...I have no idea why the issue did not crop up before.

It is fixed in the latest master, the relevant commit:

If you do not which to update your whole ObsPy installation you can simply change the single line as indicated by the previous url. To find the offending file, simply type

import obspy.mseed.util; print obspy.mseed.util.__file__

at any Python prompt and it should print the file's location (replace .pyc with .py).