bulk_request

Hallo,

I am trying to contact the BGR Web Services to get a big amount of different seismograms and/or traces. The seismograms and /or traces refer to an event list I mad by myself. The list gives me time, date, coordinates (N, E), depth to work with.

First try was to get the traces with ‘get_waveforms’. Because there is a big amount of data I created a txt file and want to call the data with this file,

Below I listed the commands that I am using and afterwards the txt file (simple version just to show the structur).

import obspy

from obspy.clients.fdsn import Client
client = Client(“BGR”)

from obspy import UTCDateTime

st = client.get_waveforms_bulk(“request.txt”) //using my path or being in correct folder

request.txt :

SX WERN * HHZ 2017-02-26T01:50:12 2017-02-26T01:50:42
SX WERN * HHZ 2005-12-27T15:40:08 2005-12-27T15:40:38

I get the following error:

Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib/python2.7/dist-packages/obspy/clients/fdsn/client.py”, line 914, in get_waveforms_bulk
data=bulk.encode(‘ascii’, ‘strict’))
File “/usr/lib/python2.7/dist-packages/obspy/clients/fdsn/client.py”, line 1346, in _download
raise FDSNException(msg, server_info)
obspy.clients.fdsn.header.FDSNException: Bad request. If you think your request was valid please contact the developers.
Detailed response of server:

Error 400: Bad Request
invalid number of stream components in line 1
Usage details are available from /fdsnws/dataselect/1/
Request:
/fdsnws/dataselect/1/query
Request Submitted:
2017-08-28T08:56:06.228712
Service Version:
1.1.0

May some one can help my with my problem.

Thanks in advance
S

Gesendet mit Telekom Mail - kostenlos und sicher für alle!

request (109 Bytes)

Hello s.f.schotte,

it is a strange thing: For me your commands including bulk file work fine
without problems!

First I copied content of your bulk file to my directory:

sfunke@sfunke-HP-ProBook:~$ head request.txt
SX WERN * HHZ 2017-02-26T01:50:12 2017-02-26T01:50:42
SX WERN * HHZ 2005-12-27T15:40:08 2005-12-27T15:40:38
sfunke@sfunke-HP-ProBook:~$

Second I started ObsPy:

sfunke@sfunke-HP-ProBook:~$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import obspy

from obspy.clients.fdsn import Client

from obspy import UTCDateTime

client = Client("BGR")

Third I requested data without problems:

st = client.get_waveforms_bulk("request.txt")

print(st)

2 Trace(s) in Stream:
SX.WERN..HHZ | 2005-12-27T15:39:41.047000Z - 2005-12-27T15:40:46.837000Z |
100.0 Hz, 6580 samples
SX.WERN..HHZ | 2017-02-26T01:50:07.367500Z - 2017-02-26T01:50:41.997500Z |
100.0 Hz, 3464 samples

Could you check it once more? Probably requested server was in a inproper
state last days?

Regards
Sigward Funke