prune_duplicate_associations

jwst.associations.lib.prune.prune_duplicate_associations(asns)[source]

Remove duplicate associations in favor of lower level versions.

Main use case: For Level 3 associations, multiple associations with the same membership, but different levels, can be created. Remove duplicate associations of higher level.

The assumption is that there is only one product per association, before merging.

Parameters:
asnslist of Association

Associations to prune

Returns:
prunedlist of Association

Pruned list of associations