.. highlight:: rst

.. _scolv:

#####
scolv
#####

**Origin locator view**


Description
===========


.. raw:: html

   <div class="four column layout">

.. figure:: ../../../../doc/base/media/apps/scolv-location.png
   :alt: scolv

   scolv: OriginLocatorView :ref:`Location tab <scolv-sec-location-tab>`
   with event and phase information

.. figure:: ../../../../doc/base/media/apps/scolv-picker.png
   :alt: scolv picker

   scolv: OriginLocatorView :ref:`phase picker <scolv-sec-waveform-review>`
   with waveforms and phase information

.. figure:: ../../../../doc/base/media/apps/scolv-event.png
   :alt: scolv picker

   scolv: OriginLocatorView :ref:`Event tab <fig-scolv-event>` with all origins

.. figure:: ../../../../doc/base/media/apps/scolv-magnitude-picker.png
   :alt: scolv picker

   scolv: OriginLocatorView :ref:`amplitude waveform review <scolv-sec-amplitude-review>`
   with station magnitudes

.. raw:: html

   </div>

scolv is the main interactive tool to revise or review origin and event information.
It thus provides the entire functionality to analyze earthquake parameters:

* Phase picks and arrivals in diagrams and waveforms
* Hypocenter location and source time with uncertainties
* Focal mechanism from first-motion polarities
* Magnitudes in diagrams and waveforms
* Origin status and certainty
* Event association
* Event type

The main scolv window is divided into 4 perspectives (tabs) from which external windows
can be opened:

- :ref:`Location tab<scolv-sec-location-tab>`: Details of the selected :term:`origin` with

  * :ref:`Phase picker <scolv-sec-waveform-review>` (external window): Review
    waveforms for phase picking including polarities, uncertainties, spectra and
    spectrograms,
  * :ref:`Extended commit <scolv-sec-commit>` (external window): Commit solution
    with additional options.

- :ref:`Magnitudes tab <scolv-sec-magnitude-tab>`: Magnitude details of the
  selected origin with

  * :ref:`Amplitude waveform review <scolv-sec-amplitude-review>` (external window):
    Waveform review for measuring amplitudes and for computing magnitudes.

- :ref:`Event tab <fig-scolv-event>`: Origins and focal mechanisms referenced
  by the selected :term:`event`.
- :ref:`Events tab<fig-scolv-events>`: Table of event parameters of the loaded
  events with interactive filtering of database requests and loaded events.


Modes of Operation
==================

scolv can be operated in 2 modes:

* **Connected to the messaging** where all event and station inventory parameters
  are received from the :ref:`messaging <concepts_messaging>` or the database and
  *updated in real time*. New or updated
  parameters can be commited to the messaging. Simply start scolv without any argument
  or connect to a specific host providing the messaging, e.g.:

  .. code-block:: sh

     scolv
     scolv -H [host]

* **Offline without messaging** where all event and station
  inventory parameters are read from an XML files or from the database and
  *updated interactively*. New or updated parameters can be written to an XML file.
  Execute scolv with the command-line option
  ``--offline`` and optionally provide the database or inventory and bindings
  parameters in :term:`SCML` format to fetch event parameters as well as inventory
  and bindings configuration parameters. Examples:

  .. code-block:: sh

     scolv --offline
     scolv --offline -d [database]
     scolv --offline --inventory-db [inventory] --config-db [config]

  Select one XML file in the `File` menu to read event parameters.
  After processing, the parameters can be saved to another XML file though the
  `File` menu.


.. _scolv-sec-location-tab:

Location Tab
============

The Location tab shows detailed information of the associated
phases and the residuals from the chosen origin additional information about the
hypocenter, time, station distribution, helps to find outlier.

.. _fig-scolv-location:

.. figure:: media/scolv/tab_location.png
   :width: 16cm
   :align: center

   Location tab of scolv with summary widget to the left.

   (**Redo/Undo**) Switch to last/next location result
   (**Tab 1-4**) Location/Magnitude/Event/Events tab
   (**Map**) map with the event location, associated stations, the color coded
   residuals (red-positive, blue-negative) and ray paths
   (**Information**) Origin information including time, epicentre, depth, number of
   used and available phases, RMS, azimuthal gap and minimum
   station distance
   (**List**) Table of associated arrivals (phases) containing stream information
   and phase information
   (**Tab 5-10**) Arrival residual plots against distance and azimuth (linear and
   polar) in a separate tab
   (**Plot**) Arrival residual plot (distance over residual in seconds)
   (**Depth**) Checkbox to fix to a defined depth
   (**B1**) Relocate with the given arrival information
   (**B2**) Open Manual Picker
   (**B3**) Import picks of other automatic origins belonging to the same event
   (**B4**) Compute magnitudes
   (**B5**) Commit origin
   (**Summary**) all information of the preferred origin of the loaded event


.. _scolv-sec-summary-widget:

Summary widget
--------------

The summary widget in the Location tab contains two other tabs: *Preferred* and
*Current*. *Preferred*
reflects the current official (database) state of the event while *Current*
shows the current solution (location and magnitudes). Activate the Summary widget
by pressing :kbd:`F8` or from the *View* menu.

.. note::

   The summary tab is available for all other tabs of the scolv main window and
   also for other GUI applications.


.. _scolv-sec-diagrams:

Diagrams
--------

The default arrival residual plot is shown in the figure above. Additional
plots are available to analyze arrivals which can be shown by activating the
corresponding tab.

In these diagrams, arrival can be activated or deactivating for :ref:`relocating <scolv-sec-relocating>`
by clicking on a point or by selecting a range using mouse drag. Deselecting is
available by mouse drag when pressing :kbd:`Ctrl`.


.. figure:: media/scolv/tab_location_plots.png
   :width: 18cm
   :align: center

   Additional arrival plots in Location tab of the main window

   From upper left to lower right: **1**) travel-time residual vs distance, **2**)
   travel-time residual vs azimuth, **3**) azimuth vs distance in polar plot
   **4**) travel-time vs distance, **5**) corrected travel-time vs distance
   **6**) focal mechanism.

The move out plot uses the reduced travel time with a default reduction velocity
of 6km/s. This value is configurable by :confval:`olv.Pvel`, either in the configuration file
(:file:`scolv.cfg`) or in the :ref:`settings window <scolv-settings>`, e.g.:

.. code-block:: properties

   # Reduction velocity used for move out plot
   olv.Pvel = 6.0

The diagrams in the scolv Location tab present observations (e.g. arrival residuals). Each plot
is also interactive to select a subset of data or to zoom into a region.

A plot filter can be defined. Filtering means that arrivals that match the
filter are not plotted. They are filtered out visually. To enable a filter
click the link "not active" right below the plot tabs. A setup window pops up
where the filter can be defined. Currently only a filter by azimuth around
epicenter can be applied.

.. figure:: media/scolv/plot-filter-setup.png
   :width: 8cm
   :align: center

Select the center azimuth and the extent to either side. If OK is pressed all
arrivals that fall outside the defined azimuthal area are hidden from the plot
and the line below the tabs turns into "Filter is active". Clicking on the
link again and select the "None" filter will show all arrivals in the plot again.

Plots can also be configured to show or hide dashed grid lines. Use :confval:`olv.drawGridLines`
for configuration (:file:`scolv.cfg`). The default is true.


.. _scolv-sec-location-arrival-table:

Arrival table
-------------

The arrival table shows all arrivals of the current origin. The columns are
sortable by clicking on the corresponding header item. Additional data columns
can be shown or active columns can be hidden, either initially or interactively.
Available column identifiers are:

* **Used**
* **Status**
* **Phase**
* Weight
* Method
* Polarity
* Takeoff
* **Net**
* **Sta**
* **Loc/Cha**
* **Res**
* **Dis**
* **Az**
* **Time**
* **Timeres**
* Slo
* Slores
* Baz
* Bazres
* **+/-**
* Created
* Latency

The columns printed bold are shown initially. The initial column
list can be changed in :file:`scolv.cfg` by adjusting :confval:`olv.arrivalTable.visibleColumns`:

.. code-block:: properties

   olv.arrivalTable.visibleColumns = Used, Status, Weight, Phase, Net, Sta,\
                                     Loc/Cha, Res, Dis, Az, Time, +/-

The user can also interactively select what columns are be visible or hidden
from a context menu which pops up after a right click on the table header.

.. figure:: media/scolv/arrivals-header-context.png
   :align: center

The checkbox in the first column indicates if the arrival was used for locating the
origin. The overall usage state of arrival contains three flags: arrival time used,
backazimuth used and slowness used. If any of these flags is active then the
overall usage state is active as well. The arrival table shows those flags indicated
by **T** for pick time, **S** for horizontal slowness and **B** for backazimuth.
A flag is rendered with a dash if the referred pick does not contain the
corresponding feature. For example, if a pick does not carry a backazimuth
measure then the backazimuth flag is disabled. It would not make sense to
activate backazimuth usage without a corresponding measure.

In most cases, only the time flag, indicated by the capital **T**, will be active.
The other two flags are rendered with dashes, meaning that they are inactive.
Background: an arrival refers to a pick which can hold several features. The basic
feature a pick must hold is the pick time. Some modules such as for array processing
might compute additional pick features. Such features can be the backazimuth and
the horizontal slowness. Locators like LocSAT were developed to use those features
to increase the precision of a location. Special applictions are locations based
borehole networks with poor azimuthal coverage or locations with very few stations.

There may be cases where a backazimuth measure of a pick should not be used by
the locator. In contrast, if a backazimuth is available but the timing is bad,
disabling the use of the pick time but including the backazimuth may be advantageous.
For that a simple weight value is not enough. With a weight one cannot separate
whether or not to use a particular feature. So the arrival does not only refer
to a pick but holds flags indicating which features of that pick should be used
for locating.

.. figure:: media/scolv/arrival-flags.png
   :align: center

Single or multiple rows can be selected in the table. The selection of multiple
rows works either with Ctrl+LeftMouse (add single row) or
Shift+LeftMouse (range selection).

When pressing the right mouse button on a selected row a context menu pops up.
If an unselected row is used, the current selection will be reset and only the
row below the mouse is selected.

The context menu allows to:

* Select arrivals based on a certain criterion,
* Activate/deactivate selected pick features,
* Delete selected arrivals,
* Rename phases of selected arrivals.

.. figure:: media/scolv/arrivals-context.png
   :align: center

If arrivals are deleted, they are removed physically from this solution in
contrast to deactivate an arrival where only the used flags are set to zero.


.. _scolv-sec-waveform-review:

Phase picker: review waveforms
------------------------------

The *Picker* button opens the interactive waveform picker window. It allows
to view and process waveforms for

* Picking additional phases,
* Confirming picks,
* Adding additional pick information such as polarity and uncertainty,
* Data procssing, e.g. filtering, rotation, spectrogram and much more.

The phase picker window is divided into two parts:

* The zoom trace and
* The trace list.

The zoom trace shows a sub area of the active trace in the list.

.. _fig-scolv-picker:

.. figure:: media/scolv/picker.png
   :width: 16cm
   :align: center


Request waveforms
^^^^^^^^^^^^^^^^^

When the picker window opens waveforms are initially requested for all streams
which have associated phase picks (arrivals). More waveforms can be fetched
interavtively:

#. Provide a maximum distance,
#. Click on the purple `Add` button to load the data.

Toggle viewing data without arrivals by clicking the purple `Hide` button.

During request the background of the traces is changed according to the current
state:

* Yellow: waveforms requested but not yet received.
* Red: acquisition finished and data is not available.
* Green: waveforms received and acquisition still in progress.
* Gray: meta data are missing.


.. figure:: media/scolv/picker-acqui.png
   :width: 16cm
   :align: center


If a trace displays all three components and amplitudes are scaled up, they are
not clipped to their window area. The clipping behavior can be toggled by
either pressing :kbd:`C` or in the menu
:menuselection:`View --> Zoomtrace --> Clip components to viewport`.

The difference is shown in the following two images:


.. figure:: media/scolv/clobber-off.png
   :width: 16cm
   :align: center

   Trace clipping enabled


.. figure:: media/scolv/clobber-on.png
   :width: 16cm
   :align: center

   Trace clipping disabled


1C / 3C data
^^^^^^^^^^^^

Initially the picker window shows only the vertical channels for each station that
have been associated with the current location. When opening, it can be configured to

* Load all components: :confval:`picker.loadAllComponents`,
* Show all components: :confval:`picker.showAllComponents`.

Hotkey :kbd:`t` can be used to toggle beetween 1- and 3-component data. Use the
yellow buttons or :ref:`hot keys <sec-scolv-hotkeys>` to load components not yet
loaded.


Data filtering
^^^^^^^^^^^^^^

When the picker window opens, the waveforms are filtered by the default filter
configured in :confval:`picker.filters`. Selecting filters or unfitlered data
interactively is available by choosing the filter from the filter menu or
:ref:`hot keys <sec-scolv-hotkeys>`.


Waveform rotation
^^^^^^^^^^^^^^^^^

Waveforms can be rotated to better view details. For rotating the waveform
components into ZNE or ZRT system a new drop down list was added in the toolbar.
Selecting either ZNE or ZRT implies that all missing components are requested.

.. figure:: media/scolv/rotation-options.png
   :align: center


Phase picks
^^^^^^^^^^^

Phase picks shown on waveforms are color-coded:

* Red: automatic
* Green: manual
* Blue: predicted using the selected travel-time table

Mature and light colors indicate arrivals and unassociated picks, respectively.
Unassociated picks can be shown/hidden using :kbd:`Ctrl` + :kbd:`5`.


Phase picking
~~~~~~~~~~~~~

Initially the picker window allows to pick the arrival times of the following phases:

- P
- Pn
- Pg
- pP
- S
- Sg

Up to 9 phase types can be configured for selection by
:ref:`hot keys <sec-scolv-hotkeys>`. This list of favourite phases can be customized
by :confval:`picker.phases.favourites`, e.g. (:file:`scolv.cfg`):

.. code-block:: properties

   # Define a list of favourite phases for quick access
   picker.phases.favourites = Pn, P, Pg, PmP, P1, Pg, Sg, S, Sn, SmS

The list of favourites is used to assign shortcuts to. :kbd:`1` is assigned
to the first phase in the list, :kbd:`2` to the second and so on.

.. note:: Shortcuts are assigned only  to the first 9 favourite phases. All
   other defined phases can be activated from the *Picking* menu.

The phases can be also grouped to reflect e.g. regional
and teleseismic profiles. In group not hot keys are available.
An example configuration looks like this (:file:`scolv.cfg`):

.. code-block:: properties

   # Define two phase groups: regional and teleseismic
   picker.phases.groups = regional, teleseismic

   # Define all phases of group "regional"
   picker.phases.groups.regional = Pn, P, Pg, PmP, P1, Sg, S, Sn, SmS

   # Define all phases of group "teleseismic"
   picker.phases.groups.teleseismic = pP, sP, sS, PKP, PKP

.. figure:: media/scolv/phases-menu.png
   :align: center

   Pick phase selection menu

For making a phase pick the picking mode must be activated by choosing a phase in the
Picking menu. Short cuts are:

* Blue P and S buttons for picking P and phases, respectively (hot keys :kbd:`F1`, :kbd:`F2`),
* Numbers shown in the picking menu used as hot keys.

Additional information can be added interactively to the picks:

* :ref:`Pick uncertainties <scolv-sec-uncertainties>`,
* :ref:`Phase polarities <scolv-sec-polarities>`.

Press :kbd:`ESC` to leave the picking menu. To send all picks to the main scolv
window click on the red `Apply` button or press :kbd:`F5`. The picks will be used
immediately for :ref:`relocating <scolv-sec-relocating>`.

.. warning::

   All manual work will be lost when closing the picker window without sending
   the picks.


.. _scolv-sec-uncertainties:

Pick uncertainties
~~~~~~~~~~~~~~~~~~

If the mouse hovers a pick, a dashed rectangle is drawn around this pick. Then
the pick is active and the right mouse button can be pressed to open the context
menu where the polarity and uncertainty can be defined. The following screen shot
shows the available uncertainties.

.. figure:: media/scolv/pick-context2.png
   :align: center

   Pick context menu

Additionally, pick uncertainties can be defined freely whereas choosing
among a predefined set of uncertainties is a lot faster. The way, pick uncertainties
are used depends on the applied locator routine and its configuration.
To set the uncertainty of a pick more easily a list of predefined uncertainties can be
defined using :confval:`picker.uncertainties`, e.g.:

.. code-block:: properties

   picker.uncertainties = 0.05, 0.1, 0.2, "(0.1,0.2)", "(0.05,0.02)"

where single values define symmetric and pairs of values define asymmetric uncertainties.
The pre-defined uncertainties can be selected during picking using
:ref:`hot keys <sec-scolv-hotkeys>`, e.g.
:kbd:`1` or :kbd:`2` for the 1st or the 2nd value defined in :confval:`picker.uncertainties`.
Later, the uncertainties can be adjusted manually.
As for phase types, uncertainty profiles can be additionally configured (:file:`scolv.cfg`):

.. code-block:: properties

   # Define available pick uncertainty profiles. Single values
   # are symmetric uncertainties whereas tuples are asymmetric
   # uncertainties: (left,right). Uncertainty values are given
   # in seconds.

   # Define an uncertainty profile for local events
   picker.uncertainties.profile.local = 0.05, 0.1, 0.2, 0.3, "(0.1,0.2)"

   # Define an uncertainty profile for teleseismic events
   picker.uncertainties.profile.teleseismic = 0.5, 1, 2, 3, "(1,2)"

   # Define the list of uncertainty sets that are active in scolv.
   # This first set in the list is used by default. The other sets
   # can be activated in the settings dialog (scolv: F3)
   picker.uncertainties.preferred = local, teleseismic


If an uncertainty is selected, the active pick is copied into a manual pick
and the uncertainty is displayed as semi transparent bar to the left and
to the right of the pick. The width of the bar corresponds to the uncertainty
in seconds.

.. figure:: media/scolv/pick-uncertainty.png
   :align: center


.. _scolv-sec-polarities:

Phase polarities
~~~~~~~~~~~~~~~~

Furthermore the phase pick polarity can be defined. When this is the polarity
of the first arrival P phase it can be used to manually set the focal mechanisms
of the origin in the :ref:`FirstMotion <scolv-sec-diagrams>` diagram.

.. figure:: media/scolv/pick-context.png
   :align: center

Right-click on the pick to make a choice: Either *positive*, *negative*,
*undecidable* or *unset* is available. You may speed up your work by using
:ref:`hot keys <sec-scolv-hotkeys>`. If set, the polarity is displayed as an
arrow. *Undecidable* is displayed as a cross (X).

.. figure:: media/scolv/pick-polarity.png
   :align: center


.. _scolv-sec-relocating:

Relocate events
---------------

The *Relocate* button allows relocating based on the selected pick set. Picks may
be manually adjusted or created before in the
:ref:`wave review window<scolv-sec-waveform-review>` or arrival properties may
be directly adjusted in the :ref:`arrival table <scolv-sec-location-arrival-table>`.
Prior to relocating choose the locator, the locator profile and additional parameters
to the right or from the the tool box.

.. figure:: media/scolv/scolv-relocating.png
   :width: 16cm
   :align: center

Defaults may be configured, e.g.

* :confval:`olv.locator.interface`: Default locator
* :confval:`olv.locator.defaultProfile`: Default profile of the default locator
* :confval:`olv.locator.minimumDepth`: Minimum depth for the locator to consider.

The locators available by default in |scname| are

* :ref:`LOCSAT <global_fixedhypocenter>`,
* :ref:`FixedHypocenter <global_locsat>`.

Additional locator routines are available by :ref:`concepts_plugins` which
provide their own specific global configuration. Read the
:ref:`concepts section on locators <concepts_locators>` for an introduction.

Pressing *Relocate* creates a new origin and updates the arrival table and the
parameters displayed in the Location tab.

Undoing and redoing actions is availalbe by buttons and
:ref:`hot keys <sec-scolv-hotkeys>`.

.. figure:: media/scolv/tab_previous-next.png
   :align: center

.. hint::

   You need to create a new origin for :ref:`computing magnitudes <scolv-sec-magnitudes>`.


.. _scolv-sec-magnitudes:

Compute magnitudes
------------------

When an event was :ref:`relocated <scolv-sec-relocating>` a new origin is created
and new magnitudes can be calculated by using the
"Compute Magnitudes" button. The advantage of calculating the magnitudes before
committing the new origin, is the possibility to check the resulting magnitudes
before they are computed manually by :ref:`scmag`.

:ref:`An amplitudes status window <fig-scolv-location-amp-status>` will pop up showing the progress
information of measurements. The amplitudes are either measured or fetched from
database if the pick is unchanged and the amplitude is already in the system.
For new manual picks, waveforms are requested to measured the amplitudes. The
popup window contains information about the progress, limitations and possible
errors.

.. _fig-scolv-location-amp-status:

.. figure:: media/scolv/tab_location_amp_status.png
   :align: center

   Measure amplitudes status window.

After closing the amplitude status window magnitudes are computed and
possible limitations are shown, if applicable, in the magnitudes status window.
Confirm this window in order to proceed.

.. _fig-scolv-location-mag-status:

.. figure:: media/scolv/tab_location_mag_status.png
   :align: center

   Compute magnitudes status window.

All available magnitudes are then shown and can be interactively re-processed in
the :ref:`Magnitudes tab <scolv-sec-magnitude-tab>`.


.. _scolv-sec-commit:

Commit a solution
-----------------

Committing a solution means to send the location (including optional magnitudes)
to the processing system and let it decide what origin becomes preferred.

To optimize the workflow

#. Select an event
#. Review solution
#. Commit solution
#. *Optional:* Change to Event tab for setting

   * This solution preferred
   * Event type
   * Event certainty
   * Preferred magnitude
   * Preferred focal mechanism

#. Change to Events tab
#. Goto 1.

Instead of selecting events from the Events tab, the previous or the next event
can be conveniently selected from the edit buttons above the Location tab.

.. figure:: media/scolv/tab_previous-next.png
   :align: center


.. _scolv-sec-commit-additional:

Additional options
^^^^^^^^^^^^^^^^^^

Instead of optionally setting parameters in the Event tab an additional commit
mode allows to directly set certain parameters such as

* Event type
* Ovent certainty
* Origin
* Event comment

and to choose options along with the location and its magnitudes. After pressing
and holding the Commit button down for a little while, a menu pops up which
allows to select *With additional options*.

.. figure:: media/scolv/commit-options.png
   :align: center

Selecting this entry
brings up another window where the different options can be set.

.. figure:: media/scolv/commit-options2.png
   :align: center

It allows to fix the origin to be committed as preferred origin and to set the
event type in one go. If *Return to event list after commit* is ticked, the
event list is activated after pressing OK to select another event quickly.

*Earthquake name*
 Contains the event description *earthquake name*. If this field is empty, the
 description will be removed from the event otherwise it will be added.

*Comment*
 Contains an optional event comment added as comment with ID *Operator*. The
 comment text can be visualized in event lists
 (:ref:`Events tab <scolv-events-tab>`) by configuration of the global parameters
 :confval:`eventlist.customColumn.eventCommentID` or :confval:`eventlist.scripts.*`.


.. _sec-scolv-custom-commit:

Custom commits
^^^^^^^^^^^^^^

As a shortcut for committing with additional options,
:ref:`custom commit buttons <fig-scolv-custom-commit>` can be added by
configuration: Add, enable and configure a custom commit profile in
:confval:`olv.customCommits`.
With custom commit buttons origin and event paramters can be set, e.g.:

* Origin status
* Fixing the origin
* Event type
* Event type certainty
* Magnitude type of the :term:`preferred magnitude`. The preferred magnitude
  can also be set in the :ref:`magnitude tab <scolv-sec-magnitude-summary>`.
* Event comments

.. _fig-scolv-custom-commit:

.. figure:: media/scolv/commit-custom.png
   :width: 16cm
   :align: center

   Custom commit buttons in the Location tab for configured actions and with specific label and color.


.. _scolv-sec-magnitude-tab:

Magnitudes Tab
==============

The Magnitude tab shows all available magnitude information for the current
origin. They can be recomputed after creating a new origin, e.g. by relocating.

.. _fig-scolv-magnitudes:

.. figure:: media/scolv/tab_magnitudes.png
   :width: 16cm
   :align: center

   Magnitudes tab of scolv.

   (**Map**) Map with residual and status of the station magnitude, filled
   circles show stations which delivered a magnitude, empty circles represent
   for which no magnitude was calculated
   (**Magnitude tabs**) Each magnitude and the residuals are displayed in a
   separate tab, no residuals are displayed for deduced magnitudes like
   Mw(mB) or M
   (**Information**) Magnitude information including network magnitude value,
   magnitude error, number of used and available station magnitudes and
   minimum/maximum station magnitude
   (**List**) Station magnitude table with weights
   (**Plot**) Station magnitude residual from network magnitude (distance
   over residual)
   (**Weighting**) Weighting scheme for the network magnitude
   (**B1**) Recalculation of the network magnitudes
   (**B2**) Open waveform review


.. _scolv-sec-magnitude-station:

Station magnitudes
------------------

For each of the different magnitude types (e.g. mb, mB, MLv, Mw(mB)),
the :ref:`station magnitudes <scmag-stationM>` are shown in the magnitude residual plot and the table.
The residual plot visualizes the difference between the station magnitude and
the network magnitude for the different station distances. After relocation the
magnitudes can be recalculated by the "Compute Magnitudes" button in the
Location tab.

The station magnitudes can also be recalculated by
:ref:`interactive waveform analysis<scolv-sec-amplitude-review>`. Press the B2 button to
start the interactive analysis.

.. important:: Magnitudes cannot be recalculated for origins loaded from
   database. To review magnitudes, create a new origin (relocate), recompute
   magnitudes and then change into this tab to open either the waveform
   review window or to just remove outliers.


.. _scolv-sec-magnitude-network:

Network magnitudes
------------------

:ref:`Network magnitudes <scmag-networkM>` are computed from corresponding
:ref:`station magnitudes <scmag-stationM>`.
The considered station magnitudes can be selected or unselected in the
list and in the plot of station magnitudes. The method, the status and the margins
to disregard outliers can be selected.
Normally, the 25%-trimmed mean is calculated as network magnitude to stabilize
the result against a few outliers. The 25%-trimmed mean first removes the outliers
of the outer 12.5% percentiles and then forms the mean.

Magnitudes that were not computed due to missing data or low signa-to-noise
ratios have a cross button rendered in their tab headers and their value is
nan (not a number). Furthermore was the status of the magnitude set to
rejected. To manually review the waveforms and to fine tune the
parameters, open the waveforms and add at least one station magnitude. Otherwise
the rejected magnitude will be removed from the origin prio to committing it.


.. _scolv-sec-magnitude-summary:

Summary magnitude
-----------------

The :ref:`summary magnitude <scmag-summaryM>` typically is calculated from all network magnitudes
by :ref:`scmag` and set as preferred magnitude type by :ref:`scevent` after committing
or confirming an origin. The defaults can be changed by configuring :ref:`scmag`
and :ref:`scevent`.

However, in combination with :ref:`custom commit buttons <sec-scolv-custom-commit>`,
the network magnitude to be considered as the preferred can be set by hitting this
configured button or interactively in the :ref:`magnitude tab <fig-scolv-magnitudes>`
of scolv. Interactively check the box in the network magnitudes tab, then press the
custom commit button. Setting the preferred magnitude interactively in the magnitude
tab takes priority over the configuration of the custom commit button.


.. _scolv-sec-amplitude-review:

Waveform review
---------------

The magnitude review page also allows the review of waveforms.
The button *Waveforms* brings up the amplitude waveform review page.
The waveform review magnitude type is the same as the currently active tab.

.. figure:: media/scolv/magnitudes-waveforms.png
   :width: 16cm
   :align: center

The initial view loads all traces of all arrivals within the defined distance
for that magnitude type. The zoom trace shows all components required for this
particular amplitude type and the lower part shows all stations and only the
currently active component. All traces are aligned on trigger time (blue P marker).
If a station has got an amplitude, it shows up as a red (automatic
determined amplitude) or green (manually determined amplitude) marker.
This display is similar to the Picker.

The toolbar contains two lines of settings. The first line is similar to the
Picker, the second line is amplitude picker specific.

.. figure:: media/scolv/magnitudes-toolbar.png
   :align: center

   Second toolbar line: filter selection, filter toggle, min SNR editor,
   amplitude measurement type selector, amplitude combiner selector,
   (re)calculate amplitudes, apply amplitudes.


A station trace is divided into three areas:

* Dark gray: unused data
* Light gray: data used for noise offset and noise amplitude
* White: data used for amplitude calculation

The example above shows nicely how different data time windows are used for
amplitude determination depending on the distance. This depends on the
amplitude type and its implementation.

Available actions are:

* Show raw data
* Change processing settings
* Adjust processing areas (noise, signal) for a single trace or all traces
* Apply a secondary filter (e.g. to remove noise or low frequencies)
* Pick amplitudes within a user definable time window
* Add unpicked/unassociated stations that are within a certain distance
* Remove bad stations


Filtered and raw data
^^^^^^^^^^^^^^^^^^^^^^

By default the processed waveforms are displayed. The processing is defined by
the magnitude type. To view the raw waveforms change the filter drop down box
to *Raw*.


Processing settings
^^^^^^^^^^^^^^^^^^^

A basic amplitude processor uses two basic settings: Minimum signal/noise
ratio (SNR) and data time windows. The default minimum SNR is defined by the
implementation of the amplitude algorithm. This default SNR is shown in the
toolbar right from *Min SNR:*. In some situations an operator might want to
increase or decrease the minimum SNR for some reason. This can be done by
modifying the value in the corresponding spin box.

In the time scale of the zoom widget and the overview three black triangles are
visible. Those triangles can be used to adjust the data time windows of either
the zoom trace (upper part) or all traces (lower part) by dragging the handle
with the left mouse button.

Some amplitude processors allow the modification of the type of amplitude
measurement (e.g. absolute maximum or peak-to-peak) and/or the amplitude
combiner procedure. This procedure is mostly used when a final amplitude from
two components is computed, e.g. ML on the horizontals. The combiner procedure
defines how the amplitudes of each horizontal are combined to a single amplitude,
e.g. by taking the maximum of both or the average.

If the amplitude processor allows any of these options, the corresponding drop
down boxes are enabled in the toolbar and can be used to change the defaults.

.. note:: Amplitudes are not recalculated if any changes to the settings are
   made. Recalculation has to be activated manually (see below).


Secondary filters
^^^^^^^^^^^^^^^^^

Another option is to filter the data additionally to the internal filter of the
amplitude processor. Be warned that wrongly applied filters screw up the results.
The available filters can be defined in the settings dialog of scolv or in the
configuration file similar to the manual picker filters (:file:`scolv.cfg`):

.. code-block:: properties

   # List of filters available in the picker. Format:
   # "name1;filter-definition1", "name2;filter-definition2"
   amplitudePicker.filters = "4 pole HP @2s;BW_HP(4,0.5)"

The new filter selection is applied immediately to the waveforms while the amplitudes are not recalculated
(see next section).


Calculate amplitudes
^^^^^^^^^^^^^^^^^^^^

To calculate the amplitudes of all traces with the current settings press the
green check in the toolbar. It will process all traces and recalculate the
amplitudes within the shown time windows. If an error occurs, it will show up as
a small message box in the station trace itself. If a new amplitude is available,
its state is set to manual and the marker is updated to reflect the new position
of the amplitude. If the mouse hovers an amplitude marker, a tooltip pops up
after a certain amount of time and shows information about the amplitude.

.. figure:: media/scolv/amplitude-tooltip.png
   :align: center


Pick amplitudes
^^^^^^^^^^^^^^^

In addition to the default picking of all stations it is also possible to
define the time window of the amplitude of a station manually. To do so,
activate picking by pressing :kbd:`1` or in the main menu:
:menuselection:`Amplitudes --> Pick amplitudes`.

There are two modes of picking:

#. Create a time window by pressing with left mouse button at the start time and
   releasing at the end time, or
#. Double click at a time and use a time window of [t-0.5sec;t+0.5sec]


Add stations in range
^^^^^^^^^^^^^^^^^^^^^

Unpicked or unassociated stations can be added the same way as in the manual
picker. The new stations will not have an amplitude and need either manual
picking or global amplitude recalculation.


Remove bad stations
^^^^^^^^^^^^^^^^^^^

Stations can be disabled by either double clicking on the trace label in the
overview or by deactivating an amplitude similar to deactivating a pick.


Confirm the amplitudes
^^^^^^^^^^^^^^^^^^^^^^

The red button in the toolbar confirms all amplitudes and transfers them to the
magnitude review page. Only activated amplitudes are transferred. Disabled
stations or disabled amplitudes are ignored. At this stage all magnitudes are
calculated and the network magnitude is calculated according to the available
settings: *Mean*, *Median* or *Trimmed mean*.


.. _scolv-sec-event-tab:

Event Tab
=========

The Event tab gives all information of associated origins and magnitude of the
actual event. Here the selection of the preferred origin and preferred magnitude
can be influenced independent from :ref:`scevent`. The messaging between
scevent and scolv about the selected origins and magnitudes can be viewed in
a window that has to be opened by pulling the left side frame to the right.

.. _fig-scolv-event:

.. figure:: media/scolv/tab_event.png
   :width: 16cm
   :align: center

   Event tab of scolv.

* **Origin list:** List of all associated origins
  * **B1** Selector for the event type
  * **B2** Button to fix the selected origin as preferred
  * **B3** Button to let :ref:`scevent` select the preferred origin

* **Magnitude list** List of magnitudes of the actual origin
  * **B4** Button to fix the selected magnitude as preferred
  * **B5** Button to let :ref:`scevent` select the preferred magnitude

* **Focal Mechanism:** List of all focal mechanisms associated to the selected event.

The map (lower left part) shows all associated origins while the currently
selected origin (**Origin list**) is drawn filled.


.. _scolv-origin-list:

Origin list
-----------

The Origin list shows details of all available origins. You may fix/unfix an
origin to become the preferred one or select the type and set
the type uncertainty for the selected sevent.

Select a row or cell and
press the right mouse button to copy the row or cell, respectively.
The *Stat* column indicates a combination of the mode and the status of the origin.

.. _scolv-origin-mode:

The mode is color coded:

* **Red**: automatic
* **Green**: manual

.. _scolv-origin-status:

The status is coded by a single character:

* **A**: unset, status not specifically set, e.g. usually automatic origins from :ref:`scautoloc`
* **F**: final
* **V**: reviewed
* **C**: confirmed
* **P**: preliminary, e.g. XXL origins from :ref:`scautoloc`
* **R**: reported
* **X**: rejected


.. _scolv-magnitude-list:

Magnitude list
--------------

The magnitude list shows all available magnitudes available for the origin
selected in the :ref:`Origin list <scolv-origin-list>`. You may fix/unfix a
magnitude type to become the preferred magnitude.

Select a row or cell and
press the right mouse button to copy the row or cell, respectively.


.. _scolv-fm-list:

Focal Mechanism list
--------------------

The Focal Mechanism tab shows all focal mechanisms and moment tensors associated
to the selected event. You may fix the preferred mechanism or fix/unfix
:term:`Mw <magnitude, moment (Mw)>` to become the preferred magnitude.

Select a row or cell and
press the right mouse button to copy the row or cell, respectively.


.. _scolv-events-tab:

Events Tab
==========

The Events tab gives an overview of the events in the defined time span. Listed
events are updated in real time as new events arrive in |scname| or are loaded
from the database. The title of the tab also indicates the number of shown vs.
the total number of loaded events. The numbers can be different because events
can be :ref:`hidden from the list by filtering <scolv-events-filtering>`.


When starting scolv with the option **--offline**, events can also be loaded from an XML
file using the File menu in the main window.

.. _fig-scolv-events:

.. figure:: media/scolv/tab_events.png
   :width: 16cm
   :align: center

   scolv Events tab with the list of events and the filter window.

Information about origin time, preferred ("best") magnitude, preferred magnitude
type, number of phases, epicenter and depth, origin status, region, agency and
event/origin ID are similar to the event list in :ref:`scesv`. Additionally,
all origins associated with one event are displayed if an event item is expanded.

.. note::

   The region name of an event is read from the database or received via the
   messaging bus. It is an integral part of the event description and set based
   on the data set available at the time of the event creation. The region name
   of the origins is not part of the origin description and resolved dynamically
   when the information is required. That can lead to confusion if the dataset
   of the computer where the event has been created and the local dataset
   differs. Therefore the region names resolved locally are rendered with italic
   font style.


Events table
------------

As with the arrival table the shown columns of the list are also configurable.
The available identifiers are:

* **OT(GMT)** : origin time
* **Type** : event type
* M : magnitude
* **MType** : magnitude type
* **Phases** : number of used phases
* **RMS** : root-mean square travel-time residual
* AzGap: largest azimuthal gap between two neighboring stations of an origin
* **Lat** : latitude
* **Lon** : longitude
* **Depth** : depth
* DType : depth type
* **Stat** : a combination of the :ref:`color-coded mode <scolv-origin-mode>` and
  the :ref:`status<scolv-origin-status>` of the preferred origin as described by
  a letter. A trailing "+" indicates that origins were contributed to the event
  by multiple agencies, e.g. "C+".
* FM : focal mechanism
* Origins: number of origins per event
* **Agency** : agency ID
* Author : author
* **Region** : region name
* **ID** : ID of the show element, e.g. event or origin

The bold identifiers are visible initially by default.
To show or hide columns interactively click with the right mouse button on the
table header and check or uncheck the corresponding column.

Sorting and re-ordering is available by clicking on the header of the columns and
by dragging the header fields, respectively. Right-click on cells to copy individual
cells values or entire rows.

The initial list can configured with the global module parameter
:confval:`eventlist.visibleColumns` in :file:`global.cfg` or :file:`scolv.cfg`,
e.g.:

.. code-block:: properties

   # Remove Type and Author from column list that is initially active
   eventlist.visibleColumns = Type, M, MType Phases, RMS, Lat, Lon, Depth, DType, Stat, FM, Author, Agency, Region, ID


.. _scolv-events-filtering:

Event filtering
---------------

Database request filters can be applied interactively or automatically by

* **Time:** Select a time period or a number of days before current time.
* **Interactive custom request filters**: You may set and adjust a custom request
  filter** in the filter parameter window which opens when pressing the Filter
  button. Press *Read* to reload the events list based on the filter parameters.
  **The interactive custom request filter only concerns the
  database request for loading events. It does not update the current list.**
  Use the :ref:`global` for presetting the values (:file:`scolv.cfg` or
  :file:`global.cfg`), e.g.:

  .. code-block:: properties

     eventlist.filter.database.minlat = 51.0

Event lists already loaded from from the database can be filtered by

* **Event type:** Activate by check box *Hide other/fake events*. If checked, all
events with the configured types are hidden from the list. The default event types
to hide are *not existing* and *other* are hidden. If unchecked, the filtering
is inactive and the events are shown. **Pressing the Hide button only affects
the currently loaded list.** Configure the event types used for this filter as well
as the label text for the checkbox.
Use the :ref:`global` for presetting the values s (:file:`scolv.cfg` or :file:`global.cfg`):

.. code-block:: properties

   # Define the event types to be filtered
   eventlist.filter.types.blacklist = "not existing", "other",\
                                      "outside of network interest"

   # Define the label of the button to filter the events
   eventlist.filter.types.label = "Hide fake events"

   # Define the default behavior
   eventlist.filter.types.enabled = true

* **Agency**: Activate by check boxes *Show only own origin* and/or "Show only
  latest/preferred origin per agency". The button *Show only own events*
  will hide all events where the preferred origins agencyID is not the configured
  :confval:`agencyID` of scolv. This is the default behavior which can be customized
  (:file:`scolv.cfg` or :file:`global.cfg`):

  .. code-block:: properties

     # Set the preferred agencyIDs to GFZ and EMSC
     eventlist.filter.agencies.whitelist = GFZ, EMSC

     # Set type to 'origins' which means that an event will pass the filter if
     # at least one origin is from a preferred agency defined with the whitelist
     # above. The default type is 'events' which checks only the events preferred
     # origin.
     eventlist.filter.agencies.type = origins

     # Defines the text of the option "Show only own events".
     eventlist.filter.agencies.label = "Show only own events"

     # Enable this filter initially. If this option is not used, the filter
     # is disabled by default.
     eventlist.filter.agencies.enabled = true

* **Source region:** Select a source region, activate "Hide events" and choose to
  hide events inside or outside the region.
  **Pressing the Hide button only affects the currently loaded list.**
  Pre-defined regions can be configured in the global configuration per bounding
  box or region defined by a BNA or GeoJSON polygon
  (:file:`global.cfg`, :file:`scolv.cfg`):

  .. code-block:: properties

     # Configured a list of regions that can be used as filter of the result set.
     eventlist.filter.regions.profiles = chile

     # Defines the name of the region that shows up in the listbox.
     eventlist.filter.regions.region.chile.name = Chile

     # Defines a rectangular region with a list of 4 values: latmin, lonmin, latmax,
     # lonmax.
     # eventlist.filter.regions.region.chile.rect = -40, -80, -10, -60

     # Defines the name of the polygon for the region check. If defined then the
     # rect region has no effect. The configured polygon name is being search for in
     # the global FEP regions and the spatial vector layer. The first polygon found
     # with the given name will be taken.
     eventlist.filter.regions.region.chile.poly = chile


.. _scolv-custom-actions:

Custom Actions
==============

Since the internal data model is limited, scolv allows
deriving custom quantities from the event or origin objects. These quantities can
be displayed or processed further by external script.
This procedure can help to evaluate origins in a better or more specific way.

Two sources of information are currently supported

* :ref:`Origin comments <sec-scolv-comments>` provided along with origins to be
  shown in scolv tabs,
* :ref:`External scripts <sec-scolv-scripts>` provided by the |scname| operator
  to extract specific information from events or origins which are shown in tabs
  or processed further.


.. _sec-scolv-comments:

Origin comments
---------------

Currently only one comment of an origin can be added to the different panels.


Location tab
^^^^^^^^^^^^

To add an origin comment value to the information panel of the Location tab,
configure display paramters in scolv. Example (:file:`scolv.cfg`):

.. code-block:: properties

   # Define the comment id to be used
   display.origin.comment.id = SED.quality

   # Define the default display value if no comment is available
   display.origin.comment.default = "-"

   # Define the label text in the information panel for this value
   display.origin.comment.label = Quality


Event tab
^^^^^^^^^

To add a custom column to the **origin list of the Event tab** showing an origin
comment value, configure eventedit parameters in scolv or global. Example
(:file:`scolv.cfg` or :file:`global.cfg`):

.. code-block:: properties

   # Define the default value if no comment is present
   eventedit.origin.customColumn.default = "-"

   # Define the comment id to be used
   eventedit.origin.customColumn.originCommentID = SED.quality

   # Define the column header label
   eventedit.origin.customColumn.name = "Qual"

   # Define the column position in the table
   eventedit.origin.customColumn.pos = 4

   # Allows to map comment values (strings) to colors. In this case the
   # comment will have A,B,C or D which is mapped to green, yellow, orange and
   # red
   eventedit.origin.customColumn.colors = "A:00FF00","B:rgb(64,192,0)",\
                                           "C:rgb(192,64,0)","D:FF0000"


Events tab
^^^^^^^^^^

To add a custom column to the **event list of the Events tab** using a comment
value, configure eventlist parameters in scolv or global. Example
(:file:`scolv.cfg` or :file:`global.cfg`):

.. code-block:: properties

   # Define the default value if no comment is present
   eventlist.customColumn.default = "-"

   # Define the comment id to be used
   eventlist.customColumn.originCommentID = "SED.quality"

   # Define the column header label
   eventlist.customColumn.name = "Qual"

   # Define the column position in the table
   eventlist.customColumn.pos = 5

   # Allows to map comment values (strings) to colors. In this case the
   # comment will have A,B,C or D which is mapped to green, yellow, orange and
   # red
   eventlist.customColumn.colors = "A:00FF00","B:rgb(64,192,0)",\
                                   "C:rgb(192,64,0)","D:FF0000"


The last three examples are used to show the *SED.quality* comment value which
is set by the :ref:`NonLinLoc locator plugin <global_nonlinloc>`.

In order to show event comments, e.g.,
:ref:`set during committing <scolv-sec-commit-additional>` replace
:confval:`eventlist.customColumn.originCommentID` by
:confval:`eventlist.customColumn.eventCommentID`:

.. code-block:: properties

   # Define the comment id to be used
   eventlist.customColumn.eventCommentID = "Operator"

   # Define the column header label
   eventlist.customColumn.name = "Operator"


.. _sec-scolv-scripts:

External scripts
----------------

User-defined scripts may generated and executed

* By :ref:`custom buttons <sec-scolv-buttons>`
* Automatically to show :ref:`custom information <sec-scolv-information>` in the
  Location, Event and the Events tabs.
  The information may include parameters derived from origins.


.. _sec-scolv-buttons:

Custom buttons
^^^^^^^^^^^^^^

scolv allows to add one custom button to the **Summary window** and two custom
buttons to the **Location tab**.
When pressing the custom buttons, user-defined external scripts are executed.
Configuration (:file:`scolv.cfg`):

* Button in Summary window. Configure: :confval:`scripts.export` and read
  :confval:`scripts.export` for the description of the parameters passed to the
  script.
* Up to 2 buttons in Location tab. Configure:

  * button1: :confval:`button0`, :confval:`scripts.script0`,
  * button2: :confval:`button1`,  :confval:`scripts.script1`.

  Read :confval:`scripts.script0` and :confval:`scripts.script1` for the
  description of the parameters passed to the scripts.


.. _sec-scolv-information:

Custom information in tabs
^^^^^^^^^^^^^^^^^^^^^^^^^^

Origin parameters can be derived by external scripts.
When configured for the scolv tabs *Location*, *Event* or *Events*, scolv will call
those scripts and writes a binary serialized origin object
to its standard input. scolv reads the script output and displays this value
only if the return code of the script is 0.

Below you find examples for

* Example custom script
* :ref:`Custom information in the Location tab <sec-scolv-parameters-location>`
* :ref:`Custom information in the Event tab <sec-scolv-parameters-event>`
* :ref:`Custom information in the Events tab <sec-scolv-parameters-events>`

.. _sec-scolv-example-script:

Example script reading origin parameters from stdin just returning the standard
error of the origin:

.. code-block:: python

   #!/usr/bin/env seiscomp-python
   from __future__ import print_function
   import sys
   from seiscomp import datamodel, io

   def main():
       ar = io.BinaryArchive()

       # Open standard input
       if not ar.open("-"):
           # Hmmm, opening stdin failed
           return 1

       # Read the object
       obj = ar.readObject()
       ar.close()

       # Try to cast obj to an origin
       org = datamodel.Origin.Cast(obj)
       # No origin -> error
       if not org:
           return 1

       # Try to print the standard error to stdout
       try:
           print(org.quality().standardError())
       # Field not set, return error
       except Exception:
           return 1

       return 0

   if __name__ == "__main__":
       sys.exit(main())

.. important:: The script must be executable. In Linux don't forget
   to call

   .. code-block:: sh

      chmod +x /path/to/script


As many scripts as necessary for evaluation can be created.

.. warning::

   Calling external scripts causes overhead and can take some time
   depending on the implementation of the script. scolv needs to access the
   database to fetch additional information which it does not need normally.
   The slower the database access, the longer it takes to display the results.


.. _sec-scolv-parameters-location:

Location tab
~~~~~~~~~~~~

To add the output of an external custom script to the information panel of the Location tab,
configure display parameters in scolv. An example script is given
:ref:`above <sec-scolv-example-script>`. Configuration example (:file:`scolv.cfg`):

.. code-block:: properties

   # Define the available add-ons to be used
   display.origin.addons = qual, qual2

   # Configure each add-on
   display.origin.addon.qual1.label = "Qual1"
   display.origin.addon.qual1.script = "@DATADIR@/scripts/scolv/script1"

   display.origin.addon.qual2.label = "Qual2"
   display.origin.addon.qual2.script = "@DATADIR@/scripts/scolv/script2"


.. _sec-scolv-parameters-event:

Event tab
~~~~~~~~~

Provide the external script and add the output to the **origin list of the Event tab**,
configure the eventedit parameters in :file:`global.cfg` or :file:`scolv.cfg`.
An example script is given :ref:`above <sec-scolv-example-script>`.
Configuration example:

.. code-block:: properties

   eventedit.scripts.columns = qual1, qual2

   eventedit.scripts.column.qual1.label = "Qual1"
   eventedit.scripts.column.qual1.pos = 8
   eventedit.scripts.column.qual1.script = "@DATADIR@/scripts/scolv/script1"

   eventedit.scripts.column.qual2.label = "Qual2"
   eventedit.scripts.column.qual2.pos = 9
   eventedit.scripts.column.qual2.script = "@DATADIR@/scripts/scolv/script2"


.. _sec-scolv-parameters-events:

Events tab
~~~~~~~~~~

From the event list external scripts can be excuted with :term:`origin` or
:term:`event` objects or both as input from stdin to display the output of the
script (stdout) in a custom column.

Provide an external script and add the output to **event list of the Events tab**,
configure the eventlist parameters in :file:`global.cfg` or :file:`scolv.cfg`.
An example script is given :ref:`above <sec-scolv-example-script>`.
Configuration example for passing origin or event objects:

.. code-block:: properties

   eventlist.scripts.columns = qual1, qual2

   eventlist.scripts.column.qual1.label = "Qual1"
   eventlist.scripts.column.qual1.pos = 5
   eventlist.scripts.column.qual1.script = "@DATADIR@/scripts/scolv/script1"
   eventlist.scripts.column.qual1.types = Origin

   eventlist.scripts.column.qual2.label = "Qual2"
   eventlist.scripts.column.qual2.pos = 6
   eventlist.scripts.column.qual2.script = "@DATADIR@/scripts/scolv/script2"
   eventlist.scripts.column.qual2.types = Event

Adding external scripts to the event list is the most expensive part. Whenever
the event list is reloaded, it will start to run the scripts on all origins
in the background. It can take a while until the complete list has been
processed. A progress indicator is plotted in the middle of the event list while
the background processes are running.


.. _scolv-settings:

Settings
========

All settings of scolv can be adjusted in its :ref:`configuration file <scolv_configuration>`.
However, some settings can be changed on-the-fly. The connection to the messaging
system and the database can be adjusted in the *Setup connection* dialog access
by pressing :kbd:`F2`. A window for adjusting scolv settings is
available which can be opened by pressing :kbd:`F3`.

.. warning::

   When pressing the Save button in the scolv settings menu, the parameters will be written
   to :file:`$HOME/.seiscomp/scolv.cfg` (use mode configuration) where they take
   priority over configurations in :file:`$SEISCOMP_ROOT/etc/scolv.cfg` (system mode configuration).


Global
------

This section contains settings for all the main tabs and *all* waveform windows.

.. figure:: media/scolv/settings-global.png
   :align: center

   Global settings


*Reduction velocity*
 Sets the reduction velocity used for plot *MoveOut*.

*Compute magnitudes after relocate*
 Automatically computes magnitudes after each relocation. This has the same
 effect as pressing "Compute magnitudes" manually.

*Compute magnitudes silently*
 Automatically closes the compute magnitudes dialog if the computation is
 finished and no error occurred.

*Draw grid lines*
 Enables dashed grid lines in all plots.

*Data source*
 Defines the waveform data source for both, pick review and amplitude review

*Default distance for "add station"*
 The default value to add stations (traces) that have not been picked or
 associated is 15 degrees. A lower value can be defined, e.g. if mainly local events are analyzed.

*Hide station traces without data and arrivals*
 If new stations are added during pick review or amplitude review and if no
 data is available for some of those stations, they will be hidden and not
 shown. Once data arrives the trace becomes visible.


Picker
------

This section contains settings for the picker window.

.. figure:: media/scolv/settings-picker.png
   :align: center

   Waveform picker settings

*Show cross hair cursor*
 Enables the cross hair cursor which shows the currently selected uncertainty
 ranges.

*Uncertainties*
 Select the current uncertainty set to be used (:confval:`picker.uncertainties.preferred`).

*Remove automatic station picks*
 If checked all automatic picks of a station with manual picks are removed once
 the manual review is confirmed.

*Remove all automatic picks*
 If checked all automatic picks are removed once the manual review is confirmed.


Magnitude review
----------------

This section contains settings for the magnitude waveform review window.

.. figure:: media/scolv/settings-amplitude.png
   :align: center

   Amplitude/magnitude review settings

*Waveform time window pre offset*
 Sets an offset before the used amplitude time window that is used when
 collecting data.

*Waveform time window post offset*
 Sets an offset after the used amplitude time window that is used when
 collecting data.

 The greater the offset the more the amplitude time window can be extended or
 shifted.


Units and precisions
--------------------

Local network users prefer the distance unit in kilometers while others prefer degrees.
scolv (as any other GUI) can be configured to show either the one or the other.

.. code-block:: properties

   # If true, show distances in km. Use degree otherwise.
   scheme.unit.distanceInKM = true

Furthermore the precision of various values can be configured:

.. code-block:: properties

   # Precision of depth values.
   scheme.precision.depth = 0
   # Precision of latitude/longitude values.
   scheme.precision.location = 2
   # Precision of magnitude values.
   scheme.precision.magnitude = 2
   # Precision of pick times (fractions of seconds).
   scheme.precision.pickTime = 1

.. note::

   Configuring units and precisions only affects the way the values are presented,
   not the values themselves. These and other lock-and-feel parameters can be
   adjusted in *scheme* section of the :ref:`global configuration <global>`.


.. _sec-scolv-hotkeys:

Hotkeys
=======

The following table describes the available key combinations and their triggered
actions in scolv. The hotkeys are provided for:

* Main window
* Picker window

  * all areas
  * upper area - picking trace
  * lower area - picker overview
* Magnitude waveform window.

