Regression test suite: Test of plotting functions

Prepared by Christian Ritter


In [1]:
import sygma as s
import omega as o1
import sys

In [2]:
# Trigger interactive or non-interactive depending on command line argument
__RUNIPY__ = sys.argv[0]

if __RUNIPY__:
    %matplotlib inline
else:
    %pylab nbagg

SYGMA functions


In [3]:
s1=s.sygma(iniZ=0.0001)


SYGMA run in progress..
   SYGMA run completed - Run time: 0.49s

In [4]:
fig=0

plot_totmasses


In [6]:
s1.plot_totmasses(fig=fig,mass='gas', source='all')
s1.plot_totmasses(fig=fig,mass='gas', source='agb')
s1.plot_totmasses(fig=fig,mass='gas', source='massive')
s1.plot_totmasses(fig=fig,mass='gas', source='sn1a')
fig=fig+1


plot_mass


In [8]:
s1.plot_mass(fig=fig,specie='N')
s1.plot_mass(fig=fig,specie='N-14',color='b')
fig=fig+1


plot_mass_ratio


In [9]:
s1.plot_mass_ratio(fig=fig,xaxis='age',species_ratio='N-14/N-15')
fig=fig+1



In [10]:
s1.plot_mass_ratio(fig=fig,xaxis='[Fe/H]',species_ratio='N-14/N-15')
fig=fig+1



In [11]:
s1.plot_mass_ratio(fig=fig,xaxis='[Fe/H]',species_ratio='N/O')
fig=fig+1


plot_massfrac


In [12]:
s1.plot_massfrac(xaxis='age', yaxis='O-16')
fig=fig+1


plot_mass_range_contributions


In [13]:
s1.plot_mass_range_contributions(specie='C', prodfac=False)
fig=fig+1



In [14]:
s1.plot_mass_range_contributions(specie='C', prodfac=True)
fig=fig+1


plot_metallicity


In [15]:
s1.plot_metallicity(source='all')
fig=fig+1


/Users/benoitcote/Desktop/OMEGA_SYGMA_inheritance/sygma.py:538: RuntimeWarning: invalid value encountered in double_scalars
  Z_step=(sum(yields_evol[k]) - nonmetals)/sum(yields_evol[k])

plot_sn_distr


In [16]:
s1.plot_sn_distr(fig=5, rate=True, rate_only='sn1a')
s1.plot_sn_distr(fig=5, rate=True, rate_only='sn2')
fig=fig+1



In [17]:
s1.plot_star_formation_rate( source='all')
fig=fig+1


30 30

In [ ]: