diff --git a/CHANGES.rst b/CHANGES.rst index 90d8033b06..52cd76aa1f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -62,6 +62,12 @@ Mosviz Specviz ^^^^^^^ +Specviz2d +^^^^^^^^^ + +- Fixed default spectral extraction parameters when the background separation otherwise would have + fallen directly on the edge of the image. [#1633] + Other Changes and Additions --------------------------- diff --git a/jdaviz/configs/specviz2d/plugins/spectral_extraction/spectral_extraction.py b/jdaviz/configs/specviz2d/plugins/spectral_extraction/spectral_extraction.py index 5a5b219538..443627ca13 100644 --- a/jdaviz/configs/specviz2d/plugins/spectral_extraction/spectral_extraction.py +++ b/jdaviz/configs/specviz2d/plugins/spectral_extraction/spectral_extraction.py @@ -169,7 +169,7 @@ def _trace_dataset_selected(self, msg=None): if self.bg_trace_pixel == 0: self.bg_trace_pixel = brightest_pixel if self.bg_separation == 0: - if default_bg_width * 2 > distance_from_edge: + if default_bg_width * 2 >= distance_from_edge: self.bg_type_selected = 'OneSided' # we want positive separation if brightest_pixel near bottom sign = 1 if (brightest_pixel < width / 2) else -1