Created
August 29, 2018 18:30
-
-
Save j-faria/36d3c8e8db3aa30bde1b126f6d9a253f to your computer and use it in GitHub Desktop.
How to get those constants in the exoplanet RV amplitude / mass equations!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import astropy.constants as c | |
import astropy.units as u | |
from math import pi | |
C = (2*pi*c.G)**(1/3) | |
# K [m/s] = C1 .... | |
C1 = C.to( (u.meter/u.second) * u.year**(1/3.) * (1/u.M_jup) * u.M_sun**(2/3.) ).value | |
# mp sini [Mjup] = C2 .... | |
C2 = (1/C).to( u.M_jup / ms / u.day**(1/3) / u.M_sun**(2/3) ).value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment