Examples and Recipes¶
Retrieve real-time data from a CAPS server¶
The listed plugins can be used for exchanging real-time data.
CAPS server to data processing modules¶
Use this recipe to:
Provide data from a Caps server to data processing modules.
Recipe:
Configure the CAPS server in the module configuration.
Start the CAPS server
For data processing use the caps or capss RecordStream and configure it in the global module configuration:
recordstream = caps://localhost:18002
CAPS server to SeedLink clients¶
Use this recipe to:
Provide data from a CAPS server to external seedlink [17] clients.
Recipe:
Configure and start the CAPS server to provide the data.
Configure a new SeedLink instance
Case 1 - CAPS uses SeedLink plugins for data collection:
Configure a SeedLink client instance on a second computer which will act as a seedlink client and server.
Case 2 - CAPS does not use SeedLink plugins for data collection:
Generate an alias for seedlink on the same computer which will act as a SeedLink client and server.
Use the plugin caps in the SeedLink bindings and configure the plugin to connect to the CAPS server,
Configure the new SeedLink instance,
Update configuration of the new SeedLink instance (no module selection),
Start the new SeedLink instance.
Import data into a CAPS server¶
Real-time import with seedlink plugins¶
Use this recipe to:
Fetch data from a SeedLink server or from other sources using standard SeedLink plugins [17] of SeisComP and provide them to a CAPS server.
Recipe:
Configure and start the CAPS server to receive the data,
Choose and configure the seedlink plugin in the SeedLink bindings configuration,
Uncheck the parameter loadTimeTable in the seedlink [17] module configuration.
plugins.chain.loadTimeTable = false
Update the configuration.
Enable and start slink2caps.
Real-time import with CAPS plugins¶
Use this recipe to:
Fetch data from external source using the CAPS-specific CAPS plugins and provide them to a CAPS server.
Recipe:
Configure and start the CAPS server to receive the data,
Choose and configure the CAPS plugin in the module configuration,
Enable and start the plugin.
Import offline data: miniSEED and other formats¶
Use this recipe to:
Populate a CAPS server with offline miniSEED or other typs of data.
Recipe:
Besides real-time data exchange, data from offline experiments, offline stations or from other offline data archives can be fed into the caps data archive from where they are made available by the caps server.
For example, a set of miniSEED data files (“.mseed”) can be pushed into the caps
archive using rs2caps and the RecordStream interface “file”
(-I file://
, file is default and can be omitted) along with the
CAPS server.
Input one file (file.miniSEED), accept all streams:
seiscomp start caps rs2caps -I file.mseed --passthrough
Input all files ending with .mseed, accept all streams:
seiscomp start caps cat *.mseed | rs2caps -I - --passthrough
Input all files ending with .mseed, accept only streams found in the database:
seiscomp start caps cat *.mseed | rs2caps -I - -d mysql://sysop:sysop@localhost/seiscomp -j ""
Real-time playbacks¶
Use this recipe to:
Play back sorted miniSEED data as in real time using msrtsimul [10].
Real-time playbacks can be realized using
When using rs2caps the data can be stored in the CAPS archive or not. When using seedlink then data a kept in the seedlink buffer and slarchive [18] can be used to store the data in the SDS archive.
Note
For playbacks, the input data must be sorted by end time.
Real-time playback will create events with fake times, e.g creationTime, eventTime. Therefore, they should be executed on production system only in exceptional cases, e.g. for whole system validation. Better use dedicated SeisComP3 machines. Starting msrtsimul with the option -m historic preserves the time of the data records, thus the pick times. Instead, using offline playbacks based on XML files may be the faster and better option to create parameters from historic events.
Procedure using CAPS / rs2caps¶
Retrieve miniSEED data from CAPS archive using capstool or other methods.
Sort miniSEED records by endtime using scmssort:
scmssort -E miniSEED_file > miniSEED_file_sorted
Stop caps, slink2caps, rs2caps and all other active data acquisition. This will stop the real-time data acquisition.
Execute caps on the command line without archiving the data:
caps --read-only
Warning
As the data are not archived, processing of playback data will be impossible after stopping caps. Only in dedicated playback systems, caps should be used normally without any additional option.
Playback the sorted miniSEED data using msrtsimul:
msrtsimul -v -c miniSEED_file_sorted | rs2caps -I - --passthrough
The option
--passthrough
ensures that all data are passed to caps.Stop caps after the playback and the evaluation are finished
Start caps and all other real-time data acquisition modules.
Procedure using seedlink¶
Retrieve miniSEED data from CAPS archive using capstool.
Sort miniSEED records by endtime using scmssort:
scmssort -E miniSEED_file > miniSEED_file_sorted
Activate msrtsimul and activate loadTimeTable in the seedlink configuration:
msrtsimul = true plugins.chain.loadTimeTable = true
Configure the RecordStream with seedlink:
recordstream = slink://localhost:18000
Start seedlink and restart the modules that use the RecordStream interface:
seiscomp update-config seiscomp start seedlink seiscomp restart scautopick scamp
Playback the sorted miniSEED data using msrtsimul:
msrtsimul -v miniSEED_file_sorted
Revert all changes after the playback.