+------------------------+-------------------------------------------------------------+
| Shortcut               | Description                                                 |
+========================+=============================================================+
| **Main window**        |                                                             |
+------------------------+-------------------------------------------------------------+
| F2                     | Setup connection dialog                                     |
+------------------------+-------------------------------------------------------------+
| F3                     | Picker and amplitude settings dialog                        |
+------------------------+-------------------------------------------------------------+
| F8                     | Display left event summary panel                            |
+------------------------+-------------------------------------------------------------+
| F9                     | Show ray paths and associated stations                      |
+------------------------+-------------------------------------------------------------+
| F10                    | Show event list (Events tab)                                |
+------------------------+-------------------------------------------------------------+
| F11                    | Toggle fullscreen                                           |
+------------------------+-------------------------------------------------------------+
| Ctrl+N                 | Create an unassociated artificial origin at the current map |
|                        | center                                                      |
+------------------------+-------------------------------------------------------------+
| Ctrl+Z                 | Go back to last origin (if available)                       |
+------------------------+-------------------------------------------------------------+
| Ctrl+Shift+Z           | Go to next origin (if available)                            |
+------------------------+-------------------------------------------------------------+
| Ctrl+PgUp              | Load previous event from the event list                     |
+------------------------+-------------------------------------------------------------+
| Ctrl+PgDown            | Load next event from the event list                         |
+------------------------+-------------------------------------------------------------+
| Mouse wheel            | Zoom map in/out                                             |
+------------------------+-------------------------------------------------------------+
| Double click           | Center map at the clicked position                          |
+------------------------+-------------------------------------------------------------+
| **Phase picker**       |                                                             |
+------------------------+-------------------------------------------------------------+
| 1 .. 9                 | Activate configured phase picking                           |
+------------------------+-------------------------------------------------------------+
| Esc                    | Leaving picking mode                                        |
+------------------------+-------------------------------------------------------------+
| F3                     | Add station                                                 |
+------------------------+-------------------------------------------------------------+
| F5                     | Relocate                                                    |
+------------------------+-------------------------------------------------------------+
| E                      | Switch to E-component                                       |
+------------------------+-------------------------------------------------------------+
| F                      | Toggle between current filter and unfiltered                |
+------------------------+-------------------------------------------------------------+
| Shift+F                | Toggle limiting filters to the selected trace               |
+------------------------+-------------------------------------------------------------+
| G                      | Toggle through all configured filters: descending           |
+------------------------+-------------------------------------------------------------+
| D                      | Toggle through all configured filters: ascending            |
+------------------------+-------------------------------------------------------------+
| N                      | Switch to N-component                                       |
+------------------------+-------------------------------------------------------------+
| S                      | Maximize visible amplitudes                                 |
+------------------------+-------------------------------------------------------------+
| X                      | Deactivate a trace and scroll down (through the traces)     |
+------------------------+-------------------------------------------------------------+
| Z                      | Switch to Z-component                                       |
+------------------------+-------------------------------------------------------------+
| Up                     | Scroll up (through the traces)                              |
+------------------------+-------------------------------------------------------------+
| Down                   | Scroll down (through the traces)                            |
+------------------------+-------------------------------------------------------------+
| >                      | Increase time scale                                         |
+------------------------+-------------------------------------------------------------+
| <                      | Decrease time scale                                         |
+------------------------+-------------------------------------------------------------+
| Ctrl+S                 | Show Fourier spectrum of selected trace                     |
+------------------------+-------------------------------------------------------------+
| Ctrl+N                 | Default trace view                                          |
+------------------------+-------------------------------------------------------------+
| Ctrl+T                 | Toggle display of theoretical arrivals                      |
+------------------------+-------------------------------------------------------------+
| Ctrl+P                 | Toggle display of picks (not arrivals). If picks should     |
|                        | be shown the first time, all picks within the time span of  |
|                        | interest are loaded from database. The behavior is the      |
|                        | same as ticking the option "Load all picks".                |
+------------------------+-------------------------------------------------------------+
| Ctrl+Right             | Time zoom in                                                |
+------------------------+-------------------------------------------------------------+
| Ctrl+Left              | Time zoom out                                               |
+------------------------+-------------------------------------------------------------+
| Ctrl+0                 | Align by origin time                                        |
+------------------------+-------------------------------------------------------------+
| Ctrl+[1..9]            | Align on 1st - 9th favorite phase                           |
+------------------------+-------------------------------------------------------------+
| Ctrl+Shift+[1..9]      | Align on theoretical onset of 1st - 9th favorite phase      |
+------------------------+-------------------------------------------------------------+
| Ctrl+F1                | Align on P arrival                                          |
+------------------------+-------------------------------------------------------------+
| Ctrl+F2                | Align on S arrival                                          |
+------------------------+-------------------------------------------------------------+
| Alt+Right              | Jump to next marker (picking mode)                          |
+------------------------+-------------------------------------------------------------+
| Alt+Left               | Jump to previous marker (picking mode)                      |
+------------------------+-------------------------------------------------------------+
| *Picking trace*        |                                                             |
+------------------------+-------------------------------------------------------------+
| R                      | Active picker: Repick phase by the selection, e.g. AIC, BK  |
+------------------------+-------------------------------------------------------------+
| T                      | Temporarily toggle 3 component view                         |
+------------------------+-------------------------------------------------------------+
| Space                  | Active picker: Set pick at curser position                  |
+------------------------+-------------------------------------------------------------+
| Space                  | Inactive picker: Show Fourier spectrum from visible window  |
+------------------------+-------------------------------------------------------------+
| Enter                  | Active picker: Set pick at curser position, load next trace |
+------------------------+-------------------------------------------------------------+
| Left                   | Move trace view to left (fine)                              |
+------------------------+-------------------------------------------------------------+
| Right                  | Move trace view to right (fine)                             |
+------------------------+-------------------------------------------------------------+
| Shift+Left             | Move trace view to left (rough)                             |
+------------------------+-------------------------------------------------------------+
| Shift+Right            | Move trace view to left (rough)                             |
+------------------------+-------------------------------------------------------------+
| Shift+Delete           | Remove polarity from new pick                               |
+------------------------+-------------------------------------------------------------+
| Shift+Down             | Set negative polarity on new pick                           |
+------------------------+-------------------------------------------------------------+
| Shift+Up               | Set positive polarity on new pick                           |
+------------------------+-------------------------------------------------------------+
| Shift+X                | Set positive polarity to undecidable on new pick            |
+------------------------+-------------------------------------------------------------+
| Ctrl+WheelUp           | Amplitude zoom in                                           |
+------------------------+-------------------------------------------------------------+
| Ctrl+WheelDown         | Amplitude zoom out                                          |
+------------------------+-------------------------------------------------------------+
| Ctrl+Up                | Amplitude zoom in                                           |
+------------------------+-------------------------------------------------------------+
| Ctrl+Down              | Amplitude zoom out                                          |
+------------------------+-------------------------------------------------------------+
| Shift+S                | Toggle spectrogram of selected trace                        |
+------------------------+-------------------------------------------------------------+
| Shift+WheelUp          | Time zoom in                                                |
+------------------------+-------------------------------------------------------------+
| Shift+WheelDown        | Time zoom out                                               |
+------------------------+-------------------------------------------------------------+
| W                      | Reset zoom window to the length of the picking overview     |
+------------------------+-------------------------------------------------------------+
| *Picking overview*     |                                                             |
+------------------------+-------------------------------------------------------------+
| Alt+D                  | Sort by distance                                            |
+------------------------+-------------------------------------------------------------+
| Alt+R                  | Sort by residual                                            |
+------------------------+-------------------------------------------------------------+
| Ctrl+F                 | Search for station code                                     |
+------------------------+-------------------------------------------------------------+
| Ctrl+Up                | Time zoom in                                                |
+------------------------+-------------------------------------------------------------+
| Ctrl+Down              | Time zoom out                                               |
+------------------------+-------------------------------------------------------------+
| Ctrl+Shift+WheelUp     | Time and amplitude zoom in                                  |
+------------------------+-------------------------------------------------------------+
| Ctrl+Shift+WheelDown   | Time and amplitude zoom out                                 |
+------------------------+-------------------------------------------------------------+
| Y                      | Decrease row height                                         |
+------------------------+-------------------------------------------------------------+
| Shift+Y                | Increase row height                                         |
+------------------------+-------------------------------------------------------------+
| **Amplitude picker**   |                                                             |
+------------------------+-------------------------------------------------------------+
| *Zoom trace*           |                                                             |
+------------------------+-------------------------------------------------------------+
| Ctrl+Down              | Scale amplitudes down                                       |
+------------------------+-------------------------------------------------------------+
| Ctrl+Up                | Scale amplitudes up                                         |
+------------------------+-------------------------------------------------------------+
| Ctrl+Right             | Decrease visible time span (zoom in)                        |
+------------------------+-------------------------------------------------------------+
| Ctrl+Left              | Increase visible time span (zoom out)                       |
+------------------------+-------------------------------------------------------------+
| W                      | Reset zoom window to the length of the picking overview     |
+------------------------+-------------------------------------------------------------+
| *Trace overview*       |                                                             |
+------------------------+-------------------------------------------------------------+
| F5                     | Compute network magnitudes and return to Magnitudes tab     |
+------------------------+-------------------------------------------------------------+
| 1                      | Pick amplitudes manually                                    |
+------------------------+-------------------------------------------------------------+
| ESC                    | Leave picking mode                                          |
+------------------------+-------------------------------------------------------------+
| F                      | Toggle filter                                               |
+------------------------+-------------------------------------------------------------+
| Shift+N                | Default view                                                |
+------------------------+-------------------------------------------------------------+
| Left                   | Move trace view to left (fine)                              |
+------------------------+-------------------------------------------------------------+
| Right                  | Move trace view to right (fine)                             |
+------------------------+-------------------------------------------------------------+
| Shift+Left             | Move trace view to left (rough)                             |
+------------------------+-------------------------------------------------------------+
| Shift+Right            | Move trace view to left (rough)                             |
+------------------------+-------------------------------------------------------------+
| R                      | Recompute amplitude of selected station                     |
+------------------------+-------------------------------------------------------------+
| Shift+W                | Reset all noise and signal time windows as configured       |
+------------------------+-------------------------------------------------------------+
| X                      | Deactivate selected pick or station                         |
+------------------------+-------------------------------------------------------------+
| Y                      | Decrease row height                                         |
+------------------------+-------------------------------------------------------------+
| Shift+Y                | Increase row height                                         |
+------------------------+-------------------------------------------------------------+
| >                      | Increase time scale                                         |
+------------------------+-------------------------------------------------------------+
| <                      | Decrease time scale                                         |
+------------------------+-------------------------------------------------------------+
| Alt+A                  | Sort traces by distance                                     |
+------------------------+-------------------------------------------------------------+
| Alt+D                  | Sort traces by station name                                 |
+------------------------+-------------------------------------------------------------+
| Alt+D                  | Sort traces by station name                                 |
+------------------------+-------------------------------------------------------------+
| Left                   | Move trace view to left (fine)                              |
+------------------------+-------------------------------------------------------------+
| Right                  | Move trace view to right (fine)                             |
+------------------------+-------------------------------------------------------------+
| Shift+Left             | Move trace view to left (rough)                             |
+------------------------+-------------------------------------------------------------+
| Ctrl+0                 | Align traces by origin time                                 |
+------------------------+-------------------------------------------------------------+
| Ctrl+1                 | Align traces by trigger time                                |
+------------------------+-------------------------------------------------------------+


.. _scolv_configuration:

Module Configuration
====================

| :file:`etc/defaults/global.cfg`
| :file:`etc/defaults/scolv.cfg`
| :file:`etc/global.cfg`
| :file:`etc/scolv.cfg`
| :file:`~/.seiscomp/global.cfg`
| :file:`~/.seiscomp/scolv.cfg`

scolv inherits :ref:`global options<global-configuration>`.



.. confval:: loadEventDB

   Default: ``1``

   Type: *double*

   Unit: *days*

   Number of days to preload events from the database when staring scolv.


.. confval:: magnitudes

   Default: ``MLv,mb,mB,Mwp``

   Type: *list:string*

   List of magnitude types to be calculated when computing
   magnitudes. This list can be altered interactively so it
   reflects only the default unless computeMagnitudesSilently
   is set to true. The configured types should include all
   types which are also computed by scmag in order to allow
   their processing in scolv. Otherwise scmag may add
   magnitudes to origins without interaction in scolv.


.. confval:: visibleMagnitudes

   Default: ``M,ML,MLv,mb,mB,Mwp,Mjma,Ms_20,Ms(BB)``

   Type: *list:string*

   A list of magnitude types to be displayed in the summary widget \(F8\).


.. confval:: button0

   Type: *string*

   Label of the button that triggers the script defined in
   \"scripts.script0\".


.. confval:: button1

   Type: *string*

   Label of the button that triggers the script defined in
   \"scripts.script1\".


.. note::
   **scripts.\***
   *Define scripts linked to extra buttons. A button is created*
   *by definition of the corresponding script.*



.. confval:: scripts.export

   Type: *string*

   Full path to the script which enables a publish button in the
   summary panel on the left side of scolv \(activated with F8\).


.. confval:: scripts.script0

   Type: *string*

   Full path to the script executed when hitting the button labeled with \"button0\".
   OriginID and EventID are passed to the script as arguments.


.. confval:: scripts.script1

   Type: *string*

   Full path to the script executed when hitting the button labeled with \"button1\".
   OriginID and EventID are passed to the script as arguments.


.. confval:: scripts.export.silentTerminate

   Default: ``false``

   Type: *string*

   If the publish button is clicked while another script is
   still running, a message box pops up with a warning that
   a script is still running and to option to terminate it. If
   this flag is true, then it will be terminated automatically
   without user interaction and the warning message.


.. confval:: olv.defaultEventType

   Type: *string*

   Sets the default event type to be used when confirming a solution. If
   not set, the event type is not changed at all unless \"with options\"
   is used. The origin or its source must be associated with an event already.


.. confval:: olv.commonEventTypes

   Type: *list:string*

   A list of event types which are commonly set. This defines
   a priority list which will be displayed on top of the event
   type selection menu. Additionally the remaining \(non\-prioritized\)
   types are displayed with less contrast.
   The order is preserved in the event editor as well as in the drop\-down
   list of the \"Commit with additional options\" dialog.


.. confval:: olv.defaultMagnitudeAggregation

   Type: *string*

   Sets the default magnitude aggregation method. It can be either \"mean\",
   \"trimmed mean\" or \"median\". If not set, the default
   behavior is used which computes the mean if less than 4 stations are available,
   trimmed mean otherwise.


.. confval:: olv.computeMagnitudesAfterRelocate

   Default: ``false``

   Type: *boolean*

   Automatically starts computation of magnitudes after relocating an
   origin.


.. confval:: olv.computeMagnitudesSilently

   Default: ``false``

   Type: *boolean*

   Starts magnitude computation without user interaction if everything
   runs without errors. In case of errors a window pops up with
   the current state of processing.


.. confval:: olv.enableMagnitudeSelection

   Default: ``true``

   Type: *boolean*

   If enabled, a magnitude selection pop window will open
   in advance to compute magnitudes. The default selection
   reflects the configuration parameter \"magnitudes\".


.. confval:: olv.Pvel

   Default: ``6.0``

   Type: *double*

   Unit: *km/s*

   The velocity applied to reduce travel times in the
   \"MoveOut\" plot of the Location tab.


.. confval:: olv.drawMapLines

   Default: ``true``

   Type: *boolean*

   Sets the drawing of lines in the map connecting the station with the event.


.. confval:: olv.drawGridLines

   Default: ``true``

   Type: *boolean*

   Sets the drawing of grid lines in the plot.


.. confval:: olv.computeMissingTakeOffAngles

   Default: ``true``

   Type: *boolean*

   If a locator does not populate the take off angle in its arrivals,
   the first motion plot will not show picked polarities. This option
   defines whether to compute take off angles that are not present
   in the arrivals or not.


.. confval:: olv.defaultAddStationsDistance

   Default: ``15.0``

   Type: *double*

   Unit: *deg*

   The default value for adding unassociated stations in the picker.


.. confval:: olv.hideStationsWithoutData

   Default: ``false``

   Type: *boolean*

   If enabled, all traces without data and arrivals are
   hidden in the picker.


.. confval:: olv.hideDisabledStations

   Default: ``false``

   Type: *boolean*

   If enabled, all traces of disabled stations without picks are hidden.


.. confval:: olv.defaultDepth

   Default: ``10.0``

   Type: *double*

   Unit: *km*

   When creating an artificial origin this is the default depth used.


