def ap_to_rv(a, p, r=0.8):
    """
    Goobar 08 extinction parameters convertion.

    a and p are the parameters of the goobar08 extinction law r is the ratio
    between the mean wavelegnths of the B and the V filter
    """
    return 1. / (a * (r ** p - 1.))