[AstroPy] Discrepancy between astropy.constants parsec and au values?
Hatchell, Jenny
J.Hatchell at exeter.ac.uk
Tue Jul 14 08:33:51 EDT 2020
A colleague of mine points out that the value of a parsec in astropy.constants/units differs from that calculated from astronomical units after the 10th decimal place.
The IAU fixed the astronomical unit in 2012 (resolution B2) to 149 597 870 700 m exactly,
https://www.iau.org/static/resolutions/IAU2012_English.pdf
and the parsec follows from the au so should be exactly a factor 180 * 3600 / pi larger.
Comparing the calculated value with the stored value in astropy.constants shows the discrepancy -
# AU to pc check
# AU copied from IAU 2012 resolution B2
AU = 149597870700
print(AU * 180*3600 / np.pi)
print(const.au<http://const.au> * 180*3600 / np.pi)
print(const.pc.value)
3.085677581491367e+16
3.085677581491367e+16 m
3.0856775814671916e+16
astropy version 4.0.1.post1
None of those values have any uncertainties, and although np.pi has a limited precision it is available to more than 10 d.p.
Of course, it’s unlikely that anyone needs this level of precision when astronomical distances are typically only known to a few %.
Best wishes
Jenny
---
Dr. Jennifer Hatchell
Senior Lecturer in Astrophysics
University of Exeter
+44 (0)1392 725516
Standard working pattern: Tue-Thu and Fri AM. Currently working from home.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20200714/277f1cfa/attachment.html>
More information about the AstroPy
mailing list