.. confval:: olv.artificialOriginAdvanced

   Default: ``false``

   Type: *boolean*

   Adds advanced input parameters in artificial origin dialog.


.. confval:: olv.systemTray

   Default: ``true``

   Type: *boolean*

   Adds an icon to the system tray and displays a message
   when a new event was received.


.. confval:: olv.originComments

   Type: *list:string*

   A list of origin comment profiles. These profiles will be
   used to populate origin comments when committing an origin.


.. confval:: olv.magnitudeComments

   Type: *list:string*

   A list of magnitude comment profiles. These profiles will be
   used to populate magnitude comments when committing a magnitude.


.. confval:: olv.map.stations.unassociatedMaxDist

   Default: ``360.0``

   Type: *double*

   Unit: *deg*

   Maximum distance in degrees up to which also unassociated stations are
   shown in the map. 360.0 deg which will
   show all unassociated stations.


.. confval:: olv.map.event.defaultRadius

   Default: ``-1.0``

   Type: *double*

   Unit: *deg*

   Default map radius in degrees if a new event is selected.
   A negative value restores the default behavior.


.. confval:: olv.arrivalTable.visibleColumns

   Type: *list:string*

   Defines the visible columns in the arrival table. Valid tokens are:
   Used, Status, Phase, Weight, Method, Polarity, Takeoff,
   Net, Sta, Loc\/Cha, Timeres, Dis, Az, Time, +\/\-,
   Slo, Slores, Baz, Bazres, Created, Latency


.. confval:: olv.arrivalPlot.showUncertainties

   Default: ``true``

   Type: *boolean*

   Whether the arrival plot should show uncertainties
   or not by default. That flag can be toggled with 'e'
   or via the context menu during runtime.


.. confval:: olv.locator.interface

   Default: ``LOCSAT``

   Type: *string*

   The default locator interface to use.


.. confval:: olv.locator.defaultProfile

   Type: *string*

   The default locator profile to use.


.. confval:: olv.locator.minimumDepth

   Type: *double*

   Unit: *km*

   Minimum depth which is set if the locator used supports fixing
   the depth. If the depth is lower than this value, the depth is
   fixed to this configured value and the origin is relocated again.


.. confval:: olv.locator.presetFromOrigin

   Default: ``false``

   Type: *boolean*

   Whether to preset the locator settings when an origin
   is being loaded. It tries to figure the locator type
   from Origin.methodID and the profile from Origin.earthModelID.


.. confval:: olv.commit.forceEventAssociation

   Default: ``false``

   Type: *boolean*

   Activates the button \"Force association with event\" when
   committing with additional options. This is just the default
   setting and can be changed manually when the dialog pops up.


.. confval:: olv.commit.fixOrigin

   Default: ``false``

   Type: *boolean*

   Activates the button \"Fix this origin as preferred solution\" when
   committing with additional options. This is just the default
   setting and can be changed manually when the dialog pops up.


.. confval:: olv.commit.returnToEventList

   Default: ``false``

   Type: *boolean*

   Whether to return to the event list after committing with
   additional options or not.


.. confval:: olv.commit.eventCommentOptions

   Type: *list:string*

   Turns the event comment input field into a drop down box
   allowing the user to select from a list a predefined comment
   values which may be changed if required.


.. note::
   **olv.originComments.\***
   *The container for all origin comment profiles.*



.. note::

   **olv.originComments.$name.\***
   $name is a placeholder for the name to be used and needs to be added to :confval:`olv.originComments` to become active.

   .. code-block:: sh

      olv.originComments = a,b
      olv.originComments.a.value1 = ...
      olv.originComments.b.value1 = ...
      # c is not active because it has not been added
      # to the list of olv.originComments
      olv.originComments.c.value1 = ...


.. confval:: olv.originComments.$name.id

   Type: *string*

   The id of the comment to be added, updated or removed.


.. confval:: olv.originComments.$name.label

   Type: *string*

   The label shown in the commit dialog.


.. confval:: olv.originComments.$name.options

   Type: *list:string*

   A list of options to select from. Actually the values
   to populate the dropdown list with.


.. confval:: olv.originComments.$name.allowFreeText

   Default: ``false``

   Type: *boolean*

   If free text is allowed in addition to the predefined
   values.


.. note::
   **olv.customCommits.\***
   *Configure custom commit buttons which*
   *behave like shortcuts to "Commit with additional options".*
   *Pressing a custom button does not open a popup window. Instead*
   *it reads the configured profile and applies the options to the event*
   *and origin. Each commit button can be coloured and labeled.*



.. note::

   **olv.customCommits.$name.\***
   $name is a placeholder for the name to be used.


.. confval:: olv.customCommits.$name.enable

   Default: ``true``

   Type: *boolean*

   Enable this commit button.


.. confval:: olv.customCommits.$name.askForConfirmation

   Default: ``false``

   Type: *boolean*

   Ask for confirmation by presenting the \"commit with options\"
   dialog with the options pre\-populated from this configuration.
   Cancelling the dialog aborts the commit procedure.


.. confval:: olv.customCommits.$name.forceEventAssociation

   Default: ``false``

   Type: *boolean*

   Associate a new origin to the currently active event or not.


.. confval:: olv.customCommits.$name.fixOrigin

   Default: ``false``

   Type: *boolean*

   Fix the origin as preferred
   solution in the event it is associated to.


.. confval:: olv.customCommits.$name.eventType

   Type: *string*

   The event type to be set of the event associated with
   the committed origin. If unset, the type remains unchanged.
   Use quotes for event types with spaces, e.g.
   \"not existing\".


.. confval:: olv.customCommits.$name.eventTypeCertainty

   Type: *string*

   The event type certainty to be set of the event
   associated with the committed origin. If unset,
   the type certainty remains unchanged.


.. confval:: olv.customCommits.$name.originStatus

   Type: *string*

   The status to be set of the origin being
   committed. If unset, the status remains unchanged.
   If empty, the origin status will be set to none.


.. confval:: olv.customCommits.$name.magnitudeType

   Type: *string*

   Sets the preferred magnitude type of the event. If
   unset, no changes will be requested. If empty,
   the currently fixed preferred magnitude type will
   be reset.


.. confval:: olv.customCommits.$name.eventName

   Type: *string*

   Optional event name which will be set. This option
   exists for completeness and does not make much
   sense to be applied on any event. Use quotes for event
   names with spaces, e.g. \"Quarry XYZ\".


.. confval:: olv.customCommits.$name.eventComment

   Type: *string*

   Optional event comment which will be set. Use quotes for event
   comments with spaces, e.g. \"Blast on Monday morning\".


.. confval:: olv.customCommits.$name.returnToEventList

   Default: ``false``

   Type: *boolean*

   Return to the event list after committing or not.


.. confval:: olv.customCommits.$name.label

   Default: ``Commit+``

   Type: *string*

   The commit button label. Use quotes for labels with
   spaces, e.g. \"Earthquake reported\".


.. confval:: olv.customCommits.$name.color

   Type: *color*

   Optional primary color for the bulk commit button.
   Use hexadecimal values.


.. confval:: olv.customCommits.$name.colorText

   Type: *color*

   Optional text color for the bulk commit button.
   Use hexadecimal values.


.. confval:: olv.customCommits.$name.tooltip

   Default: ``false``

   Type: *boolean*

   Add a summary of the actions to the button's tooltip.


.. note::
   **olv.magnitudeComments.\***
   *The container for all magnitude comment profiles.*



.. note::

   **olv.magnitudeComments.$name.\***
   $name is a placeholder for the name to be used and needs to be added to :confval:`olv.magnitudeComments` to become active.

   .. code-block:: sh

      olv.magnitudeComments = a,b
      olv.magnitudeComments.a.value1 = ...
      olv.magnitudeComments.b.value1 = ...
      # c is not active because it has not been added
      # to the list of olv.magnitudeComments
      olv.magnitudeComments.c.value1 = ...


.. confval:: olv.magnitudeComments.$name.id

   Type: *string*

   The id of the comment to be added, updated or removed.


.. confval:: olv.magnitudeComments.$name.label

   Type: *string*

   The label shown in the magnitude view.


.. confval:: olv.magnitudeComments.$name.options

   Type: *list:string*

   A list of options to select from. Actually the values
   to populate the dropdown list with.


.. confval:: olv.magnitudeComments.$name.allowFreeText

   Default: ``false``

   Type: *boolean*

   If free text is allowed in addition to the predefined
   values.


.. note::
   **picker.\***
   *Parameters controlling the phase picker window.*



.. confval:: picker.showCrossHairCursor

   Default: ``false``

   Type: *boolean*

   Activate a cross hair cursor showing the configured uncertainties
   when in picking mode.


.. confval:: picker.loadAllPicks

   Default: ``true``

   Type: *boolean*

   Load all existing picks for the requested data time window.


.. confval:: picker.ignoreUnconfiguredStations

   Default: ``false``

   Type: *boolean*

   If enabled, the picker will not add stations that are not
   configured with a detecStream in global bindings.


.. confval:: picker.limitStationAcquisition

   Default: ``false``

   Type: *boolean*

   Limit the data acquisition to the number of nearest
   stations given by \"picker.limitStationAcquisitionCount\".


.. confval:: picker.limitStationAcquisitionCount

   Default: ``10``

   Type: *int*

   Limit the data acquisituion to the given number of
   the nearest stations. Requires to activate
   \"picker.limitStationAcquisition\".


.. confval:: picker.loadStrongMotion

   Default: ``false``

   Type: *boolean*

   If enabled, acceleration data is loaded for co\-located
   stations where picked on velocity data.


.. confval:: picker.loadAllComponents

   Default: ``false``

   Type: *boolean*

   Load all three components by default. If disabled, additional
   components are fetched upon request.


.. confval:: picker.showAllComponents

   Default: ``false``

   Type: *boolean*

   If enabled, all three components are shown in the picker
   zoom trace. The distance is limited to what is configured
   in \"picker.allComponentsMaximumDistance\".


.. confval:: picker.allComponentsMaximumDistance

   Default: ``10``

   Type: *double*

   Unit: *deg*

   The distance limit for the \"picker.showAllComponents\" flag.


.. confval:: picker.usePerStreamTimeWindows

   Default: ``false``

   Type: *boolean*

   If enabled, data is requested around the P pick for each stations.
   Otherwise origin time is used and the time window for all stations
   is the same.


.. confval:: picker.removeAutomaticPicksFromStationAfterManualReview

   Default: ``false``

   Type: *boolean*

   After picking and pushing the solution back to scolv all automatic arrivals
   are removed from a station if a manual pick exists.


.. confval:: picker.removeAllAutomaticPicksAfterManualReview

   Default: ``false``

   Type: *boolean*

   After picking and pushing the solution back to scolv all automatic arrivals
   are removed from all stations regardless if a manual pick exists or not.


.. confval:: picker.preOffset

   Default: ``60``

   Type: *int*

   Unit: *s*

   The data time span added to the left of either origin time or
   first arrival depending on the usePerStreamTimeWindows flag.


.. confval:: picker.postOffset

   Default: ``120``

   Type: *int*

   Unit: *s*

   The data time span added to the right of the requested time window.


.. confval:: picker.minimumTimeWindow

   Default: ``1800``

   Type: *int*

   Unit: *s*

   Minimum data time window length.


.. confval:: picker.alignmentPosition

   Default: ``0.5``

   Type: *double*

   Unit: *s*

   Defines the relative position of the alignment when traces are
   aligned at a phase. This value is bound
   to interval [0:1] where 0 is the left side and 1 is right
   side of the trace window.


.. confval:: picker.repickerStart

   Type: *double*

   Unit: *s*

   Start of the re\-picker time window relative the cursor position on the trace.


.. confval:: picker.repickerEnd

   Type: *double*

   Unit: *s*

   End of the re\-picker time window relative the cursor position on the trace.


