def _make_EP4dname(name, metadata):
    """
    Create a helpful name for a data set based on an Accurion EP4 formmated data file.

    Parameters
    ----------
    name : file-handle or string
        File name of data set.

    metadata : dict
        Dict containinng 'X pos', 'Y pos' and 'time' data.

    Returns
    ----------
    base : string
        Helpful name for the data set.

    """
    base = name[: -len("_20200929-083122.ds.dat")]
    if metadata["X pos"] is not None:
        base += f"_x={metadata['X pos']}mm_y={metadata['Y pos']}mm"
    if metadata["time"] is not None:
        base += f"_t={metadata['time']}s"

    return base