Commit ab6077fe authored by Laura Ketzer's avatar Laura Ketzer
Browse files

worked on analyzing population evo output

parent 3d44b301
......@@ -82,6 +82,7 @@ def Lx_evo(t, track_dict):
if t_5Gyr == t_curr: # then we are dealing with the OwWu17 case
#print("in if")
alpha = (np.log10(Lx_curr/Lx_max))/(np.log10(t_curr/t_sat))
print(alpha)
k = 10**(np.log10(Lx_max) - alpha*np.log10(t_sat))
Lx = powerlaw(t, k, alpha)
......
......@@ -2,10 +2,18 @@ from astropy import constants as const
from astropy import units as u
import numpy as np
def get_period_from_a(M_star, a_pl):
def get_period_from_a(M_star, M_pl, a_pl):
P_sec = (4*np.pi**2/(const.G.cgs*(M_star*const.M_sun.cgs+M_pl*const.M_earth.cgs))*(a_pl*const.au.cgs)**3)**(0.5)
return P_sec.value/(86400) # in days
def get_a_from_period(M_star, M_pl, P):
ahoch3 = (P*86400*u.s)**2 * (const.G.cgs*(M_star*const.M_sun.cgs+M_pl*const.M_earth.cgs)) / (4*np.pi**2)
return ((ahoch3**(1/3))/const.au.cgs).value # in days
def get_period_from_a_no_Mpl(M_star, a_pl):
P_sec = (4*np.pi**2/(const.G.cgs*M_star*const.M_sun.cgs)*(a_pl*const.au.cgs)**3)**(0.5)
return P_sec.value/(86400) # in days
def get_a_from_period(M_star, P):
ahoch3 = (P*86400*u.s)**2 * (const.G.cgs*M_star*const.M_sun.cgs)/ (4*np.pi**2)
def get_a_from_period_no_Mpl(M_star, P):
ahoch3 = (P*86400*u.s)**2 * (const.G.cgs*M_star*const.M_sun.cgs) / (4*np.pi**2)
return ((ahoch3**(1/3))/const.au.cgs).value # in days
1.16–1.29; 0.078 ± 0.017
1.29–1.43; 0.08 ± 0.013
1.43–1.59; 0.053 ± 0.011
1.59–1.77; 0.0334 ± 0.0092
1.77–1.97; 0.05 ± 0.01
1.97–2.19; 0.086 ± 0.016
2.19–2.43; 0.098 ± 0.016
2.43–2.70; 0.077 ± 0.016
2.70–3.00; 0.053 ± 0.012
3.00–3.33; 0.0316 ± 0.0089
3.33–3.70; 0.0242 ± 0.0066
3.70–4.12; 0.0094 ± 0.0057
4.12–4.57; 0.0056 ± 0.0034
4.57–5.08; 0.0037 ± 0.0031
5.08–5.65; 0.0066 ± 0.0048
5.65–6.27; 0.005 ± 0.003
6.27–6.97; 0.0 ± inf
6.97–7.75; 0.0019 ± 0.0029
7.75–8.61; 0.0044 ± 0.0034
8.61–9.56; 0.00022 ± 0.00032
9.56–10.63; 0.001 ± 0.0015
10.63–11.81; 0.00035 ± 0.00053
11.81–13.12; 0.00104 ± 0.00094
13.12–14.58; 0.0038 ± 0.0021
14.58–16.20; 0.00084 ± 0.00066
16.20–18.00; 0.0003 ± 0.0004
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment