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

CODATA 2022 update #2049

Merged
merged 5 commits into from
Dec 15, 2024
Merged

CODATA 2022 update #2049

merged 5 commits into from
Dec 15, 2024

Conversation

Jellby
Copy link
Contributor

@Jellby Jellby commented Aug 21, 2024

Update physical constant values to the latest CODATA 2022 recommended values (from https://pml.nist.gov/cuu/Constants/). Small change, but there's no reason to stay outdated 😁

  • Executed pre-commit run --all-files with no errors
  • The change is fully covered by automated unit tests
  • Documented in docs/ as appropriate
  • Added an entry to the CHANGES file

Copy link

codspeed-hq bot commented Aug 21, 2024

CodSpeed Performance Report

Merging #2049 will not alter performance

Comparing Jellby:codata_2022_update (6e45879) with master (2bdf58c)

Summary

✅ 437 untouched benchmarks

Ignacio Fdez. Galván added 2 commits August 22, 2024 14:08
Like most "measured constants", they're not measured directly, but
derived from other measures. However, the list of CODATA values
includes these (and their uncertainties and correlations), so it's
better to treat them as other constants.
@Jellby Jellby changed the title Codata 2022 update CODATA 2022 update Aug 22, 2024
@Jellby
Copy link
Contributor Author

Jellby commented Sep 23, 2024

Is there anything I should fix? I don't think any documentation (beyond the changelog) or any new test is needed. And surely the PR is not going to be rejected for those µs in the benchmark?

@andrewgsavage
Copy link
Collaborator

andrewgsavage commented Sep 25, 2024 via email

electron_mass = 9.1093837015e-31 kg = m_e = atomic_unit_of_mass = a_u_mass # (28)
proton_mass = 1.67262192369e-27 kg = m_p # (51)
neutron_mass = 1.67492749804e-27 kg = m_n # (95)
lattice_spacing_of_Si = 1.920155716e-10 m = d_220 # (32)
Copy link
Collaborator

Choose a reason for hiding this comment

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

you've removed this and the following K_ constants from the default units (but they're available in pint-convert). Is there a reason why?

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've removed them from pint-convert too, haven't I?

Those constants, as far as I can see, are only relevant to define the "X units" and the Å*, but the NIST website does not give values or correlations for them. So I decided it's better to define the units as constants directly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

thanks that makes senes

@andrewgsavage andrewgsavage merged commit fadbf70 into hgrecco:master Dec 15, 2024
61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants