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

Add constants.py #24

Closed
moeyensj opened this issue Oct 2, 2019 · 4 comments
Closed

Add constants.py #24

moeyensj opened this issue Oct 2, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@moeyensj
Copy link
Owner

moeyensj commented Oct 2, 2019

We should add a constants class that stores all relevant constants as opposed to relying on those provided by astropy.

@moeyensj moeyensj added the enhancement New feature or request label Oct 2, 2019
@moeyensj moeyensj added this to the Initial Orbit Determination milestone Oct 2, 2019
@moeyensj moeyensj self-assigned this Oct 2, 2019
@mjuric
Copy link
Collaborator

mjuric commented Oct 3, 2019

Are the ones in astropy incoorrect (or tend to change)?

Not opposed, just curious...

@moeyensj
Copy link
Owner Author

moeyensj commented Oct 3, 2019

I am not sure if they are correct or incorrect, but they are different from the ones provided in the JPL ephemeris files (which is where oorb draws its constants from).

For example:

from astropy import constants as c
from astropy import units as u

desired_units = (u.AU**3 / u.d**2)
MU_astropy = (c.G * u.M_sun).to(desired_units).value
MU_de430 = 0.295912208285591100e-3 # in units of AU^3 / d^2 from page 49 in https://ipnpr.jpl.nasa.gov/progress_report/42-196/196C.pdf

print(1 - MU_astropy/MU_de430)
3.1601721239837843e-10

@mjuric
Copy link
Collaborator

mjuric commented Oct 3, 2019

👍.

(n.b., I was curious about this, so I checked what they do: astropy constants do change from version to version, though there is a way to fix which version a code should use https://docs.astropy.org/en/stable/constants/, https://github.com/astropy/astropy/blob/master/astropy/constants/.)

@moeyensj
Copy link
Owner Author

Completed with #17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants