Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spectral extraction defaults: fix case where background exactly on edge #1633

Merged
merged 1 commit into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down