DMSBaseMixin¶
- class jwst.associations.lib.dms_base.DMSBaseMixin(*args, **kwargs)[source]¶
Bases:
ACIDMixin
Association attributes common to DMS-based Rules
Attributes Summary
Association ID
The association name
The list of items that contributed to the association.
Set of all member ids in all products of this association
Keeper of the validity tests
Methods Summary
create
(item[, version_id])Create association if item belongs
get_exposure_type
(item[, default])Determine the exposure type of a pool item
is_item_ami
(item)Is the given item AMI (NIRISS Aperture Masking Interferometry)
is_item_coron
(item)Is the given item Coronagraphic
is_item_member
(item)Check if item is already a member of this association
is_item_tso
(item[, other_exp_types])Is the given item TSO
is_member
(new_member)Check if member is already a member
item_getattr
(item, attributes)Return value from any of a list of attributes
new_product
([product_name])Start a new product
update_asn
([item, member])Update association meta information
Update association degraded status
update_validity
(entry)validate
(asn)Attributes Documentation
- acid¶
Association ID
- asn_name¶
The association name
The name that identifies this association. When dumped, will form the basis for the suggested file name.
Typically, it is generated based on the current state of the association, but can be overridden.
- current_product¶
- from_items¶
The list of items that contributed to the association.
- member_ids¶
Set of all member ids in all products of this association
- validity¶
Keeper of the validity tests
Methods Documentation
- classmethod create(item, version_id=None)[source]¶
Create association if item belongs
- Parameters:
- Returns:
2-tuple consisting of:
association : The association or, if the item does not match this rule, None
[ProcessList[, …]]: List of items to process again.
- Return type:
(association, reprocess_list)
- get_exposure_type(item, default='science')[source]¶
Determine the exposure type of a pool item
- Parameters:
- Returns:
exposure_type –
Exposure type. Can be one of
’science’: Item contains science data
’target_acquisition’: Item contains target acquisition data.
’autoflat’: NIRSpec AUTOFLAT
’autowave’: NIRSpec AUTOWAVE
’psf’: PSF
’imprint’: MSA/IFU Imprint/Leakcal
- Return type:
- Raises:
LookupError – When
default
is None and an exposure type cannot be determined
- is_item_ami(item)[source]¶
Is the given item AMI (NIRISS Aperture Masking Interferometry)
Determine whether the specific item represents AMI data or not. This simply includes items with EXP_TYPE=’NIS_AMI’.
- is_item_coron(item)[source]¶
Is the given item Coronagraphic
Determine whether the specific item represents true Coronagraphic data or not. This will include all items in CORON_EXP_TYPES (both NIRCam and MIRI), except for NIRCam short-wave detectors included in a coronagraphic exposure but do not have an occulter in their field-of-view.
- is_item_tso(item, other_exp_types=None)[source]¶
Is the given item TSO
Determine whether the specific item represents TSO data or not. This is used to determine the naming of files, i.e. “rate” vs “rateints” and “cal” vs “calints”.
- is_member(new_member)[source]¶
Check if member is already a member
- Parameters:
new_member (Member) – The member to check for
- update_asn(item=None, member=None)[source]¶
Update association meta information
- Parameters:
item (dict or None) – Item to use as a source. If not given, item-specific information will be left unchanged.
member (Member or None) – An association member to use as source. If not given, member-specific information will be update from current association/product membership.
Notes
If both
item
andmember
are given, information inmember
will take precedence.