Skip to content

Commit

Permalink
JP-3518: Match imprint and science association members by mosaic and …
Browse files Browse the repository at this point in the history
…dither position (#8410)
  • Loading branch information
tapastro committed Apr 5, 2024
1 parent fa153cc commit ccdb12d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ associations
- Ensure NRS IFU exposures don't make a spec2 association for grating/filter combinations
where the nrs2 detector isn't illuminated. Remove dupes in mkpool. [#8395]

- Match NIRSpec imprint observations to science exposures on mosaic tile location
and dither pointing, ``MOSTILNO`` and ``DITHPTIN``. [#8410]

documentation
-------------

Expand Down
6 changes: 1 addition & 5 deletions jwst/associations/lib/rules_level2_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,11 +774,7 @@ def __init__(self):
DMSAttrConstraint(
name='imprint',
sources=['is_imprt']
),
DMSAttrConstraint(
name='mosaic_tile',
sources=['mostilno'],
),
)
],
reprocess_on_match=True,
work_over=ListCategory.EXISTING,
Expand Down
24 changes: 22 additions & 2 deletions jwst/associations/lib/rules_level2b.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,29 @@ def __init__(self, *args, **kwargs):
),
Constraint(
[
# Allow either any background, or ensure imprint and science members
# match on mosaic tile number and dither pointing position.
Constraint_Background(),
Constraint_Imprint(),
Constraint_Single_Science(self.has_science, self.get_exposure_type),
Constraint(
[
Constraint(
[
Constraint_Imprint(),
Constraint_Single_Science(self.has_science, self.get_exposure_type),
],
reduce=Constraint.any
),
DMSAttrConstraint(
name='mostilno',
sources=['mostilno']
),
DMSAttrConstraint(
name='dithptin',
sources=['dithptin']
)
],
reduce=Constraint.all
),
],
reduce=Constraint.any
),
Expand Down
5 changes: 5 additions & 0 deletions jwst/regtest/test_associations_sdp_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@
'xfail': None,
'slow': True,
},
'jw01192_o008_pool.csv': {
'args': ['-i', 'o008'],
'xfail': None,
'slow': False,
},
'jw01194_20230115t113819_pool': {
'args': [],
'xfail': None,
Expand Down

0 comments on commit ccdb12d

Please sign in to comment.