obspy.core.util - Various utilities for ObsPy

Note

Please import all utilities within your custom applications from this module rather than from any sub module, e.g.

>>> from obspy.core.util import AttribDict  # good

instead of

>>> from obspy.core.util.attribdict import AttribDict  # bad
copyright:The ObsPy Development Team (devs@obspy.org)
license:GNU Lesser General Public License, Version 3 (https://www.gnu.org/copyleft/lesser.html)

Classes & Functions

AttribDict A class which behaves like a dictionary.
NamedTemporaryFile Weak replacement for the Python’s tempfile.TemporaryFile.
create_empty_data_chunk Creates an NumPy array depending on the given data type and fill value.
get_example_file Function to find the absolute path of a data file
BAND_CODE dict() -> new empty dictionary
complexify_string Converts a string in the form “(real, imag)” into a complex type.
guess_delta Estimate time delta in seconds between each sample from given channel name.
score_at_percentile Calculates the score at the given per percentile of the sequence a.
to_int_or_zero Converts given value to an integer or returns 0 if it fails.
Enum Enumerated type (enum) implementation for Python.

Modules

attribdict AttribDict class for ObsPy.
base Base utilities and constants for ObsPy.
decorator Decorator used in ObsPy.
misc Various additional utilities for ObsPy.
obspy_types Various types used in ObsPy.
testing Testing utilities for ObsPy.
version