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: support floats when possible #1652

Merged
merged 2 commits into from
Oct 4, 2022

Conversation

kecnry
Copy link
Member

@kecnry kecnry commented Sep 15, 2022

Description

This pull request allows floats (instead of enforcing integers) for all trace positions, widths, and separations.

Blocked by

Change log entry

  • Is a change log needed? If yes, is it added to CHANGES.rst? If you want to avoid merge conflicts,
    list the proposed change log here for review and add to CHANGES.rst before merge.

Bugfixes > Specviz2d:
Spectral-extraction plugin: support floats for all input trace positions, separations, and widths.

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a milestone set?
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@kecnry kecnry added the trivial Only needs one approval instead of two label Sep 15, 2022
@kecnry kecnry added this to the 2.11 milestone Sep 15, 2022
@kecnry kecnry force-pushed the spec-extract-floats branch from 9c8e4ec to eaea7c2 Compare September 15, 2022 15:07
@kecnry kecnry marked this pull request as ready for review September 15, 2022 15:11
@pllim
Copy link
Contributor

pllim commented Sep 15, 2022

The changes look reasonable but does existing test need to be updated to pass in some floating point values?

@kecnry kecnry force-pushed the spec-extract-floats branch from eaea7c2 to d67b5a4 Compare September 16, 2022 12:40
@kecnry
Copy link
Member Author

kecnry commented Sep 16, 2022

does existing test need to be updated to pass in some floating point values?

Good idea. I updated one of the tests to pass a float. I think the actually functionality of handling floats is the responsibility of specreduce, not jdaviz, but making sure the float traitlet sets without an error is worth having here.

Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@kecnry kecnry force-pushed the spec-extract-floats branch from d67b5a4 to 22e4f30 Compare September 16, 2022 12:52
@pllim
Copy link
Contributor

pllim commented Sep 16, 2022

I cannot tell if this is a bug or just the test case needs updating.

>           raise ValueError("background regions overlapped")
E           ValueError: background regions overlapped

@kecnry
Copy link
Member Author

kecnry commented Sep 16, 2022

Holding up on merging this until a new release of specreduce can be pinned here (tests pass locally for me on specreduce main, but not on 1.1.0, so seems like this requires astropy/specreduce#125 in order to avoid a background overlap error when passing floats).

@kecnry kecnry marked this pull request as draft September 16, 2022 13:20
@kecnry kecnry force-pushed the spec-extract-floats branch from 22e4f30 to 4b21150 Compare September 29, 2022 19:26
@kecnry kecnry force-pushed the spec-extract-floats branch from e755cfd to cdac66c Compare October 4, 2022 20:45
@kecnry kecnry marked this pull request as ready for review October 4, 2022 21:14
@kecnry kecnry merged commit 4c2a3dc into spacetelescope:main Oct 4, 2022
@kecnry kecnry deleted the spec-extract-floats branch October 4, 2022 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
specviz2d trivial Only needs one approval instead of two Upstream fix required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants