def add_savi(image):
    """
    Calculates the Soil Adjusted Vegetation Index (SAVI)
    """
    savi = image.expression(
        '((1 + 0.5) * (NIR-RED) / (NIR + RED + 0.5))', {
            'NIR': image.select('NIR'),
            'RED': image.select('R')
        }).rename('SAVI')

    return image.addBands(savi)