obspy.core.event.origin.Origin¶
-
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.
Parameters: - 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.
Example
>>> 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) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS 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'
Note
For handling additional information not covered by the QuakeML standard and how to output it to QuakeML see the ObsPy Tutorial.
Attributes
__abstractmethods__
__dict__
__doc__
__hash__
__module__
__reversed__
__slots__
__weakref__
list of weak references to the object (if defined) defaults
do_not_warn_on
item
key
readonly
warn_on_non_default_key
Public Methods
clear
copy
get
items
keys
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. setdefault
update
If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v values
Private Methods
Warning
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. _repr_pretty_
Special Methods
__bool__
__contains__
__deepcopy__
reset resource_id’s object_id after deep copy to allow the object specific behavior of get_referred_object __delattr__
__delitem__
__dir__
Default dir() implementation. __eq__
Two instances are considered equal if all attributes and all lists are identical. __format__
Default object formatter. __getattr__
Py3k hasattr() expects an AttributeError no KeyError to be raised if the attribute is not found. __getitem__
__getstate__
__init__
__init_subclass__
This method is called when a class is subclassed. __iter__
__len__
__ne__
__new__
Create and return a new object. __nonzero__
__reduce__
Helper for pickle. __reduce_ex__
Helper for pickle. __repr__
__setattr__
Custom property implementation that works if the class is inheriting from AttribDict. __setitem__
__setstate__
__sizeof__
Size of object in memory, in bytes. __str__
Fairly extensive in an attempt to cover several use cases. __subclasshook__
Abstract classes can override this to customize issubclass(). - resource_id (