def get_significance_filter(filters, field, significant_only=True):
    """ This function returns the appropriate mask to filter on significance
        of the given field. It assumes the filters are in the same order as the
        output of get_significant_differences.

        Parameters
        ----------
            filters : tuple
                The result of the call to get_significant_differences

            field : string
                The name of the field on which to filter. Valid options are:
                    * ribo
                    * rna
                    * te

            is_significant : bool
                Whether to return the "significant" filter (True, default) or 
                the "basic" filter

        Returns
        -------
            significant_only : boolean mask
                The appropriate mask for filtering for significance based on the
                given field.
    """

    # just map from the field to the index of the significant filters
    index_map = {
        "te": 0,
        "rna": 1,
        "ribo": 2
    }

    index = index_map[field]
    if significant_only:
        index += 3

    return filters[index]