Package enrichpy :: Module yields

Module yields

source code

Encapsulates stellar chemical yield data, currently only carbon 12.

General scheme:

For each data source, a Yield_Data subclass handles reading in the data and converting it into numpy array of yields, stellar masses, and stellar metallicites.

The Interpolate_Yields class take a Yield_Data subclass instance and handles the creation of an interpolation function that returns the yield as a function of stellar mass and metallicity.

Classes
  Yield_Data
Base class for yield data.
  Data_vdHG
van den Hoek and Groenewegen (1997): 0.8 -- 8 Msun; Z = 0.001 -- 0.04
  Data_H
Herwig 2004: 2-6 Msun; Z=0.0001
  Data_GBM
Gavilan, Buell, & Molla (2005): 0.8 -- 100 Msun; log(Z/Zsun)=-0.2--+0.2
  Exponentiate
Decorator to exponentiate some arguments before calling the function.
  Interpolate_Yields
The ejected carbon mass is interpolated on a logarithmic metalicity scale and mass scale.
  Data_ChLi
Chieffi & Limongi (2004) yields: 13--35 Msun; Z = 0, 1e-6 -- 0.02
  Data_CaLa
Campbell & Lattanzio 2008 0.85 -- 3 Msun; Z = 0, & [Fe/H] = -6.5 -- -3.0
Functions
 
ejection_from_yield(mYield, mIni, mRem, xIni)
Convert net yield of an element to total ejected mass.
source code
 
yield_from_ejection(mEj, mIni, mRem, xIni)
Convert total ejected mass to net yield of an element.
source code
 
linear_coefficients(x, y) source code
 
print_linear_info(slope, intercept) source code
 
extrapolate_function(yield_function, metallicity, return_coeffs=False)
Linearly extrapolate yield data to high and low masses.
source code
 
test_plot_data_interp(data, nm=1000.0, nZ=1000.0, **args) source code
 
data_overlap(data_list) source code
 
test_plot_interp(data_list, Z_list, nm=1000.0, maxmass=None, ejections=False, title=None, logx=True, logy=True) source code
 
test_all() source code
Variables
  __package__ = 'enrichpy'
Function Details

ejection_from_yield(mYield, mIni, mRem, xIni)

source code 

Convert net yield of an element to total ejected mass.

mYield, mIni, and mRem should be in the same units (which will also be the units of the returned ejected mass.

xIni is the initial mass fraction of the element.

See GBM equation 11.

Gavilan M., Buell J.F., Molla M. Astron. Astrophys. 2005, 432, 861 (2005A&A...432..861G)

yield_from_ejection(mEj, mIni, mRem, xIni)

source code 

Convert total ejected mass to net yield of an element.

mEj, mIni, and mRem should be in the same units (which will also be the units of the returned yield.

xIni is the initial mass fraction of the element.

See GBM equation 11.

Gavilan M., Buell J.F., Molla M. Astron. Astrophys. 2005, 432, 861 (2005A&A...432..861G)

extrapolate_function(yield_function, metallicity, return_coeffs=False)

source code 

Linearly extrapolate yield data to high and low masses.

Returns two functions: the high mass extrapolation and the low mass extrapolation.