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

hacky metadata solution to address RA/Dec flipping due to cube reinge… #2686

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gibsongreen
Copy link
Contributor

This pull request is to address when a cube extracted with get_data has RA and Dec flipped when reingested into cubeviz. The solution utilizes metadata stored within the extracted cube, so that a cube can pass information to the parser whether or not it is necessary to rotate/move axis.

Bug:
Screenshot 2024-02-02 at 1 04 25 PM
With fix:
Screenshot 2024-02-02 at 1 05 15 PM

Fixes #

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. If no, maintainer
    should add a no-changelog-entry-needed label.

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? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@github-actions github-actions bot added cubeviz plugin Label for plugins common to multiple configurations labels Feb 2, 2024
@@ -267,6 +267,8 @@ def _parse_hdulist(app, hdulist, file_name=None,
app.add_data_to_viewer(spectrum_viewer_reference_name, data_label)
app._jdaviz_helper._loaded_flux_cube = app.data_collection[data_label]

metadata['_parsed_before'] = True
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels a little hacky. At the tag-up on 2024-02-02, we have agreed to wait for specutils 2.0 effort to see if we would even need such workaround then.

Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, Kyle had asked to me to create a Draft PR for this temporary solution to bring up to Cami when we re-discuss the topic of save/save-state/etc. sometime next week; so this PR was only created to not lose track of an unideal solution and to offer a temporary solution that would need to be reverted post specutils 2.0. We were going to let her decided whether or not to use it and revert or to wait for 2.0 in general

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cubeviz plugin Label for plugins common to multiple configurations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants