### worked on Owen&Wu 17 sample and started evolving it using Platypos (with beta & K off, eps=0.1)

parent a7877544
 import numpy as np import astropy.units as u from astropy import constants as const import scipy.optimize as optimize from scipy.optimize import fsolve def Lx_evo(t, track_dict): """ ... ... @@ -154,6 +156,23 @@ def L_xuv_all(Lx): log_L_xuv = np.log10(Lx+Leuv) return 10.**log_L_xuv#*u.erg/u.s ##################################################################################################################### def undo_what_Lxuv_all_does(L_xuv): """ If you have LXUV given, this takes the Sanz-Forcada et al. (2011) scaling relation and reverses it to estimate Lx.""" def Calculate_Lx(Lx): return Lx + 10**(0.86*np.log10(Lx)+4.8) - L_xuv if (L_xuv > 1.*10**29): f_guess = L_xuv elif (L_xuv <= 1.*10**29) and (L_xuv > 1.*10**26): f_guess = 1.*10**25 elif (L_xuv <= 1.*10**26): f_guess = 1.*10**22 #print(f_guess) Lx = optimize.fsolve(Calculate_Lx, x0=f_guess) return Lx ##################################################################################################################### # def Lx_relation_Booth(t, R_star): # """R_star in terms of solar units""" ... ... @@ -163,4 +182,4 @@ def L_xuv_all(Lx): ##################################################################################################################### def calculate_Lx_sat(L_star_bol): """ Typical relation (from observations) to estimate the saturation X-ray luminosity given a bolometric luminosity.""" return 10**(-3)*(L_star_bol*const.L_sun.cgs).value \ No newline at end of file return 10**(-3)*(L_star_bol*const.L_sun.cgs).value
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
No preview for this file type
No preview for this file type
No preview for this file type