Skip to content

Instantly share code, notes, and snippets.

@Horaddrim
Created March 12, 2018 23:20
Show Gist options
  • Select an option

  • Save Horaddrim/166b8f1ba0f0780901caf30f335d845d to your computer and use it in GitHub Desktop.

Select an option

Save Horaddrim/166b8f1ba0f0780901caf30f335d845d to your computer and use it in GitHub Desktop.
# Import from this wonderful lib the constant equals to the Jupiter Mass (in KG)
from astropy.constants import M_jup
# if you don't want the library
# M_jup = 10**27
def mj_to_kg(mj_value):
raw_value = int(mj_value)
return (raw_value + 0.00019) * M_jup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment