def crossmatch_filter_names(filter_names, standard_filters):
    """Return a list of filter names matching those of standard filters

    Parameters
    ----------
    filter_names : list
        List of input filter names

    standard_filters : list
        List of recognized filter names

    Returns
    -------
    inds : list
        List of matching filter names
    """
    inds = []
    for filter_name in filter_names:
        name_to_match = filter_name

        # Weak lens inputs can be WLP8 or WLM8, but we want to match either
        # with the WLP8 entries in the standard magnitude list
        if 'wlm' in filter_name:
            name_to_match = filter_name.replace('wlm', 'wlp')

        index = standard_filters.index(name_to_match)
        inds.append(index)
    return inds