AsnMixin_Lv2Nod
- class jwst.associations.lib.rules_level2_base.AsnMixin_Lv2Nod[source]
Bases:
objectAssociations that need to create nodding associations.
For some spectrographic modes, background spectra are taken by nodding between different slits, or internal slit positions. The main associations rules will collect all the exposures of all the nods into a single association. Then, on finalization, this one association is split out into many associations, where each nod is, in turn, treated as science, and the other nods are treated as background.
Methods Summary
finalize()Finalize association.
Make background nod Associations.
nod_background_overlap(science_item, ...)Check that a candidate background nod will not overlap with science.
Methods Documentation
- finalize()[source]
Finalize association.
For some spectrographic modes, background spectra are taken by nodding between different slits, or internal slit positions. The main associations rules will collect all the exposures of all the nods into a single association. Then, on finalization, this one association is split out into many associations, where each nod is, in turn, treated as science, and the other nods are treated as background.
- Returns:
- associations[association[, …]] or None
List of fully-qualified associations that this association represents.
Noneif a complete association cannot be produced.
- make_nod_asns()[source]
Make background nod Associations.
For observing modes, such as NIRSpec MSA, exposures can be nodded, such that the object is in a different position in the slitlet. The association creation simply groups these all together as a single association, all exposures marked as
science. When complete, this method will create separate associations each exposure becoming the single science exposure, and the other exposures then becomebackground.- Returns:
- associations[association[, …]]
List of new associations to be used in place of the current one.
- static nod_background_overlap(science_item, background_item)[source]
Check that a candidate background nod will not overlap with science.
For NIRSpec fixed slit or MOS data, this returns True if the background candidate shares a primary dither point with the science or if the target ID does not match between science and background candidate.
In addition, for NIRSpec fixed slit exposures taken with slit S1600A1 in a 5-point nod pattern, this returns True when the background candidate is in the next closest primary position to the science or if the target ID does not match between science and background candidate.
For any other data, this function returns False (no overlap).
- Parameters:
- science_itemMember
The science member.
- background_itemMember
The background member.
- Returns:
- bool
True if overlap is present, False otherwise.