filter_discovered_only

jwst.associations.lib.utilities.filter_discovered_only(associations, discover_ruleset, candidate_ruleset, keep_candidates=True)[source]

Return only those associations that have multiple candidates.

Parameters:
associationsiterable

The list of associations to check. The list is returned by generate().

discover_rulesetstr

The name of the ruleset that has the discover rules.

candidate_rulesetstr

The name of the ruleset that finds just candidates.

keep_candidatesbool

Keep explicit candidate associations in the list.

Returns:
iterable

The new list of only the cross-candidate associations.

Notes

This function is only meant to run on associations that have been constructed. Associations that have been serialized and then reloaded will not return proper results.