obspy.core.trace.Trace

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

Bases: object

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__ str(object=’‘) -> string
__module__ str(object=’‘) -> string
__weakref__ list of weak references to the object (if defined)
id Returns a SEED compatible identifier of the trace.

Public Methods

attach_response Search for and attach channel response to the trace as
copy Returns a deepcopy of the trace.
count Returns number of data samples of the current trace.
decimate Downsample trace data by an integer factor.
detrend Method to remove a linear trend from the trace.
differentiate Method to differentiate the trace with respect to time.
filter Filters the data of the current trace.
getId Returns a SEED compatible identifier of the trace.
integrate Method to integrate the trace with respect to time.
max Returns the value of the absolute maximum amplitude in the trace.
normalize Method to normalize the trace to its absolute maximum.
plot Creates a simple graph of the current trace.
remove_response Deconvolve instrument response.
resample Resample trace data using Fourier method.
simulate Correct for instrument response / Simulate new instrument response.
slice Returns a new Trace object with data going from start to end time.
spectrogram Creates a spectrogram plot of the trace.
split Splits Trace object containing gaps using a NumPy masked array into
std Method to get the standard deviation of amplitudes in the trace.
taper Method to taper the trace.
times For convenient plotting compute a Numpy array of seconds since
trigger Runs a triggering algorithm on the data of the current trace.
trim Cuts current trace to given start and end time.
verify Verifies current trace object against available meta data.
write Saves current trace into a file.

Private Methods

_addProcessingInfo Adds the given informational string to the processing field in the
_ltrim Cuts current trace to given start time.
_rtrim Cuts current trace to given end time.

Special Methods

__add__ Adds another Trace object to current trace.
__div__ Splits 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__ Returns number of data samples of the current trace.
__lt__ Too ambiguous, throw an Error.
__mod__ Splits Trace into new Stream containing Traces with num samples.
__mul__ Creates a new Stream containing num copies of this trace.
__ne__ Implements rich comparison of Trace objects for ”!=” operator.
__original_str__ Returns 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

This Page