DMSLevel2bBase

class jwst.associations.lib.rules_level2_base.DMSLevel2bBase(*args, **kwargs)[source]

Bases: DMSBaseMixin, Association

Basic class for DMS Level2 associations.

Attributes Summary

INVALID_VALUES

Attribute values that indicate the attribute is not specified.

schema_file

Methods Summary

dms_product_name()

Define product name.

get_exposure_type(item[, default])

General Level 2 override of exposure type definition.

has_science()

Check association for a science member.

make_member(item)

Create a member from the item.

members_by_type(member_type)

Get list of members by their exposure type.

update_asn()

Update association info based on current members.

validate_candidates(_member)

Allow only OBSERVATION or BACKGROUND candidates.

Attributes Documentation

INVALID_VALUES: tuple | None = (None, '', 'NULL', 'Null', 'null', '--', 'N', 'n', 'F', 'f', 'FALSE', 'false', 'False', 'N/A', 'n/a')

Attribute values that indicate the attribute is not specified.

schema_file = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/jwst-pipeline/conda/10095/lib/python3.11/site-packages/jwst/associations/lib/asn_schema_jw_level2b.json')

Methods Documentation

dms_product_name()[source]

Define product name.

Returns:
str

The product name.

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

General Level 2 override of exposure type definition.

The exposure type definition is overridden from the default for the following cases:

  • ‘psf’ -> ‘science’

Parameters:
itemdict

The pool entry to determine the exposure type of

defaultstr or None

The default exposure type. If None, routine will raise LookupError.

Returns:
exposure_typestr

Always what is defined as default

has_science()[source]

Check association for a science member.

Returns:
bool

True if it does.

make_member(item)[source]

Create a member from the item.

Parameters:
itemdict

The item to create member from.

Returns:
memberMember

The member

members_by_type(member_type)[source]

Get list of members by their exposure type.

Returns:
list of str

List of members.

update_asn()[source]

Update association info based on current members.

validate_candidates(_member)[source]

Allow only OBSERVATION or BACKGROUND candidates.

Parameters:
_memberMember

Member being added; ignored.

Returns:
bool

True if candidate is OBSERVATION, BACKGROUND and at least one member is background; otherwise false.