.. confval:: picker.filters

   Type: *list:string*

   List of filters available in the picker. Format:
   \"name1;filter\-definition1\", \"name2;filter\-definition2\"


.. confval:: picker.velocityChannelCodes

   Type: *list:string*

   A list of channel codes to be used when searching for
   velocity channels. Usually this information is part of the
   meta data. In case it is not, this list is used.


.. confval:: picker.accelerationChannelCodes

   Type: *list:string*

   A list of channel codes to be used when searching for
   acceleration channels. Usually this information is part of the
   meta data. In case it is not, this list is used.


.. confval:: picker.showPhases

   Default: ``P,Pn,Pg,pP,sP,S,Sg``

   Type: *list:string*

   Phases for which theoretical arrival times are shown.


.. confval:: picker.phases

   Type: *list:string*

   A list of phases that is available for picking in the Picking menu.
   The phases are not accessible through hot keys as for
   \"picker.phases.favourites\".
   The phases are considered if the more complex phase group definition
   \"picker.phases.groups\" is not provided.


.. confval:: picker.uncertainties

   Type: *list:string*

   Unit: *s*

   List of pre\-defined pick uncertainties.
   The format of each list item is either a double value or a pair of
   double values for asymmetric uncertainties, e.g.
   \"val1\",\"\(val2,val3\)\".
   This parameter is only used if \"picker.uncertainties.preferred\"
   is undefined.


.. confval:: picker.componentFollowsMouse

   Default: ``false``

   Type: *boolean*

   If enabled then the currently selected component for all traces
   will be activated according to the mouse position in the
   zoom trace \(old behaviour\). If disabled \(default\) then only
   the component of the zoom trace will change but the overall
   component will stay the same. It must be changed explicitely.


.. note::
   **picker.auxiliary.\***
   *Define the notion and behaviour of auxiliary channels.*
   *They are identified through configurable patterns and if*
   *identified as such they will be treated differently in*
   *defined situations.*



.. confval:: picker.auxiliary.channels

   Type: *list:string*

   A list of wildcard patterns to identify auxiliary
   channels. A pattern is simply checked against a stream
   ID, the concatenation of NSLC separated by a period.


.. confval:: picker.auxiliary.minimumDistance

   Default: ``0``

   Type: *double*

   Unit: *deg*

   The minimum distance in degrees from origin to load an
   unassociated auxiliary channel. Loading a
   channel \/ station explicitely \(F3\) will not respect
   this setting.


.. confval:: picker.auxiliary.maximumDistance

   Default: ``1000``

   Type: *double*

   Unit: *deg*

   The maximum distance in degrees from origin to load an
   unassociated auxiliary channel. Loading a
   channel \/ station explicitely \(F3\) will not respect
   this setting.


.. note::
   **picker.phases.\***
   *Phases defined for picking. The phase phases can be selected*
   *from the Picking menu of the picker window.*
   *Make sure, the locator can handle all defined phases.*



.. confval:: picker.phases.favourites

   Default: ``P,Pn,Pg,pP,S,Sg,sP``

   Type: *list:string*

   Phase types available for rapid picking by hot keys and
   in the Picking menu. Separate the types by comma.


.. confval:: picker.phases.groups

   Type: *list:string*

   List of defined phase type profiles to be considered.
   Separate profiles by comma.


.. note::
   **picker.phases.groups.\***
   *Definiton of phase type profiles. The profiles and phase types*
   *can be selected from the Picking menu of the picker window*
   *but not with hot keys.*



.. note::

   **picker.phases.groups.$name.\***
   $name is a placeholder for the name to be used and needs to be added to :confval:`picker.phases.groups` to become active.

   .. code-block:: sh

      picker.phases.groups = a,b
      picker.phases.groups.a = ...
      picker.phases.groups.b = ...
      # c is not active because it has not been added
      # to the list of picker.phases.groups
      picker.phases.groups.c = ...


.. confval:: picker.phases.groups.$name

   Type: *list:string*

   List of phase types. Separate types by comma.


.. note::
   **picker.uncertainties.\***
   *Define uncertainty profiles. Once defined,*
   *they can be selected in the scolv picker settings [F3].*
   *The profiles override uncertainties defined in "uncertainties".*



.. confval:: picker.uncertainties.preferred

   Type: *list:string*

   Pick uncertainty profiles to be loaded. The first profile
   will be used by default.


.. note::

   **picker.uncertainties.profile.$name.\***
   $name is a placeholder for the name to be used and needs to be added to :confval:`picker.uncertainties.preferred` to become active.

   .. code-block:: sh

      picker.uncertainties.preferred = a,b
      picker.uncertainties.profile.a = ...
      picker.uncertainties.profile.b = ...
      # c is not active because it has not been added
      # to the list of picker.uncertainties.preferred
      picker.uncertainties.profile.c = ...


.. confval:: picker.uncertainties.profile.$name

   Type: *list:string*

   Unit: *s*

   List of pre\-defined pick uncertainties.
   The format of each list item is either a double value or a pair of
   double values for asymmetric uncertainties, e.g.
   \"val1\",\"\(val2,val3\)\".


.. note::
   **picker.integration.\***
   *Settings related to waveform integration which may be*
   *required if the desired waveform unit is changed and the*
   *sensor data must be integrated once or multiple times.*



.. confval:: picker.integration.preFilter

   Type: *string*

   An optional pre\-filter which is applied prior to the
   numerical integration to stabilize the result. This
   filter is applied for each integration step or just
   once depending on the parameter \"applyOnce\".
   Multiple integrations are necessary if acceleration
   data should be converted to displacement.


.. confval:: picker.integration.applyOnce

   Default: ``true``

   Type: *boolean*

   Whether to apply the pre\-filter only prior the first
   integration step or prior to each step.


.. note::
   **amplitudePicker.\***
   *Parameters controlling the amplitude picker window for computing station magnitudes.*



.. confval:: amplitudePicker.preOffset

   Default: ``300``

   Type: *int*

   Unit: *s*

   Time span in seconds to be added to the left of the used
   amplitude time window.


.. confval:: amplitudePicker.postOffset

   Default: ``300``

   Type: *int*

   Unit: *s*

   Time span in seconds to be added to the right of the used
   amplitude time window.


.. confval:: amplitudePicker.filters

   Type: *list:string*

   A list of filters used for the amplitude picker. Format:
   \"name1;filter\-definition1\", \"name2;filter\-definition2\"


.. note::
   **display.\***
   *Display custom information in the Location tab.*



.. note::
   **display.origin.\***
   *Origin information to show. Event comments can be*
   *processed by addons or shown in the event list as*
   *configured by global parameters.*



.. confval:: display.origin.addons

   Type: *list:string*

   Name\(s\) of quality addon profile\(s\) to be considered.
   The profiles provide values through a script which are
   shown in the location tab. The scolv documentation
   provides an example script.


.. note::
   **display.origin.comment.\***
   *Origin comment value to be shown based on its comment ID.*



.. confval:: display.origin.comment.id

   Type: *string*

   ID of the origin comment to be considered.


.. confval:: display.origin.comment.default

   Type: *string*

   Value to be shown in case no valid origin comment is found.


.. confval:: display.origin.comment.label

   Type: *string*

   Label of the value to be shown.


.. note::

   **display.origin.addon.$name.\***
   $name is a placeholder for the name to be used and needs to be added to :confval:`display.origin.addons` to become active.

   .. code-block:: sh

      display.origin.addons = a,b
      display.origin.addon.a.value1 = ...
      display.origin.addon.b.value1 = ...
      # c is not active because it has not been added
      # to the list of display.origin.addons
      display.origin.addon.c.value1 = ...


.. confval:: display.origin.addon.$name.label

   Type: *string*

   Defines the label text of the information panel in the
   Location tab of the parameter evaluated by this addon.


.. confval:: display.origin.addon.$name.script

   Type: *string*

   Path to script to execute.



Command-Line Options
====================

.. program:: scolv

:program:`scolv [options]`


Generic
-------

.. option:: -h, --help

   Show help message.

.. option:: -V, --version

   Show version information.

.. option:: --config-file arg

   Use alternative configuration file. When this option is
   used the loading of all stages is disabled. Only the
   given configuration file is parsed and used. To use
   another name for the configuration create a symbolic
   link of the application or copy it. Example:
   scautopick \-> scautopick2.

.. option:: --plugins arg

   Load given plugins.

.. option:: --auto-shutdown arg

   Enable\/disable self\-shutdown because a master module shutdown.
   This only works when messaging is enabled and the master
   module sends a shutdown message \(enabled with \-\-start\-stop\-msg
   for the master module\).

.. option:: --shutdown-master-module arg

   Set the name of the master\-module used for auto\-shutdown.
   This is the application name of the module actually
   started. If symlinks are used, then it is the name of
   the symlinked application.

.. option:: --shutdown-master-username arg

   Set the name of the master\-username of the messaging
   used for auto\-shutdown. If \"shutdown\-master\-module\" is
   given as well, this parameter is ignored.


Verbosity
---------

.. option:: --verbosity arg

   Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info,
   4:debug.

.. option:: -v, --v

   Increase verbosity level \(may be repeated, eg. \-vv\).

.. option:: -q, --quiet

   Quiet mode: no logging output.

.. option:: --component arg

   Limit the logging to a certain component. This option can
   be given more than once.

.. option:: -s, --syslog

   Use syslog logging backend. The output usually goes to
   \/var\/lib\/messages.

.. option:: -l, --lockfile arg

   Path to lock file.

.. option:: --console arg

   Send log output to stdout.

.. option:: --debug

   Execute in debug mode.
   Equivalent to \-\-verbosity\=4 \-\-console\=1 .

.. option:: --log-file arg

   Use alternative log file.


Messaging
---------

.. option:: -u, --user arg

   Overrides configuration parameter :confval:`connection.username`.

.. option:: -H, --host arg

   Overrides configuration parameter :confval:`connection.server`.

.. option:: -t, --timeout arg

   Overrides configuration parameter :confval:`connection.timeout`.

.. option:: -g, --primary-group arg

   Overrides configuration parameter :confval:`connection.primaryGroup`.

.. option:: -S, --subscribe-group arg

   A group to subscribe to.
   This option can be given more than once.

.. option:: --content-type arg

   Overrides configuration parameter :confval:`connection.contentType`.

.. option:: --start-stop-msg arg

   Set sending of a start and a stop message.


Database
--------

.. option:: --db-driver-list

   List all supported database drivers.

.. option:: -d, --database arg

   The database connection string, format:
   service:\/\/user:pwd\@host\/database.
   \"service\" is the name of the database driver which
   can be queried with \"\-\-db\-driver\-list\".

.. option:: --config-module arg

   The config module to use.

.. option:: --inventory-db arg

   Load the inventory from the given database or file, format:
   [service:\/\/]location .

.. option:: --db-disable

   Do not use the database at all


Records
-------

.. option:: --record-driver-list

   List all supported record stream drivers.

.. option:: -I, --record-url arg

   The recordstream source URL, format:
   [service:\/\/]location[#type].
   \"service\" is the name of the recordstream driver
   which can be queried with \"\-\-record\-driver\-list\".
   If \"service\" is not given, \"file:\/\/\" is
   used.

.. option:: --record-file arg

   Specify a file as record source.

.. option:: --record-type arg

   Specify a type for the records being read.


Cities
------

.. option:: --city-xml arg

   The path to the cities XML file. This overrides the default
   paths. Compare with the global parameter \"citiesXML\".


User interface
--------------

.. option:: -F, --full-screen

   Start the application filling the entire screen.
   This only works with GUI applications.

.. option:: -N, --non-interactive

   Use non\-interactive presentation mode. This only works with
   GUI applications.


Options
-------

.. option:: -O, --origin arg

   Preload origin with given origin ID

.. option:: -E, --event arg

   Preload event with given event ID

.. option:: --offline

   Switch to offline mode

.. option:: -i, --input-file xml

   Load events in given XML file during startup and switch to offline mode

.. option:: --load-event-db arg

   Number of days to load from database

