Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93461409
pychem_get_ejectats
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Nov 28, 23:06
Size
1 KB
Mime Type
text/x-python
Expires
Sat, Nov 30, 23:06 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22625539
Attached To
rGEAR Gear
pychem_get_ejectats
View Options
#!/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
Log In to Comment