- Stream.merge(method=0, fill_value=None, interpolation_samples=0, **kwargs)[source]
Merge ObsPy Trace objects with same IDs.
method (int, optional) – Methodology to handle overlaps/gaps of traces. Defaults to
obspy.core.trace.Trace.__add__()for details on methods
obspy.core.stream.Stream._cleanup()for details on method
-1. Any merge operation performs a cleanup merge as a first step (method
fill_value (int, float, str or
None, optional) – Fill value for gaps. Defaults to
None. Traces will be converted to NumPy masked arrays if no value is given and gaps are present. The value
'latest'will use the latest value before the gap. If value
'interpolate'is provided, missing values are linearly interpolated (not changing the data type e.g. of integer valued traces). Not used for
interpolation_samples (int, optional) – Used only for
method=1. It specifies the number of samples which are used to interpolate between overlapping traces. Default to
0. If set to
-1all overlapping samples are interpolated.
Importing waveform data containing gaps or overlaps results into a
Streamobject with multiple traces having the same identifier. This method tries to merge such traces inplace, thus returning nothing. Merged trace data will be converted into a NumPy
MaskedArraytype if any gaps are present. This behavior may be prevented by setting the
methodargument controls the handling of overlapping data values.