def atof(text):
    """
    Function to test whether a str can be rendered as a float.
    Useful when retreiving experimental parameters that were
    stored within the filename.
    
    Parameters:
    text (str)
    
    Returns:
    float or text
    """
    try:
        retval = float(text)
    except ValueError:
        retval = text
    return retval