def savi(b4, b8):
    """
    Soil-Adjusted Vegetation Index (Huete, 1988).

    .. math:: SAVI = ((b8 - b4))/((b8 + b4 + 0.5))*1.5

    :param b4: Red.
    :type b4: numpy.ndarray or float
    :param b8: NIR.
    :type b8: numpy.ndarray or float

    :returns SAVI: Index value

    .. Tip::

       Huete, A. 1988. A soil-adjusted vegetation index (SAVI). \
       Remote Sensing of Environment 25(3), 295-309. \
       doi:10.1016/0034-4257(88)90106-x.
    """

    SAVI = ((b8 - b4))/((b8 + b4 + 0.5))*1.5
    return SAVI