class Origin(force_resource_id=True, *args, **kwargs)[source]

Bases: obspy.core.event.base.__Origin

This class represents the focal time and geographical location of an earthquake hypocenter, as well as additional meta-information. Origin can have objects of type OriginUncertainty and Arrival as child elements.

  • resource_id (ResourceIdentifier) Resource identifier of Origin.
  • force_resource_id (bool, optional) If set to False, the automatic initialization of resource_id attribute in case it is not specified will be skipped.
  • time (UTCDateTime) Focal time.
  • time_errors (QuantityError) AttribDict containing error quantities.
  • longitude (float) Hypocenter longitude, with respect to the World Geodetic System 1984 (WGS84) reference system. Unit: deg
  • longitude_errors (QuantityError) AttribDict containing error quantities.
  • latitude (float) Hypocenter latitude, with respect to the WGS84 reference system. Unit: deg
  • latitude_errors (QuantityError) AttribDict containing error quantities.
  • depth (float, optional) Depth of hypocenter with respect to the nominal sea level given by the WGS84 geoid. Positive values indicate hypocenters below sea level. For shallow hypocenters, the depth value can be negative. Note: Other standards use different conventions for depth measurement. As an example, GSE2.0, defines depth with respect to the local surface. If event data is converted from other formats to QuakeML, depth values may have to be modified accordingly. Unit: m
  • depth_errors (QuantityError) AttribDict containing error quantities.
  • depth_type (str, optional) Type of depth determination. See OriginDepthType for allowed values.
  • time_fixed (bool, optional) True if focal time was kept fixed for computation of the Origin.
  • epicenter_fixed (bool, optional) True if epicenter was kept fixed for computation of Origin.
  • reference_system_id (ResourceIdentifier, optional) Identifies the reference system used for hypocenter determination. This is only necessary if a modified version of the standard (with local extensions) is used that provides a non-standard coordinate system.
  • method_id (ResourceIdentifier, optional) Identifies the method used for locating the event.
  • earth_model_id (ResourceIdentifier, optional) Identifies the earth model used in method_id.
  • arrivals (list of Arrival, optional) List of arrivals associated with the origin.
  • composite_times (list of CompositeTime, optional) Supplementary information on time of rupture start. Complex descriptions of focal times of historic events are possible, see description of the CompositeTime type. Note that even if compositeTime is used, the mandatory time attribute has to be set, too. It has to be set to the single point in time (with uncertainties allowed) that is most characteristic for the event.
  • quality (OriginQuality, optional) Additional parameters describing the quality of an Origin determination.
  • origin_type (str, optional) Describes the origin type. See OriginType for allowed values.
  • origin_uncertainty (OriginUncertainty, optional) Describes the location uncertainties of an origin.
  • region (str, optional) Can be used to describe the geographical region of the epicenter location. Useful if an event has multiple origins from different agencies, and these have different region designations. Note that an event-wide region can be defined in the description attribute of an Event object. The user has to take care that this information corresponds to the region attribute of the preferred Origin.
  • evaluation_mode (str, optional) Evaluation mode of Origin. See EvaluationMode for allowed values.
  • evaluation_status (str, optional) Evaluation status of Origin. See EvaluationStatus for allowed values.
  • comments (list of Comment, optional) Additional comments.
  • creation_info (CreationInfo, optional) Creation information used to describe author, version, and creation time.


>>> from obspy.core.event import Origin
>>> origin = Origin()
>>> origin.resource_id = 'smi:ch.ethz.sed/origin/37465'
>>> origin.time = UTCDateTime(0)
>>> origin.latitude = 12
>>> origin.latitude_errors.uncertainty = 0.01
>>> origin.latitude_errors.confidence_level = 95.0
>>> origin.longitude = 42
>>> origin.depth_type = 'from location'
>>> print(origin)  
    resource_id: ResourceIdentifier(id="smi:ch.ethz.sed/...")
           time: UTCDateTime(1970, 1, 1, 0, 0)
      longitude: 42.0
       latitude: 12.0 [confidence_level=95.0, uncertainty=0.01]
     depth_type: ...'from location'


For handling additional information not covered by the QuakeML standard and how to output it to QuakeML see the ObsPy Tutorial.


__abstractmethods__ frozenset() -> empty frozenset object
__doc__ str(object=’‘) -> str
__module__ str(object=’‘) -> str
__slots__ tuple() -> empty tuple
__weakref__ list of weak references to the object (if defined)
defaults dict() -> new empty dictionary
do_not_warn_on list() -> new empty list
item tuple() -> empty tuple
key str(object=’‘) -> str
readonly list() -> new empty list
warn_on_non_default_key bool(x) -> bool

Public Methods

pop If key is not found, d is returned if given, otherwise KeyError is raised.
popitem as a 2-tuple; but raise KeyError if D is empty.

Private Methods


Private methods are mainly for internal/developer use and their API might change without notice.

_pretty_str Return better readable string representation of AttribDict object.

Special Methods

__deepcopy__ reset resource_id’s object_id after deep copy to allow the
__dir__ default dir() implementation
__eq__ Two instances are considered equal if all attributes and all lists
__format__ default object formatter
__getattr__ Py3k hasattr() expects an AttributeError no KeyError to be
__new__ Create and return a new object.
__reduce__ helper for pickle
__reduce_ex__ helper for pickle
__setattr__ Custom property implementation that works if the class is
__sizeof__ size of object in memory, in bytes
__str__ Fairly extensive in an attempt to cover several use cases.