def roundAndCut(number, ndigits=8, threshold=1e-08):
    """ round a number to ndigits digits and set it to zero if its absolute
        value is below threshold
    """
    if abs(number) < threshold:
        return 0.0
    else:
        return round(number, ndigits)
