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

Fix issue 2889: NIST wl keyword #2918

Merged
merged 3 commits into from Jan 8, 2024
Merged

Conversation

keflavich
Copy link
Contributor

@keflavich keflavich commented Jan 7, 2024

NIST changed the keyword specification for wavelengths at some point in the last 11 years. This fixes the keywords that no longer seem to be supported.

  • TODO: add a remote test that checks for this

Copy link

codecov bot commented Jan 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2ad5ae5) 67.30% compared to head (0d79abd) 67.30%.

❗ Current head 0d79abd differs from pull request most recent head 627f3f0. Consider uploading reports for the commit 627f3f0 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2918   +/-   ##
=======================================
  Coverage   67.30%   67.30%           
=======================================
  Files         235      235           
  Lines       18135    18135           
=======================================
  Hits        12206    12206           
  Misses       5929     5929           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@keflavich
Copy link
Contributor Author

Fixes #2889, fixes #2917

@keflavich keflavich mentioned this pull request Jan 7, 2024
@bsipocz bsipocz added the nist label Jan 8, 2024
Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

Needs a changelog, and preferably docs.

Comment on lines +49 to +52
# check that non-supported units default to angstroms
result = nist.core.Nist.query(4101 * 1e-10 * u.m, 4103 * 1e-10 * u.m)
assert result['Ritz'].min() >= 4101
assert result['Ritz'].max() <= 4103
Copy link
Member

Choose a reason for hiding this comment

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

Wow, this is totally unexpected. Would you mention it in the narrative docs?

Or, alternative we should instead return a QTable with units properly set on the column.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

QTable seems the better solution; I think we should punt to the next PR though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bsipocz bsipocz added this to the v0.4.7 milestone Jan 8, 2024
@bsipocz bsipocz added the bug label Jan 8, 2024
Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

OK, let's go ahead with this, but would be nice to get the fixes in for the documentation soonish, too.

Also, there is one other test failure, and the imports in the tests look rather awful, so I'll open a follow-up for those.

@bsipocz bsipocz merged commit f63cd84 into astropy:main Jan 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants