def same_sampling_rate(a, b, eps=1e-06):
    """
    Check if two traces have the same sampling rate.

    :param a,b: input traces
    :param eps: relative tolerance
    """
    return abs(a.deltat - b.deltat) < (a.deltat + b.deltat) * eps
