Skip to content

Commit

Permalink
update tests and CHANGE log
Browse files Browse the repository at this point in the history
  • Loading branch information
jemorrison committed Jan 6, 2023
1 parent abe23a5 commit 93df0ad
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
1.9.2 (unreleased)
==================

-
calwebb_spec2
-------------
- Subtract leakcal image from science and backgrounds and then background subtract [#7426]

imprint
-------
- Add matching leakcal image and science/background image by using dither.position_number [#7426]

1.9.1 (2023-01-03)
==================
Expand Down
2 changes: 2 additions & 0 deletions jwst/imprint/imprint_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class ImprintStep(Step):

def process(self, input, imprint, imprint_pos_no):

# imprint_pos_no - a list of the position numbers corresponding to the list of imprints

# subtract leakcal (imprint) image
# If only 1 imprint image is in the association use for for science and if there a background
# If more than 1 imprint image exists in the association then select the imprint image to
Expand Down
6 changes: 5 additions & 1 deletion jwst/imprint/tests/test_imprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ def test_step(make_imagemodel):
"""Assert that the results should be all zeros.
"""
im = make_imagemodel(10, 10)
result = ImprintStep.call(im, im)
pos_no = []
imprint = []
pos_no.append(0)
imprint.append(im)
result = ImprintStep.call(im, imprint, pos_no)

assert result.meta.cal_step.imprint == 'COMPLETE'
assert result.data.sum() == 0
Expand Down
2 changes: 2 additions & 0 deletions jwst/pipeline/calwebb_spec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,8 @@ def _process_common(self, data):

def _imprint_pos_no(self, members_by_type):
"""Find the position number for each imprint image"""

# members_by_type['imprint'] is a list of imprint images
imprint_pos_no = []
for i, imprint_file in enumerate(members_by_type['imprint']):
imprint_model = datamodels.open(imprint_file)
Expand Down

0 comments on commit 93df0ad

Please sign in to comment.