def process_stn_activation(df, side):

    """
    Calculates STN activation percentage
    :param df: dictionary containing STN volume and active STN volume for patients
    :param side: side of the brain 'L' or 'R'
    :return: STN activation percentage for each side for all patients
    """

    #print(list(df))
    df = df.sort_values(['Patient'])
    left_stn_vol = df['STN vol (' + side + ') [mm3]']
    left_active_stn = df['VTA inside STN (' + side + ') [mm3]']

    stn_percent_activation = (left_active_stn/left_stn_vol)*100
    return stn_percent_activation