def match_indices(shortened_list, primary_list):
    """
    Returns the 'primary_list's indices that correspond to the matching
    values in the 'shortened_list'. Assumes all values are unique.
    (For use in the External CTE monitor, matches are between RA and Decs
    and for a given source we can assume uniqueness.)

    Parameters:
        shortened_list : list of anything
            A shortened 'primary_list' of whose values you want the 
            'primary_list's indices. Assumes all values are unique.
        primary_list : list of anything 
            The original list of which the 'shortened_list' is a subset.
            Assumes all values are unique.
    Returns:
        matched_indices : list of ints 
            The 'primary_list's indices that correspond to the matching
            values in the 'shortened_list'.

    Outputs:
        nothing
    """
    matched_indices = [i for i,x in enumerate(primary_list) if x in shortened_list]
    return matched_indices