diff --git a/CHANGES.rst b/CHANGES.rst index dddb9ca3758..0a9f65f86c1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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) ================== diff --git a/jwst/imprint/imprint_step.py b/jwst/imprint/imprint_step.py index 2236d1dc188..7156e26e82c 100755 --- a/jwst/imprint/imprint_step.py +++ b/jwst/imprint/imprint_step.py @@ -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 diff --git a/jwst/imprint/tests/test_imprint.py b/jwst/imprint/tests/test_imprint.py index 260c46dc0c3..1b4e331d5b6 100644 --- a/jwst/imprint/tests/test_imprint.py +++ b/jwst/imprint/tests/test_imprint.py @@ -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 diff --git a/jwst/pipeline/calwebb_spec2.py b/jwst/pipeline/calwebb_spec2.py index 0fde5ead6bf..dadf2a01bdc 100644 --- a/jwst/pipeline/calwebb_spec2.py +++ b/jwst/pipeline/calwebb_spec2.py @@ -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)