SeisComP3

Table Of Contents

Previous topic

LocSAT

Next topic

NonLinLoc

This Page

RecordStream

RecordStream interface for SeisComP.

Description

SeisComP applications access waveform data through the RecordStream interface. The following tables lists available implementations:

Name Service Prefix Description
SeedLink slink Connects to SeedLink server
ArcLink arclink Connects to ArcLink server
FDSNWS fdsnws Connects to FDSN Web service
File file Reads records from file
SDSArchive sdsarchive Reads records from SeisComP archive (SDS)
ODCArchive odcarchive Reads records from Orpheus archive (ODC)
Memory memory Reads records from memory
Combined combined Combines archive and real-time stream
Balanced balanced Distributes requests to multiple proxy streams
Decimation dec Decimates (resamples) a proxy stream
Resample resample Resamples (up or down) a proxy stream to a given sampling rate

The RecordStream used by an application is either specified on the the commandline (-I URI) or configured through using the parameters recordstream.service and recordstream.source. While the service defines the RecordSteam implementation, the source supplies parameters like a IP address or a file name to use.

FDSNWS

This RecordStream fetches data from a FDSN Web service. The source is read as an URL.

Examples

  • fdsnws://service.iris.edu:80/fdsnws/dataselect/1/query

File

This RecordStream reads data from a file. The source is read as an file path. If the source is set to '-' the data is read from stdin. By default the record type is set to mseed. If a file name extension is available the record type is set as follows:

Extension Record Type
*.xml xml
*.bin binary
*.mseed mseed
*.ah ah

Examples

  • file://-
  • file:///tmp/input.mseed

SDSArchive

This RecordStream reads data from an SeisComP (SDS) archive using the File RecordStream. The source is interpreted as a directory path.

Example

  • sdsarchive:///home/sysop/seiscomp3/var/lib/archive

ODCArchive

This RecordStream reads data from an ODC archive using the File RecordStream. The source is interpreted as a directory path.

Example

  • odcarchive:///path/to/record/archive

Memory

This RecordStream reads data from memory and is only useful for developing applications. For instance a record sequence stored in an internal buffer could be passed to an instance of this RecordStream for reading.

Combined

This RecordStream combines one archive and one real-time RecordStream, e.g. ArcLink and SeedLink. First the archive stream is read up to the size of the real-time buffer. Then the acquisition is switched to the real-time stream. The syntax for the source is similar to an URL:

combined://real-time-stream;archive-stream??parameters

By default the real-time stream is set to SeedLink and the archive-stream is set to ArcLink. Any other streams may be configured. The parameters of the combined stream are separated by 2 question marks (??) in order to distinguish them from the parameters used in the proxy streams:

  • slinkMax|rtMax - Buffer size in seconds of the real-time stream, default: 3600

Examples

URL Description
combined://localhost:18000;localhost:18001 Seedlink on localhost:18000 combined with Arclink on localhost 18001
combined://slink/localhost:18000;arclink/localhost:18001 Same as above
combined://; Same as above
combined://:18042;?user=foo&pwd=secret??rtMax=1800 Seedlink on localhost:18042 combined with Arclink on localhost 18001, real-time (SeedLink) buffer size set to 30min
combined://;sdsarchive//home/sysop/seiscomp3/var/lib/archive? Seedlink combined with SDS archive

Balanced

This RecordStream distributes requests quasi-equally (but deterministically) to multiple proxy streams. It can be used for load balancing and to improve failure tolerance. The algorithm to choose a proxy stream (counting from 0) is based on station code and can be expressed in Python as follows:

stationCode = "WLF"
nproxies = 2

x = 0
for c in stationCode:
    x += ord(c)

print("choosing proxy stream", x % nproxies)

Examples

URL Description
balanced://slink/server1:18000;slink/server2:18000 Distribute requests to 2 SeedLink RecordStreams
balanced://combined/(server1:18000;server1:18001);combined/(server2:18000;server2:18001) Distribute requests to 2 Combined RecordStreams

Decimation

This RecordStream decimates (resamples) a proxy stream, e.g. SeedLink. The syntax for the source is similar to an URL:

dec://proxy-stream?parameters/address

Optional parameters are:

  • rate - target sampling rate in Hz, default: 1
  • fp - default: 0.7
  • fs - default: 0.9
  • cs - coefficient scale, default: 10

Examples

  • dec://slink/localhost:18000
  • dec://file?rate=2/-
  • dec://combined/;

Resample

This RecordStream resamples (up or down) a proxy stream, e.g. SeedLink, to a given sampling rate. The syntax for the source is similar to an URL:

resample://proxy-stream?parameters/address

Optional parameters are:

  • rate - target sampling rate in Hz, default: 1
  • fp - default: 0.7
  • fs - default: 0.9
  • cs - coefficient scale, default: 10
  • lw - lanczos kernel width, default: 3
  • debug - enables debug output, default: false

Examples

  • resample://slink/localhost:18000
  • resample://file?rate=2/-
  • resample://combined/;