Skip to content
Snippets Groups Projects
Commit 7cf278a4 authored by David Hendriks's avatar David Hendriks
Browse files

minor changes

parent db108bc5
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,9 @@ YEARDY = 3.651995478818308811241877265275e02 ...@@ -22,7 +22,9 @@ YEARDY = 3.651995478818308811241877265275e02
def calc_period_from_sep(M1, M2, sep): def calc_period_from_sep(M1, M2, sep):
""" """
calculate period from separation calculate period from separation
args : M1, M2, separation (Rsun) args : M1 (Msol), M2 (Msol), separation (Rsun)
returns the period (days)
""" """
return YEARDY * (sep / AURSUN) * math.sqrt(sep / (AURSUN * (M1 + M2))) return YEARDY * (sep / AURSUN) * math.sqrt(sep / (AURSUN * (M1 + M2)))
...@@ -31,7 +33,9 @@ def calc_period_from_sep(M1, M2, sep): ...@@ -31,7 +33,9 @@ def calc_period_from_sep(M1, M2, sep):
def calc_sep_from_period(M1, M2, period): def calc_sep_from_period(M1, M2, period):
""" """
inverse of the above function inverse of the above function
args : M1, M2, period (days) args : M1 (Msol), M2 (Msol), period (days)
returns the separation (Rsun)
""" """
return AURSUN * (period * period * (M1 + M2) / (YEARDY * YEARDY)) ** (1.0 / 3.0) return AURSUN * (period * period * (M1 + M2) / (YEARDY * YEARDY)) ** (1.0 / 3.0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment