SLClient

Hi all,

New to the mailinglist, so probably breaking all kinds of format rules, but here goes:

I am trying to get data from a seedlink server into a trace-object.....Looking at the tests which are available in the source, I came up with the following snippet:

#! /usr/bin/python

from obspy.seedlink.slclient import SLClient from obspy import UTCDateTime

slClient = SLClient(loglevel='error')
slClient.slconn.setSLAddress("localhost:18000")
slClient.multiselect = ("NL_HGN:BHZ")
# set a time window from 2 min - 1 min in the past dt = UTCDateTime() slClient.begin_time = (dt - 120.0).formatSeedLink() slClient.end_time = (dt - 60.0).formatSeedLink() slClient.verbose = 1
slClient.initialize()
slClient.run()

a = slClient.slconn.collect()
print slClient.begin_time, slClient.end_time print a print a.getSequenceNumber() b = a.getTrace() print b

which results in the following output:

SLClient comes with ABSOLUTELY NO WARRANTY
SLClient: packet seqnum: 6627495: blockette type: 1000
SLClient: packet seqnum: 6627517: blockette type: 1000
SLClient: packet seqnum: 6627535: blockette type: 1000
SLClient: packet seqnum: 6627556: blockette type: 1000
SLClient: packet seqnum: 6627575: blockette type: 1000
SLClient: packet seqnum: 6627594: blockette type: 1000
SLClient: packet seqnum: 6627612: blockette type: 1000
SLClient: packet seqnum: 6627636: blockette type: 1000
2014,3,27,12,29,41 2014,3,27,12,30,41
<obspy.seedlink.slpacket.SLPacket object at 0x2fcfc50>
6627655
NL.HGN.02.BHZ | 2014-03-27T12:30:49.094538Z - 2014-03-27T12:30:58.969538Z | 40.0 Hz, 396 samples

So, I do get data into a trace object, just not the data I am looking for (see timewindow). Looks like I am getting only the last packet available in the server.

Any help appreciated

Gert-Jan

Gert-Jan van den Hazel