Skip to content

Commit

Permalink
Merge pull request #1459 from claudiodsf/core_event_docfix
Browse files Browse the repository at this point in the history
Fix references in obspy.core.event docstrings
  • Loading branch information
megies committed Jul 8, 2016
2 parents 12ff4e1 + e42a504 commit a37dbf0
Show file tree
Hide file tree
Showing 9 changed files with 525 additions and 403 deletions.
30 changes: 30 additions & 0 deletions misc/docs/source/packages/obspy.core.event.header.rst
@@ -0,0 +1,30 @@
.. currentmodule:: obspy.core.event.header
.. automodule:: obspy.core.event.header
:members:

.. comment to end block
Variables
---------
.. autosummary::
:toctree: autogen
:nosignatures:

AmplitudeCategory
AmplitudeUnit
DataUsedWaveType
EvaluationMode
EvaluationStatus
EventDescriptionType
EventType
EventTypeCertainty
MTInversionType
MomentTensorCategory
OriginDepthType
OriginType
OriginUncertaintyDescription
PickOnset
PickPolarity
SourceTimeFunctionType

.. comment to end block
27 changes: 12 additions & 15 deletions obspy/core/event/base.py
Expand Up @@ -844,12 +844,14 @@ class CreationInfo(__CreationInfo):
:type agency_id: str, optional
:param agency_id: Designation of agency that published a resource.
:type agency_uri: :class:`~obspy.core.event.ResourceIdentifier`, optional
:type agency_uri: :class:`~obspy.core.event.base.ResourceIdentifier`,
optional
:param agency_uri: Resource Identifier of the agency that published a
resource.
:type author: str, optional
:param author: Name describing the author of a resource.
:type author_uri: :class:`~obspy.core.event.ResourceIdentifier`, optional
:type author_uri: :class:`~obspy.core.event.base.ResourceIdentifier`,
optional
:param author_uri: Resource Identifier of the author of a resource.
:type creation_time: :class:`~obspy.core.utcdatetime.UTCDateTime`, optional
:param creation_time: Time of creation of a resource.
Expand Down Expand Up @@ -973,12 +975,13 @@ class Comment(__Comment):
:type text: str
:param text: Text of comment.
:type resource_id: :class:`~obspy.core.event.ResourceIdentifier`, optional
:type resource_id: :class:`~obspy.core.event.base.ResourceIdentifier`,
optional
:param resource_id: Resource identifier of comment.
:type force_resource_id: bool, optional
:param force_resource_id: If set to False, the automatic initialization of
`resource_id` attribute in case it is not specified will be skipped.
:type creation_info: :class:`~obspy.core.event.CreationInfo`, optional
:type creation_info: :class:`~obspy.core.event.base.CreationInfo`, optional
:param creation_info: Creation info for the comment.
>>> comment = Comment(text="Some comment")
Expand Down Expand Up @@ -1033,7 +1036,8 @@ class WaveformStreamID(__WaveformStreamID):
:param location_code: Location code.
:type channel_code: str, optional
:param channel_code: Channel code.
:type resource_uri: :class:`~obspy.core.event.ResourceIdentifier`, optional
:type resource_uri: :class:`~obspy.core.event.base.ResourceIdentifier`,
optional
:param resource_uri: Resource identifier for the waveform stream.
:type seed_string: str, optional
:param seed_string: Provides an alternative initialization way by passing a
Expand Down Expand Up @@ -1162,16 +1166,9 @@ class DataUsed(__DataUsed):
moment-tensor inversion.
:type wave_type: str
:param wave_type: Type of waveform data. This can be one of the following
values:
* ``"P waves"``,
* ``"body waves"``,
* ``"surface waves"``,
* ``"mantle waves"``,
* ``"combined"``,
* ``"unknown"``
:param wave_type: Type of waveform data.
See :class:`~obspy.core.event.header.DataUsedWaveType` for allowed
values.
:type station_count: int, optional
:param station_count: Number of stations that have contributed data of the
type given in wave_type.
Expand Down
13 changes: 7 additions & 6 deletions obspy/core/event/catalog.py
Expand Up @@ -50,16 +50,16 @@ class Catalog(object):
"""
This class serves as a container for Event objects.
:type events: list of :class:`~obspy.core.event.Event`, optional
:type events: list of :class:`~obspy.core.event.event.Event`, optional
:param events: List of events
:type resource_id: :class:`~obspy.core.event.ResourceIdentifier`
:type resource_id: :class:`~obspy.core.event.base.ResourceIdentifier`
:param resource_id: Resource identifier of the catalog.
:type description: str, optional
:param description: Description string that can be assigned to the
earthquake catalog, or collection of events.
:type comments: list of :class:`~obspy.core.event.Comment`, optional
:type comments: list of :class:`~obspy.core.event.base.Comment`, optional
:param comments: Additional comments.
:type creation_info: :class:`~obspy.core.event.CreationInfo`, optional
:type creation_info: :class:`~obspy.core.event.base.CreationInfo`, optional
:param creation_info: Creation information used to describe author,
version, and creation time.
Expand Down Expand Up @@ -179,7 +179,7 @@ def __iadd__(self, other):
events will be appended.
:type other: :class:`~obspy.core.event.Catalog` or
:class:`~obspy.core.event.Event`
:class:`~obspy.core.event.event.Event`
:param other: Catalog or Event object to add.
"""
if isinstance(other, Event):
Expand Down Expand Up @@ -222,7 +222,8 @@ def __str__(self, print_all=False):
Returns short summary string of the current catalog.
It will contain the number of Events in the Catalog and the return
value of each Event's :meth:`~obspy.core.event.Event.__str__` method.
value of each Event's :meth:`~obspy.core.event.event.Event.__str__`
method.
:type print_all: bool, optional
:param print_all: If True, all events will be printed, otherwise a
Expand Down
92 changes: 19 additions & 73 deletions obspy/core/event/event.py
Expand Up @@ -51,88 +51,41 @@ class Event(__Event):
event is usually associated with one or more magnitudes, and with one or
more focal mechanism determinations.
:type resource_id: :class:`~obspy.core.event.ResourceIdentifier`
:type resource_id: :class:`~obspy.core.event.base.ResourceIdentifier`
:param resource_id: Resource identifier of Event.
:type force_resource_id: bool, optional
:param force_resource_id: If set to False, the automatic initialization of
`resource_id` attribute in case it is not specified will be skipped.
:type event_type: str, optional
:param event_type: Describes the type of an event. Allowed values are the
following:
* ``"not existing"``
* ``"not reported"``
* ``"earthquake"``
* ``"anthropogenic event"``
* ``"collapse"``
* ``"cavity collapse"``
* ``"mine collapse"``
* ``"building collapse"``
* ``"explosion"``
* ``"accidental explosion"``
* ``"chemical explosion"``
* ``"controlled explosion"``
* ``"experimental explosion"``
* ``"industrial explosion"``
* ``"mining explosion"``
* ``"quarry blast"``
* ``"road cut"``
* ``"blasting levee"``
* ``"nuclear explosion"``
* ``"induced or triggered event"``
* ``"rock burst"``
* ``"reservoir loading"``
* ``"fluid injection"``
* ``"fluid extraction"``
* ``"crash"``
* ``"plane crash"``
* ``"train crash"``
* ``"boat crash"``
* ``"other event"``
* ``"atmospheric event"``
* ``"sonic boom"``
* ``"sonic blast"``
* ``"acoustic noise"``
* ``"thunder"``
* ``"avalanche"``
* ``"snow avalanche"``
* ``"debris avalanche"``
* ``"hydroacoustic event"``
* ``"ice quake"``
* ``"slide"``
* ``"landslide"``
* ``"rockslide"``
* ``"meteorite"``
* ``"volcanic eruption"``
:param event_type: Describes the type of an event.
See :class:`~obspy.core.event.header.EventType` for allowed values.
:type event_type_certainty: str, optional
:param event_type_certainty: Denotes how certain the information on event
type is. Allowed values are the following:
* ``"suspected"``
* ``"known"``
:type creation_info: :class:`~obspy.core.event.CreationInfo`, optional
type is.
See :class:`~obspy.core.event.header.EventTypeCertainty` for allowed
values.
:type creation_info: :class:`~obspy.core.event.base.CreationInfo`, optional
:param creation_info: Creation information used to describe author,
version, and creation time.
:type event_descriptions: list of
:class:`~obspy.core.event.EventDescription`
:class:`~obspy.core.event.event.EventDescription`
:param event_descriptions: Additional event description, like earthquake
name, Flinn-Engdahl region, etc.
:type comments: list of :class:`~obspy.core.event.Comment`, optional
:type comments: list of :class:`~obspy.core.event.base.Comment`, optional
:param comments: Additional comments.
:type picks: list of :class:`~obspy.core.event.Pick`
:type picks: list of :class:`~obspy.core.event.origin.Pick`
:param picks: Picks associated with the event.
:type amplitudes: list of :class:`~obspy.core.event.Amplitude`
:type amplitudes: list of :class:`~obspy.core.event.magnitude.Amplitude`
:param amplitudes: Amplitudes associated with the event.
:type focal_mechanisms: list of :class:`~obspy.core.event.FocalMechanism`
:type focal_mechanisms: list of
:class:`~obspy.core.event.source.FocalMechanism`
:param focal_mechanisms: Focal mechanisms associated with the event
:type origins: list of :class:`~obspy.core.event.Origin`
:type origins: list of :class:`~obspy.core.event.origin.Origin`
:param origins: Origins associated with the event.
:type magnitudes: list of :class:`~obspy.core.event.Magnitude`
:type magnitudes: list of :class:`~obspy.core.event.magnitude.Magnitude`
:param magnitudes: Magnitudes associated with the event.
:type station_magnitudes: list of
:class:`~obspy.core.event.StationMagnitude`
:class:`~obspy.core.event.magnitude.StationMagnitude`
:param station_magnitudes: Station magnitudes associated with the event.
.. note::
Expand Down Expand Up @@ -353,16 +306,9 @@ class EventDescription(__EventDescription):
:type text: str, optional
:param text: Free-form text with earthquake description.
:type type: str, optional
:param type: Category of earthquake description. Values
can be taken from the following:
* ``"felt report"``
* ``"Flinn-Engdahl region"``
* ``"local time"``
* ``"tectonic summary"``
* ``"nearest cities"``
* ``"earthquake name"``
* ``"region name"``
:param type: Category of earthquake description.
See :class:`~obspy.core.event.header.EventDescriptionType` for allowed
values.
.. note::
Expand Down

0 comments on commit a37dbf0

Please sign in to comment.