Problem with obspy.io.xseed.Parser

Hi all

I’m trying to read the response for a station from a SEED file, and I’m having some problems. I’ve attached the relevant file.

The specific error looks like this:

from obspy.io.xseed import Parser
parser = Parser(“20100411191712.BK.HOPS.BHZ.seed”)
Traceback (most recent call last):
File “”, line 1, in
File “/apps/developers/libraries/python-libs/1.6/1/bit-64-canopy-2.1.3/lib/obspy/obspy/io/xseed/parser.py”, line 106, in init
self.read(data)
File “”, line 2, in read
File “/apps/developers/libraries/python-libs/1.6/1/bit-64-canopy-2.1.3/lib/obspy/obspy/core/util/decorator.py”, line 298, in _map_example_filename
return func(*args, **kwargs)
File “/apps/developers/libraries/python-libs/1.6/1/bit-64-canopy-2.1.3/lib/obspy/obspy/io/xseed/parser.py”, line 189, in read
self._parse_seed(data)
File “/apps/developers/libraries/python-libs/1.6/1/bit-64-canopy-2.1.3/lib/obspy/obspy/io/xseed/parser.py”, line 688, in _parse_seed
raise SEEDParserException("Expecting 000001V ")

I should note that I’m running Python 2.7.13. Any help you can give me would be much appreciated. Apologies in advance if it turns out to be a not obspy related problem.

Thanks
Joshua Williams

3rd Year PhD Student
School of Earth and Environment
University of Leeds
UK

20100411191712.BK.HOPS.BHZ.seed (28 KB)

From a quick glance, I think you're looking at a mini SEED file without

station information?

In addition the file seems to be cropped at the end..

In [1]: from obspy import read

In [2]: print(read('20100411191712.BK.HOPS.BHZ.seed'))
/home/megies/git/obspy/obspy/io/mseed/headers.py:828:
InternalMSEEDWarning: readMSEEDBuffer(): Last record only has 1 byte(s)
which is not enough to constitute a full SEED record. Corrupt data?
Record will be skipped.
  warnings.warn(_w, InternalMSEEDWarning)
1 Trace(s) in Stream:
BK.HOPS..BHZ | 2010-04-11T19:17:12.748100Z - 2010-04-11T19:27:12.748100Z

40.0 Hz, 24001 samples

T

Hi Tobias

Thanks for the quick reply. Interesting, this should be a SEED file with response information within it, I’ll get in touch with the data centre I got this from

Thanks
Josh

Hi Tobias,

I got different messages from yours, please see below.

st = read(‘D:/20100411191712.BK.HOPS.BHZ.seed’)

C:\Users\young\AppData\Local\Continuum\Anaconda2\lib\site-packages\obspy\io\mseed\util.py:654: UserWarning: Record contains a fractional seconds (.0001 secs) of 14621 - the maximum strictly allowed value is 9999. It will be interpreted as one or more additional seconds.

category=UserWarning)

Out[2]:

1 Trace(s) in Stream:

BK.HOPS…BHZ | 2010-04-11T19:17:12.748100Z - 2010-04-11T19:27:12.748100Z | 40.0 Hz, 24001 samples

Maybe you could find some clues out of it…

Best,

Youngman

Hi Youngman,

this warning sometimes showing up when it shouldn't (nothing wrong with
the file actually, just the endian being guessed correctly on second
attempt only) is a known issue and the fix is already in the development
branches and will be in next release.

more info see https://github.com/obspy/obspy/pull/1988

cheers,
T