.. _scevent_eventtype:

#########
EventType
#########

evtype plugin for scevent

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

The *evtype* pluging sets the type of an event based on comments of picks which
are associated to the preferred origin of this event. The IDs of the comments
from which the comment values are considered must be configured by
:confval:`eventType.pickCommentIDs` and the name of the plugin, *evtype*, must
be added to the :confval:`plugins` parameter. The text of the considered
comments must contain a supported event type.

.. note::

   Other criteria for setting the event type may be added later to this plugin.

Example of a pick comment:

.. code-block:: xml

   <pick publicID="20160914.075944.29-deepc-AB.XYZ..HHZ">
     ...
     <comment>
       <text>earthquake</text>
       <id>deepc:eventTypeHint</id>
     </comment>
     ...
   </pick>

Example configuration (:file:`scevent.cfg`):

.. code-block:: properties

   plugins = evtype

   eventType.setEventType = true
   eventType.pickCommentIDs = scrttv:eventTypeHint, deepc:eventTypeHint

.. _scevent_eventtype_configuration:

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


.. note::
   **eventType.\***
   *Set the event type based on type comments of picks. Add the*
   *plugin "evtype" to the list of plugins in the order*
   *of priority to make this feature available.*



.. confval:: eventType.setEventType

   Default: ``false``

   Type: *boolean*

   Allow setting the event type.
   The type of events which have manual origins will
   not be changed unless configured explicitely by
   \"overwriteManual\".


.. confval:: eventType.overwriteEventType

   Default: ``true``

   Type: *boolean*

   Allow overwriting existing event types set by other modules.


.. confval:: eventType.overwriteManual

   Default: ``false``

   Type: *boolean*

   Allow setting the event type if the mode of the preferred
   origin is manual or if the event type was set manually.


.. confval:: eventType.pickCommentIDs

   Default: ``scrttv:eventTypeHint,deepc:eventTypeHint``

   Type: *list:string*

   Consider comments of picks which have one of the
   given values. An empty list disables setting the type.


