AsnMixin_Lv2WFSS

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

Bases: object

Utility and overrides for WFSS associations.

Methods Summary

add_catalog_members()

Add catalog and direct image member based on direct image members.

finalize()

Finalize the association.

find_closest_direct(science, directs)

Find the direct image that is closest to the science.

get_exposure_type(item[, default])

Modify exposure type depending on dither pointing index.

get_opt_element()

Get string representation of the optical elements.

Methods Documentation

add_catalog_members()[source]

Add catalog and direct image member based on direct image members.

finalize()[source]

Finalize the association.

For WFSS, this involves taking all the direct image exposures, determine which one is first after last science exposure, and creating the catalog name from that image.

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

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

static find_closest_direct(science, directs)[source]

Find the direct image that is closest to the science.

Closeness is defined as number difference in the exposure sequence number, as defined in the column EXPSPCIN.

Parameters:
sciencedict

The science member to compare against

directs[dict[,…]]

The available direct members

Returns:
closestdict

The direct image that is the “closest”

get_exposure_type(item, default='science')[source]

Modify exposure type depending on dither pointing index.

If an imaging exposure has been found, treat it as a direct image.

Parameters:
itemMember

The item to pull exposure type from.

defaultstr

The default value if no exposure type is present, defaults to “science”.

Returns:
str

The exposure type of the item.

get_opt_element()[source]

Get string representation of the optical elements.

Returns:
opt_elemstr

The Level3 Product name representation of the optical elements.

Notes

This is an override for the method in DMSBaseMixin. The optical element is retrieved from the chosen direct image found in self.direct_image, determined in the self.finalize method.