From d2d12b5eec1deaae7243f10017b4e550e26eee06 Mon Sep 17 00:00:00 2001 From: Howard Bushouse Date: Tue, 27 Oct 2020 20:03:42 -0400 Subject: [PATCH 1/2] JP-1693: Fix extract_1d for SourceContainer with 1 slit --- jwst/extract_1d/extract.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jwst/extract_1d/extract.py b/jwst/extract_1d/extract.py index 3068fda55b..611a0cdb01 100644 --- a/jwst/extract_1d/extract.py +++ b/jwst/extract_1d/extract.py @@ -2730,7 +2730,12 @@ def do_extract1d( # Handle inputs that contain one or more slit models if was_source_model or isinstance(input_model, datamodels.MultiSlitModel): if was_source_model: # SourceContainer has a single list of SlitModels - slits = input_model + if isinstance(input_model, datamodels.SlitModel): + # If input is a single SlitModel, as opposed to a list of SlitModels, + # put it into a list so that it's iterable later on + slits = [input_model] + else: + slits = input_model # The subsequent work on data uses the individual SlitModels, but there are many places where meta # attributes are retreived from input_model, so set this to allow that to work. From 6a2340f884be308df71f45c58829876bf3543ba4 Mon Sep 17 00:00:00 2001 From: Howard Bushouse Date: Wed, 28 Oct 2020 09:53:23 -0400 Subject: [PATCH 2/2] Update change log [skip ci] --- CHANGES.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index f2005ec4b9..e529720f24 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -43,7 +43,7 @@ datamodels extract_1d ---------- -- Fixed bug invovling the determination of source RA/Dec for resampled Slit +- Fixed bug involving the determination of source RA/Dec for resampled Slit data. [#5353] - Updated to use an EXTRACT1D reference file for NIRCam TSGRISM exposures; @@ -52,6 +52,9 @@ extract_1d background computation that was preventing background subtraction from ever happening. [#5414] +- Fixed bug involving the processing of WFSS observations when there's only + one spectrum instance for a given source. [#5439] + flatfield ---------