Page MenuHomec4science

pychem_get_ejectats
No OneTemporary

File Metadata

Created
Thu, Nov 28, 23:06

pychem_get_ejectats

#!/usr/bin/env python
import sys
from PyChem import chemistry
from numpy import *
chemistry.init_chimie("chimie.yr.dat")
# assume SSP with zero metallicity
metals = zeros(chemistry.get_nelts(),float)
# set masses
m1 = chemistry.get_Mmin() # min mass in the IMF
m2 = chemistry.get_Mmax() # max mass in the IMF
#m1 = 2./1e10 # set masses
#m2 = 3./1e10 # set masses
livetime1 = chemistry.star_lifetime(metals[0],m1)
livetime2 = chemistry.star_lifetime(metals[0],m2)
print m1*1e10,m2*1e10
print "livetimes",livetime1*4.7,livetime2*4.7
print
labels = chemistry.get_elts_labels()
print "Tot"
EjectedMass = chemistry.Total_mass_ejection(m1,m2,1,metals)
TotalEjectedEltMasscont = EjectedMass[2:]
print "Fe=",TotalEjectedEltMasscont[labels.index('Fe')]
print "Metals=",TotalEjectedEltMasscont[labels.index('Metals')]
print
print "SNII"
EjectedMass = chemistry.SNII_mass_ejection(m1,m2)
TotalEjectedEltMasscont = EjectedMass[2:]
print "Fe=",TotalEjectedEltMasscont[labels.index('Fe')]
print "Metals=",TotalEjectedEltMasscont[labels.index('Metals')]
print
print "SNIa"
EjectedMass = chemistry.SNIa_mass_ejection(m1,m2)
TotalEjectedEltMasscont = EjectedMass[2:]
print "Fe=",TotalEjectedEltMasscont[labels.index('Fe')]
print "Metals=",TotalEjectedEltMasscont[labels.index('Metals')]
print

Event Timeline