Examples and Recipes

Real-time data exchange

The listed plugins can be used for exchanging real-time data.

Procedure for providing data from CAPS to data processing modules:

Use this recipe to:

  • provide data from a caps server to processing modules.

Recipe:

  1. Configure CAPS in the module configuration.

  2. Start CAPS

  3. For data processing use the caps or capss RecordStream and configure it in the global module configuration:

    recordstream.service = caps
    recordstream.source = [host]:[port]
    

Procedure for importing data into CAPS with CAPS plugins:

Use this recipe to:

  • Fetch data using the CAPS specific plugins.

Recipe:

  1. Configure and start CAPS to provide the data.
  2. Choose and configure the plugin in the module configuration.
  3. Enable and start the plugin.

Input of offline miniSEED data into the CAPS archive

Use this recipe to:

  • Populate a CAPS server with offline miniSEED 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 file interface (-I file://) along with the CAPS server.

  1. Input one file (file.miniSEED), accept all streams:

    seiscomp start caps
    rs2caps -I file://file.mseed --passthrough
    
  2. Input all files ending with .mseed, accept all streams:

    seiscomp start caps
    cat *.mseed | rs2caps -I file://- --passthrough
    
  3. Input all files ending with .mseed, accept only streams found in the database:

    seiscomp start caps
    cat *.mseed | rs2caps -I file://- -d mysql://sysop:sysop@localhost/seiscomp -j ""
    

Real-time playback of miniSEED data from a CAPS archive

Use this recipe to:

  • Playback sorted miniSEED data as in real time using msrtsimul.

Real-time playbacks can be realized using a combination of msrtsimul and the CAPS plugin rs2caps or seedlink. When using rs2caps the data will be stored in the CAPS archive. When using seedlink then data a kept in the seedlink buffer and slarchive must be used to store the data in the SDS archive.

Note

For playbacks, the input dat 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:

  1. Retrieve miniSEED data from CAPS archive using capstool or other methods.

  2. Sort miniSEED records by endtime using scmssort:

    scmssort -E miniSEED_file > miniSEED_file_sorted
    
  3. Stop caps, slink2caps, rs2caps and all other active data acquisition. This will stop the real-time data acquisition.

  4. Execute caps on the command line without archiving the data:

    caps --read-only
    

    Note

    As the data are not archived, processing of playback data will be impossible after stopping caps. In dedicated playback systems, caps can be used normally without any additional option.

  5. Playback the sorted miniSEED data using msrtsimul:

    msrtsimul -v -c miniSEED_file_sorted | rs2caps -I file://- --passthrough
    

    The option –passthrough ensures that all data are passed to caps.

  6. Stop caps after the playback and the evaluation are finished

  7. Start caps and all other real-time data acquisition modules.