def new_cov_when_divide_x(cov_xy, x, B, B_err):
    """Analogous to the above, but when x is divided by independent data.

    Need to give x/B and B."""
    # when doing e.g. RV = AV / EBV, the covariance gets a factor 1 / EBV
    new_cov = cov_xy.copy()
    new_cov[:, 0, 1] /= B
    new_cov[:, 1, 0] /= B

    # NH_AV is not affected

    # V(RV) = V(x / B) becomes (x / B)**2 * ( (Vx / x)**2 + (VB / B)**2 )
    # (value * relative error)
    Vx = cov_xy[:, 0, 0]
    new_cov[:, 0, 0] = (x / B) ** 2 * (Vx / x ** 2 + (B_err / B) ** 2)
    return new_cov