obspy.core.inventory.inventory.read_inventory¶
-
read_inventory
(path_or_file_object=None, format=None, *args, **kwargs)[source]¶ Function to read inventory files.
Parameters: - path_or_file_object – File name or file like object. If this
attribute is omitted, an example
Inventory
object will be returned. - format (str) – Format of the file to read (e.g.
"STATIONXML"
). See the Supported Formats section below for a list of supported formats.
Return type: Returns: An ObsPy
Inventory
object.Additional args and kwargs are passed on to the underlying
_read_X()
methods of the inventory plugins.Supported Formats
Additional ObsPy modules extend the functionality of the
read_inventory()
function. The following table summarizes all known file formats currently supported by ObsPy.Please refer to the Linked Function Call of each module for any extra options available at the import stage.
Format Used Module Linked Function Call INVENTORYXML obspy.io.arclink
obspy.io.arclink.inventory._read_inventory_xml()
RESP obspy.io.xseed
obspy.io.xseed.core._read_resp()
SC3ML obspy.io.seiscomp
obspy.io.seiscomp.inventory._read_sc3ml()
SEED obspy.io.xseed
obspy.io.xseed.core._read_seed()
STATIONTXT obspy.io.stationtxt
obspy.io.stationtxt.core.read_fdsn_station_text_file()
STATIONXML obspy.io.stationxml
obspy.io.stationxml.core._read_stationxml()
XSEED obspy.io.xseed
obspy.io.xseed.core._read_xseed()
Note
For handling additional information not covered by the StationXML standard and how to output it to StationXML see the ObsPy Tutorial.
- path_or_file_object – File name or file like object. If this
attribute is omitted, an example