.. _sec-caps-retrieval: Retrieve Data From a CAPS Server ================================= |appname| provides additional tools to access data and information on a CAPS. .. csv-table:: :header: "Name", "Description" :widths: 15,85 ":ref:`capstool`","A command-line tool for retrieving data and information from a CAPS server." ":ref:`caps_plugin`","The plugin fetches miniSEED data from a CAPS server and provides the data to :program:`seedlink`" ":ref:`caps / capss`","The RecordStream implementations for |appname|." .. _sec-caps-recstream: RecordStream for |scname| modules --------------------------------- |scname| applications access waveform data through the :term:`RecordStream` interface. To fetch data from a CAPS server specific RecordStream implementations may be used: * *caps*: regular RecordStream implementation to access the CAPS server, * *capss*: RecordStream implementation to access the CAPS server secured by SSL, user name and password. Similar to *https*, *capss* will establish a Secure Socket Layer (SSL) communication. .. _sec-caps-rs-config: Configuration ~~~~~~~~~~~~~ #. In order to make use of the the *caps* RecordStream, the *rsas* plugin must be registered. Add the *rsas* plugin in the global configuration or to the modules that require the RecordStream, e.g. `scautopick `_, `scamp `_, `scolv `_, `scrttv `_: .. code-block:: sh plugins = ${plugins},rsas #. Configure the RecordStream URL in global. Examples for *caps* and *capss*: :: recordstream = caps://server:18002 recordstream = capss://foo:bar@server:18022 Note the :ref:`optional parameters `. .. note :: While the *caps*/*capss* RecordStream provides data in real time and from archive, some modules, e.g. `fdsnws `_ or *GIS* should be strictly limited to reading from archive only. Consider the option ``arch`` in these cases. .. _sec-caps-opt-params: Optional Parameters ~~~~~~~~~~~~~~~~~~~ Optional RecordStream parameters which can be combined: - ``arch`` - read from CAPS archive only, - ``ooo`` - out of order, data are fetched and provided in the order of their arrival in the CAPS server, useful for analysing if data have arrived out of order, - ``pass`` - password if server requires authentication, - ``request-file`` - file specifying the streams to be requested. One stream per line. Per line: net sta loc stream startTime endTime, - ``timeout`` - timeout of acquisition in seconds. Data acquisition will be restarted, - ``user`` - user name if server requires authentication. .. csv-table:: :header: "URL", "Description" "caps://server:18002?arch","Read data from CAPS archive. Stop data acquisition when all available waveforms are fetched." "caps://server:18002?ooo","Fetch data in the original order of arrival." "caps://server:18002?request-file=request.txt","Request only streams in time intervals given in request.txt" "caps://server:18002?timeout=5","Apply a timeout of 5 seconds." "capss://server:18022?user=foo&pass=bar", "Use secure protocol (SSL) with user name and password. Read the section on :ref:`sec-conf-access-auth` for details on the generation of user names and passwords." Combination with other RecordStream interfaces ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The caps and the capss RecordStream may be combined with other :term:`RecordStream` interfaces. Examples: #. Decimation Use the `decimation RecordStream `_ interface to fetch data from a CAPS server running on localhost decimated to 1 sample per second. *global configration:* .. code-block:: sh recordstream = dec://caps/localhost:18002?rate=1 *command line parameter:* .. code-block:: sh -I dec://caps/localhost:18002?rate=1 #. Resample Use the `resample RecordStream `_ interface to fetch data from a CAPS server running on localhost resampled to 16 samples per second. *global configration:* .. code-block:: sh recordstream = resample://caps/localhost:18002?rate=16 *command line parameter:* .. code-block:: sh -I resample://caps/localhost:18002?rate=16 .. _sec-caps-file: Direct file access ------------------ The data files in the CAPS archive contain a small additional header describing the data format. Read the :ref:`format documentation ` for more details. In contrast to miniSEED files in :term:`SDS` archives created e.g. by :program:`slarchive` or :program:`scart`, the files in the CAPS archive cannot be directly read by an application. However, you may use the command-line tool :ref:`capstool` for fetching data from a CAPS server based on time windows. :ref:`capstool` will read the data, strip the header and provide the data in their original format as a single file. :ref:`capstool` also provides information on available stations (``-L``) and streams with their time windows (``-Q``). .. _sec-caps2caps: Synchronize with another CAPS server ------------------------------------ Use :ref:`caps2caps` to synchronize your CAPS server with another one. You may push or pull data on either side. In contrast to the generation of regular :term:`SDS` archives, e.g. by :program:`scart`, the CAPS server will not generate duplicate data records if executing :ref:`caps2caps` multiple times. While synchronizing observe the :ref:`web interface ` for the statistics of received, written or rejected data packages. .. _sec-caps-seedlink: SeedLink -------- The :ref:`caps_plugin` plugin fetches data from a CAPS server and provides the data to :program:`seedlink`. The plugin can be configured and started as any other plugin for :program:`seedlink` or executed on demand. Select *caps* when choosing the plugin in the seedlink binding configuration. **Examples:** * Fetch data from a remote CAPS server and make them available in your :program:`seedlink` instance: #. configure the :ref:`caps_plugin` plugin in the bindings configuration of your :program:`seedlink` instance pointing to the remote CAPS server #. enable and start :program:`seedlink` :: seiscomp enable seedlink seiscomp start seedlink * Provide data from a CAPS server by seedlink on the same machine to external clients: #. create another seedlink instance, e.g. :program:`seedlinkP`: :: seiscomp alias create seedlinkP seedlink #. configure the :ref:`caps_plugin` in the bindings configuration of :program:`seedlinkP` pointing to the local CAPS server. #. enable and start :program:`seedlinkP`: :: seiscomp enable seedlinkP seiscomp start seedlinkP .. _sec-caps-fdsnws: FDSNWS ------ |appname| speeks natively `FDSN Web Services, FDSNWS `_ providing waveform data via dataselect. Information on events and stations are not delivered. The waveform data will be delivered through the port configured in :confval:`AS.http.port` or the port configured by your Apache server, if available. Contact your system administrator for information on the Apache server. Read the documentation of the :ref:`CAPS server ` for the configuration. .. _sec-caps-wws: Winston waveform server (WWS) ----------------------------- |appname| speeks natively `Winston Waveoform Server, WWS `_) protocol, e.g. to `Swarm `_ by USGS. Read the documentation of the :ref:`CAPS server` for the configuration. Technical documentation ----------------------- .. toctree:: :maxdepth: 2 :glob: /apps/capstool /apps/caps_plugin