def get_starfile_metadata_names(config):
    """Return relion-convention names of metadata for starfile.

    Parameters
    ----------
    config: class
        Class containing parameters of the dataset generator.

    Returns
    -------
    names: list of str
    """
    names = [
        "__rlnImageName",
        "__rlnAngleRot",
        "__rlnAngleTilt",
        "__rlnAnglePsi",
    ]
    if config.shift:
        names += ["__rlnOriginX", "__rlnOriginY"]
    if config.ctf:
        names += ["__rlnDefocusU", "__rlnDefocusV", "__rlnDefocusAngle"]

    names += [
        "__rlnVoltage",
        "__rlnImagePixelSize",
        "__rlnSphericalAberration",
        "__rlnAmplitudeContrast",
        "__rlnCtfBfactor",
    ]
    return names