From c79c4aedb255de3f99357ab35c650459454d8b39 Mon Sep 17 00:00:00 2001 From: Timothy D Brandt Date: Mon, 24 Jun 2024 08:03:43 -0400 Subject: [PATCH] JP-3660: extract1d _coalesce_bounds fix (#8586) Co-authored-by: Timothy Brandt Co-authored-by: Howard Bushouse --- CHANGES.rst | 4 ++++ jwst/extract_1d/extract1d.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index ab5791a3a7..27f019d4b3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -119,6 +119,10 @@ extract_1d - Fix error in application of aperture correction to variance arrays. [#8530] +- Fix error in ``_coalesce_bounds`` that returned incorrect spectral or background + extraction region when one set of pixel limits is entirely contained within + another [#8586] + - Removed a check for the primary slit for NIRSpec fixed slit mode: all slits containing point sources are now handled consistently, whether they are marked primary or not. [#8467] diff --git a/jwst/extract_1d/extract1d.py b/jwst/extract_1d/extract1d.py index f0c3a60d95..e083497cd6 100644 --- a/jwst/extract_1d/extract1d.py +++ b/jwst/extract_1d/extract1d.py @@ -802,7 +802,7 @@ def _coalesce_bounds(segments): pint = cint[-1] interval = intervals.pop(0) if interval[0] <= pint[1]: - pint[1] = interval[1] + pint[1] = max(interval[1], pint[1]) continue cint.append(interval)