Prepared by Christian Ritter
In [1]:
    
%matplotlib nbagg
import matplotlib.pyplot as plt
import sys
import sygma as s
import omega as o
import numpy as np
print (s.global_path)
import read_yields as ry
import matplotlib
    
    
In [2]:
    
table='yield_tables/agb_and_massive_stars_nugrid_MESAonly_fryer12delay.txt'
    
In [3]:
    
# OMEGA parameters for MW
mass_loading = 0.0
nb_1a_per_m = 3.0e-3
sfe=0.04
SF_law=True
DM_evolution=False
imf_yields_range=[1.0,30.0]
special_timesteps=30
Z_trans=0.0
iniZ=0.0001
    
In [4]:
    
o0=o.omega(iniZ=iniZ,galaxy='milky_way',Z_trans=Z_trans, table=table,sfe=sfe, DM_evolution=DM_evolution,\
                  mass_loading=mass_loading, nb_1a_per_m=nb_1a_per_m, special_timesteps=special_timesteps,
                  imf_yields_range=imf_yields_range,
                SF_law=SF_law)
    
    
Here we use yields in two (extra source) yield tables which we apply in the mass range from 8Msun to 12Msun and from 12Msun to 30Msun respectively. We apply a factor of 0.5 to the extra yields of the first yield table and 1. to the second yield table.
In [5]:
    
extra_source_table=['yield_tables/mhdjet_NTT_delayed.txt','yield_tables/ndw_wind_expand.001.txt']
#Apply yields only in specific mass ranges;
extra_source_mass_range = [[8,12],[12,30]]
#percentage of stars to which the yields are added. First entry for first yield table etc.
f_extra_source = [0.5,1.]
#metallicity to exclude (in this case none)
extra_source_exclude_Z = [[], []]
    
In [6]:
    
#you can look at the yields directly with the y1 and y2 parameter below.
y1=ry.read_yield_sn1a_tables(s.global_path+extra_source_table[0])
y2=ry.read_yield_sn1a_tables(s.global_path+extra_source_table[1])
    
In [7]:
    
s0 = s.sygma(iniZ=0.0001,extra_source_on=False) #default False
    
    
In [8]:
    
s0p1 = s.sygma(iniZ=0.0001,extra_source_on=True,
             extra_source_table=extra_source_table,extra_source_mass_range=extra_source_mass_range,
           f_extra_source=f_extra_source, extra_source_exclude_Z=extra_source_exclude_Z)
    
    
In [9]:
    
o0p1=o.omega(iniZ=iniZ,galaxy='milky_way',Z_trans=Z_trans, table=table,sfe=sfe, DM_evolution=DM_evolution,\
                  mass_loading=mass_loading, nb_1a_per_m=nb_1a_per_m, special_timesteps=special_timesteps,
                  imf_yields_range=imf_yields_range,SF_law=SF_law,extra_source_on=True,
           extra_source_table=extra_source_table,extra_source_mass_range=extra_source_mass_range,
           f_extra_source=f_extra_source, extra_source_exclude_Z=extra_source_exclude_Z)
    
    
In [ ]: