[AstroPy] AstroPy Digest, Vol 166, Issue 4

Hatchell, Jenny J.Hatchell at exeter.ac.uk
Thu Jul 16 05:17:31 EDT 2020


Derek, thanks for looking into this.  I must admit I’ve never calculated a parallax using anything other than the small angle approx., so it’s good to be reminded that there could be a tangent in the calculation.

The IAU parsec definition is buried in a note at the bottom of a resolution on a completely different topic (zero points for magnitude scales), so it's easy to miss.

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.




On 14 Jul 2020, at 17:00, astropy-request at python.org<mailto:astropy-request at python.org> wrote:

CAUTION: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.


Send AstroPy mailing list submissions to
       astropy at python.org<mailto:astropy at python.org>

To subscribe or unsubscribe via the World Wide Web, visit
       https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.python.org%2Fmailman%2Flistinfo%2Fastropy&data=02%7C01%7CJ.Hatchell%40exeter.ac.uk%7Cb1f8616e3b47499b478b08d8280f18c5%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C1%7C637303392592405338&sdata=ARuvgsFGnu4HE7Q2Y21gJTFeC04%2Bt7ptCc9MDymPNM8%3D&reserved=0
or, via email, send a message with subject or body 'help' to
       astropy-request at python.org<mailto:astropy-request at python.org>

You can reach the person managing the list at
       astropy-owner at python.org<mailto:astropy-owner at python.org>

When replying, please edit your Subject line so it is more specific
than "Re: Contents of AstroPy digest..."


Today's Topics:

  1. Discrepancy between astropy.constants parsec and au values?
     (Hatchell, Jenny)
  2. Re: Discrepancy between astropy.constants parsec and au
     values? (Derek Homeier)


----------------------------------------------------------------------

Message: 1
Date: Tue, 14 Jul 2020 12:33:51 +0000
From: "Hatchell, Jenny" <J.Hatchell at exeter.ac.uk<mailto:J.Hatchell at exeter.ac.uk>>
To: "astropy at python.org<mailto:astropy at python.org>" <astropy at python.org<mailto:astropy at python.org>>
Subject: [AstroPy] Discrepancy between astropy.constants parsec and au
       values?
Message-ID: <92F7E50D-40E0-4EE6-8C48-B714DBF18C56 at exeter.ac.uk<mailto:92F7E50D-40E0-4EE6-8C48-B714DBF18C56 at exeter.ac.uk>>
Content-Type: text/plain; charset="utf-8"


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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.iau.org%2Fstatic%2Fresolutions%2FIAU2012_English.pdf&data=02%7C01%7CJ.Hatchell%40exeter.ac.uk%7Cb1f8616e3b47499b478b08d8280f18c5%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C1%7C637303392592405338&sdata=Y3bPohKF9BRxAK%2BxwYT53pu1zfC5Dgs7q16qUpDPY2M%3D&reserved=0
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<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fconst.au%2F&data=02%7C01%7CJ.Hatchell%40exeter.ac.uk%7Cb1f8616e3b47499b478b08d8280f18c5%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C1%7C637303392592405338&sdata=nsiH0CPbk6ZokVdqsdjjhg3nQ6j098YW5hvaeTHXJAg%3D&reserved=0> * 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: <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.python.org%2Fpipermail%2Fastropy%2Fattachments%2F20200714%2F277f1cfa%2Fattachment-0001.html&data=02%7C01%7CJ.Hatchell%40exeter.ac.uk%7Cb1f8616e3b47499b478b08d8280f18c5%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C1%7C637303392592405338&sdata=J2VasCUuUpWvncybZAYzlJ6KLIb9n%2F%2B0V2R0gCe9t10%3D&reserved=0>

------------------------------

Message: 2
Date: Tue, 14 Jul 2020 15:43:45 +0200
From: Derek Homeier <derek at astro.physik.uni-goettingen.de>
To: Astronomical Python mailing list <astropy at python.org>
Subject: Re: [AstroPy] Discrepancy between astropy.constants parsec
       and au values?
Message-ID:
       <BAD43B7D-E9DE-40A1-94D9-A5CF96A10198 at astro.physik.uni-goettingen.de>
Content-Type: text/plain; charset=utf-8

Hi Jenny,


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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.iau.org%2Fstatic%2Fresolutions%2FIAU2012_English.pdf&data=02%7C01%7CJ.Hatchell%40exeter.ac.uk%7Cb1f8616e3b47499b478b08d8280f18c5%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C1%7C637303392592405338&sdata=Y3bPohKF9BRxAK%2BxwYT53pu1zfC5Dgs7q16qUpDPY2M%3D&reserved=0
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 * 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 %.

it appears that astropy.constants defines the parsec as the distance of a 1?-parallax source to the Sun.

print(const.au / np.tan(np.pi / 180*3600))
3.0856775814671916e+16 m

accordingly reproduces the const.pc value (just to check on numpy's tangent builtin, I confirmed that this
is also identical to the 2nd order expansion const.au / ((np.pi / 180*3600) + (np.pi / 180*3600)**3 / 3)
within float64 precision.
Probably because this definition conflicts with the how people will calculate and use distances for smaller
parallaxes, IAU 2015 resolution B2 (which is in fact explicitly listed as the reference in iau2015.py) states that
"4 The parsec is defined as exactly (648 000/?) au (e.g. Cox 2000, Binney & Tremaine 2008)."

which is 30 856 775 814 913 673 m, 3 metres longer than the numbers you calculated (float64 precision ;-).

Thanks for the bug report!

                               Derek



------------------------------

Subject: Digest Footer

_______________________________________________
AstroPy mailing list
AstroPy at python.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.python.org%2Fmailman%2Flistinfo%2Fastropy&data=02%7C01%7CJ.Hatchell%40exeter.ac.uk%7Cb1f8616e3b47499b478b08d8280f18c5%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C1%7C637303392592405338&sdata=ARuvgsFGnu4HE7Q2Y21gJTFeC04%2Bt7ptCc9MDymPNM8%3D&reserved=0


------------------------------

End of AstroPy Digest, Vol 166, Issue 4
***************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20200716/0987e125/attachment-0001.html>


More information about the AstroPy mailing list