def _read_legacy_params(fname):
    """Read param values from a .param file (legacy).
    Parameters
    ----------
    fname : str
        Full path to the file (.param)

    Returns
    -------
    params_input : dict
        Dictionary of parameters
    """

    params_input = dict()
    with open(fname, 'r') as fp:
        for line in fp.readlines():
            split_line = line.lstrip().split(':')
            key, value = [field.strip() for field in split_line]
            try:
                if '.' in value or 'e' in value:
                    params_input[key] = float(value)
                else:
                    params_input[key] = int(value)
            except ValueError:
                params_input[key] = str(value)

    return params_input