%matplotlib nbagg
import matplotlib.pyplot as plt
import sys
import matplotlib
import numpy as np
from NuPyCEE import sygma as s
from NuPyCEE import omega as o
from NuPyCEE import stellab
from NuPyCEE import read_yields as ry

table='yield_tables/agb_and_massive_stars_nugrid_MESAonly_fryer12delay.txt'

"""
Explanation: Example on How to Use Net Yields
Prepared by Christian Ritter
End of explanation
"""


# Initial metallicity 0
#includes pop3_table='yield_tables/popIII_heger10.txt',
iniZ = 0.0

# Original yields
o_NG = o.omega(galaxy='milky_way', table=table, \
         special_timesteps=60, exp_ml=1.0, mass_frac_SSP=0.35, nb_1a_per_m=1.5e-3, DM_evolution=True, sfe=0.04,\
           t_sf_z_dep=0.3, mass_loading=1.02, iniZ=iniZ)

"""
Explanation: Default setup - total yields
End of explanation
"""


# Initial metallicity 0
#includes pop3_table='yield_tables/popIII_heger10.txt',
iniZ = 0.0

#turn on net yield capability
yield_interp='wiersma'

#yield input not net yields
netyields_on=False

#should not matter
wiersmamod=False

Z_trans=-1

# Original yields
o_NG_net = o.omega(galaxy='milky_way', table=table, \
         special_timesteps=60, exp_ml=1.0, mass_frac_SSP=0.35, nb_1a_per_m=1.5e-3, DM_evolution=True, sfe=0.04,\
           t_sf_z_dep=0.3, mass_loading=1.02, iniZ=iniZ,yield_interp=yield_interp,netyields_on=netyields_on,\
             Z_trans=0.0)

"""
Explanation: Setup with total yields as input but net yields are calculated in the code and then applied
End of explanation
"""


