AsnMixin_Lv2Imprint

class jwst.associations.lib.rules_level2_base.AsnMixin_Lv2Imprint[source]

Bases: object

Level 2 association handling for matching imprint images.

Methods Summary

finalize()

Finalize the association.

prune_imprints()

Prune extra imprint exposures from the association members.

Methods Documentation

finalize()[source]

Finalize the association.

For some spectrographic modes, imprint images are taken alongside the science data, the background data, or both. If there are extra imprints in the association, we should keep only the best matches to the science data.

Returns:
associations: [association[, …]] or None

List of fully-qualified associations that this association represents. None if a complete association cannot be produced.

prune_imprints()[source]

Prune extra imprint exposures from the association members.

First, check for imprints that match the background flag for the “science” member. Any included imprints that do not match the background flag are left in the association without further checks.

Among these imprints, check to see if any have target IDs that match the science member. If not, use all imprints for further matches. If so, use only the matching ones for further checks; remove the non-matching imprints.

If there are more imprints than science members remaining, and if any of the remaining imprints match the science dither position index, discard any imprints that do not match the dither position.