def get_stars_dict(stars):
    """
    Transform list of stars into dictionary where keys are their names

    Parameters
    ----------
    stars : list, iterable
        Star objects

    Return
    ------
    dict
        Stars dictionary
    """
    x = {}
    for st in stars:
        try:
            x[st.name] = st
        except:
            pass
    return x
