Exemplo n.º 1
0
OxyYield = (np.sum(Stellar_oxygen*S['m']) + np.sum(Gas_oxygen*G['m'])) / np.sum(S['m'])

EmpiricalYield = Total_metal_mass / np.sum(S['m'])

a = G['header'][2]
z = 1.0/a - 1.0
redshift = G['header'][3]
boxsize = G['header'][9]
omega_matter = G['header'][10]
omega_L = G['header'][11]
h = G['header'][12]
redshiftstring = "{0:.3f}".format(redshift)
Hubble = hubble_param(a, omega_matter, h)
PhysTemp, PhysRho = SF.convertTemp(G['u'], G['ne'], G['rho'], h)

halostats = SF.find_halo_now(halo_to_do, a, therod=use_fixed_halos)

print 'halo stats', halostats
haloN = halostats[1]

#read halo catalog, assign halo properties
Rvir = halostats[11]
Vsig = halostats[10]
haloX = halostats[2]
haloY = halostats[3]
haloZ = halostats[4]
haloVX =halostats[5]
haloVY = halostats[6]
haloVZ = halostats[7]
M = halostats[8]
Mstar = halostats[13]
Exemplo n.º 2
0
Syoung = stellar_age_cut
Rstars = where_do_we_go * h / a
RstarsPhys = where_do_we_go



workcount = 0 
Hubble = hubble_param(a, omega_matter, h)


###########
#Work function
###########
C = SF.read_halo_catalog(Nsnapstring, redshiftstring)
while (workcount < len(halo_to_do)):
	halostats = SF.find_halo_now(halo_to_do[workcount], a, therod=use_fixed_halos)
	haloN = halostats[1]
	Rvir = halostats[11]
	haloX = halostats[2]
	haloY = halostats[3]
	haloZ = halostats[4]
	Mstar = halostats[13]
	Vsig = halostats[10]
	Mgas = halostats[12]
	M = halostats[4]

	Rvir, Vsig, M = SF.check_Rvir_growth(halo_to_do[workcount], a, Rvir, Vsig, M, therod=use_fixed_halos)

	if (adaptive_Rstar):
		Rstars = Inner_SF_thresh*Rvir
		RstarsPhys = Rstars * a / h