obspy.core.trace.Trace

class Trace(data=array([], dtype=float64), header=None)[source]

Bases: future.types.newobject.newobject

An object containing data of a continuous series, such as a seismic trace.

Parameters:
Variables:
  • id A SEED compatible identifier of the trace.
  • stats A container Stats for additional header information of the trace.
  • data Data samples in a ndarray or MaskedArray

Supported Operations

trace = traceA + traceB
Merges traceA and traceB into one new trace object. See also: Trace.__add__().
len(trace)
Returns the number of samples contained in the trace. That is it es equal to len(trace.data). See also: Trace.__len__().
str(trace)
Returns basic information about the trace object. See also: Trace.__str__().

Attributes

__dict__
__doc__ unicode(string [, encoding[, errors]]) -> object
__module__ str(object) -> string
__weakref__ list of weak references to the object (if defined)
id Return a SEED compatible identifier of the trace.
meta

Public Methods

attach_response Search for and attach channel response to the trace as
copy Returns a deepcopy of the trace.
count Return number of data samples of the current trace.
decimate Downsample trace data by an integer factor.
detrend Remove a linear trend from the trace.
differentiate Differentiate the trace with respect to time.
filter Filter the data of the current trace.
getId Return a SEED compatible identifier of the trace.
integrate Integrate the trace with respect to time.
interpolate Interpolate the data using various interpolation techniques.
max Returns the value of the absolute maximum amplitude in the trace.
next
normalize Normalize the trace to its absolute maximum.
plot Create a simple graph of the current trace.
remove_response Deconvolve instrument response.
resample Resample trace data using Fourier method. Spectra are linearly
simulate Correct for instrument response / Simulate new instrument response.
slice Return a new Trace object with data going from start to end time.
spectrogram Create a spectrogram plot of the trace.
split Split Trace object containing gaps using a NumPy masked array into
std Method to get the standard deviation of amplitudes in the trace.
taper Taper the trace.
times For convenient plotting compute a NumPy array of seconds since
trigger Run a triggering algorithm on the data of the current trace.
trim Cut current trace to given start and end time.
verify Verify current trace object against available meta data.
write Save current trace into a file.

Private Methods

_addProcessingInfo Add the given informational string to the processing field in the
_ltrim Cut current trace to given start time.
_repr_pretty_
_rtrim Cut current trace to given end time.

Special Methods

__add__ Add another Trace object to current trace.
__div__ Split Trace into new Stream containing num Traces of the same size.
__eq__ Implements rich comparison of Trace objects for “==” operator.
__ge__ Too ambiguous, throw an Error.
__getitem__ __getitem__ method of Trace object.
__gt__ Too ambiguous, throw an Error.
__init__
__le__ Too ambiguous, throw an Error.
__len__ Return number of data samples of the current trace.
__long__
__lt__ Too ambiguous, throw an Error.
__mod__ Split Trace into new Stream containing Traces with num samples.
__mul__ Create a new Stream containing num copies of this trace.
__native__ Hook for the future.utils.native() function
__ne__ Implements rich comparison of Trace objects for ”!=” operator.
__nonzero__ No data means no trace.
__original_str__ Return short summary string of the current trace.
__setattr__ __setattr__ method of Trace object.
__str__ Monkey patch for the __str__ method of the Trace object. SEGY object do not
__truediv__ Split Trace into new Stream containing num Traces of the same size.
__unicode__