obspy.core.util.testing.traces_almost_equal

traces_almost_equal(tr1, tr2, default_stats=True, rtol=1e-05, atol=1e-08, equal_nan=True)[source]

Return True if the two traces are almost equal.

Parameters
  • tr1 – The first Trace object.

  • tr2 – The second Trace object.

  • default_stats – If True only compare the default stats on the traces, such as seed identification codes, start/end times, sampling_rates, etc. If False also compare extra stats attributes such as processing and format specific information.

  • rtol – The relative tolerance parameter passed to allclose() for comparing time series.

  • atol – The absolute tolerance parameter passed to allclose() for comparing time series.

  • equal_nan – If True NaNs are evaluated equal when comparing the time series.

Returns

bool