def sec0to1(val):
    """
    Converts the system security values into values between 0 and 1
    """
    retval = 0.0

    if val < 0:
        retval = 0.0
    elif val > 1:
        retval = 1.0
    else:
        retval = round(val, 1)

    return retval