obspy.core.inventory.inventory.Inventory
- class Inventory(networks=None, source='ObsPy 1.4.1.post0+358.gf5c9534772', sender=None, created=None, module='ObsPy 1.4.1.post0+358.gf5c9534772', module_uri='https://www.obspy.org')[source]
Bases:
ComparingObject
The root object of the
Network
->Station
->Channel
hierarchy.In essence just a container for one or more networks.
Attributes
Public Methods
Return a deepcopy of the Inventory object. |
|
Extends the current Inventory object with another Inventory or a list of Network objects. |
|
Return basic metadata for a given channel. |
|
Returns a dictionary containing the contents of the object. |
|
Return coordinates for a given channel. |
|
Return orientation for a given channel. |
|
Find response for a given channel at given time. |
|
Creates a preview map of all networks/stations in current inventory object. |
|
Show bode plot of instrument response of all (or a subset of) the inventory's channels. |
|
Return a copy of the inventory with selected elements removed. |
|
Return a copy of the inventory filtered on various parameters. |
|
Writes the inventory object to a file or file-like object in the specified format. |
Private Methods
Warning
Private methods are mainly for internal/developer use and their API might change without notice.
Special Methods
- Inventory.__copy_inventory_metadata(other)
Will be called after two inventory objects have been merged. It attempts to assure that inventory meta information is somewhat correct after the merging.
The networks in other will have been moved to self.
- Inventory.__delattr__(name, /)
Implement delattr(self, name).
- Inventory.__dir__()
Default dir() implementation.
- Inventory.__eq__(other)[source]
__eq__ method of the Inventory object.
- Parameters:
other (
Inventory
) – Inventory object for comparison.- Return type:
- Returns:
True
if both Inventories are equal.
Example
>>> from obspy.core.inventory import read_inventory >>> inv = read_inventory() >>> inv2 = inv.copy() >>> inv is inv2 False >>> inv == inv2 True
- Inventory.__format__(format_spec, /)
Default object formatter.
- Inventory.__ge__(value, /)
Return self>=value.
- Inventory.__getattribute__(name, /)
Return getattr(self, name).
- Inventory.__gt__(value, /)
Return self>value.
- Inventory.__init__(networks=None, source='ObsPy 1.4.1.post0+358.gf5c9534772', sender=None, created=None, module='ObsPy 1.4.1.post0+358.gf5c9534772', module_uri='https://www.obspy.org')[source]
- Parameters:
networks (list of
Network
) – A list of networks part of this inventory.source (str) – Network ID of the institution sending the message.
sender (str, optional) – Name of the institution sending this message.
created (
UTCDateTime
, optional) – The time when the document was created. Will be set to the current time if not given.module (str) – Name of the software module that generated this document, defaults to ObsPy related information.
module_uri (str) – This is the address of the query that generated the document, or, if applicable, the address of the software that generated this document, defaults to ObsPy related information.
Note
For handling additional information not covered by the StationXML standard and how to output it to StationXML see the ObsPy Tutorial.
- Inventory.__init_subclass__()
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- Inventory.__le__(value, /)
Return self<=value.
- Inventory.__lt__(value, /)
Return self<value.
- Inventory.__new__(**kwargs)
- Inventory.__reduce__()
Helper for pickle.
- Inventory.__reduce_ex__(protocol, /)
Helper for pickle.
- Inventory.__repr__()
Return repr(self).
- Inventory.__setattr__(name, value, /)
Implement setattr(self, name, value).
- Inventory.__sizeof__()
Size of object in memory, in bytes.
- Inventory.__subclasshook__()
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).