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

BUG: Cubeviz to recognize VLT MUSE data #2504

Merged
merged 1 commit into from
Oct 12, 2023
Merged

Conversation

pllim
Copy link
Contributor

@pllim pllim commented Oct 11, 2023

Description

This pull request is to address the wavelength unit portion of #2502 .

  • Extension name is DATA.
  • CUNIT3 is AWAV (no E).

With this patch:

Screenshot 2023-10-11 140637

Performance issues with large cube still exist and are out of scope here.

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)? 🐱

@pllim pllim added bug Something isn't working 💤 backport-v3.7.x on-merge: backport to v3.7.x labels Oct 11, 2023
@pllim pllim added this to the 3.7.1 milestone Oct 11, 2023
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
jdaviz/configs/cubeviz/plugins/parsers.py 83.71% <100.00%> (ø)

📢 Thoughts on this report? Let us know!.

if cunit_key in hdr and 'WAVE' in hdr[ctype_key]:
if cunit_key in hdr and 'WAV' in hdr[ctype_key]:
Copy link
Member

Choose a reason for hiding this comment

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

is there any risk here of this catching something we don't want it to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the risk is pretty small given the values are supposedly defined by WCS standards. Do you want me to cross-check with this?

https://github.com/astropy/astropy/blob/32bd0ffb6898c6a57b9ec1a55c13c7a0efe8d273/astropy/wcs/wcsapi/fitswcs.py#L107

Copy link
Member

Choose a reason for hiding this comment

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

looks like there are (currently) three possible matches (WAVE, WAVN, AWAV). Do we need any order of preference to these or are there no cases where multiple ones would be present?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we need any order of preference to these or are there no cases where multiple ones would be present?

I don't think any sane cube WCS has more than 1 spectral axis at a given time?

If it does, how do we even know which one to use?

Copy link
Member

Choose a reason for hiding this comment

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

right now it would just be somewhat random.... but no need to make the logic more complicated if that case doesn't exist. Let's leave as-is for now. Thanks!

Copy link
Contributor

@javerbukh javerbukh left a comment

Choose a reason for hiding this comment

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

LGTM!

@pllim pllim merged commit 2937038 into spacetelescope:main Oct 12, 2023
23 checks passed
@pllim pllim deleted the vlt-musing branch October 12, 2023 17:52
@pllim
Copy link
Contributor Author

pllim commented Oct 12, 2023

Thanks for the reviews!

meeseeksmachine pushed a commit to meeseeksmachine/jdaviz that referenced this pull request Oct 12, 2023
pllim added a commit that referenced this pull request Oct 12, 2023
…4-on-v3.7.x

Backport PR #2504 on branch v3.7.x (BUG: Cubeviz to recognize VLT MUSE data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cubeviz Ready for final review 💤 backport-v3.7.x on-merge: backport to v3.7.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants