<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Section 2.1
Step1:  Simulation of the Milky Way
Step2:  Comparison of chemical evolution prediction with observation
Step3:  Tracing back to simple stellar populations.
Step4:  What is [C/Fe] for two SSPs at Z=0.006 and Z=0.0001?
Step5:  Now lets focus on C. What is the evolution of the total mass of C?
Step6:  Which stars contribute the most to C?
Step7:  Which stellar yields are the most?
<ASSISTANT_TASK:>
Python Code:
import matplotlib.pyplot as plt
import sygma
import omega
import stellab
#loading the observational data module STELLAB
stellab = stellab.stellab()
Explanation: Section 2.1: Tracing the origin of C
Result: Identification of which star is responsible for the origin of C
End of explanation
# OMEGA parameters for MW
mass_loading = 1     # How much mass is ejected from the galaxy per stellar mass formed
nb_1a_per_m = 3.0e-3  # Number of SNe Ia per stellar mass formed
sfe = 0.005           # Star formation efficiency, which sets the mass of gas
table = 'yield_tables/isotope_yield_table_MESA_only_ye.txt' # Yields for AGB and massive stars
#milky_way
o_mw = omega.omega(galaxy='milky_way',Z_trans=-1, table=table,sfe=sfe, DM_evolution=True,\
                  mass_loading=mass_loading, nb_1a_per_m=nb_1a_per_m, special_timesteps=60)
Explanation: Simulation of the Milky Way
End of explanation
# Choose abundance ratios
%matplotlib nbagg
xaxis = '[Fe/H]'
yaxis = '[C/Fe]'
# Plot observational data points (Stellab)
stellab.plot_spectro(xaxis=xaxis, yaxis=yaxis,norm='Grevesse_Noels_1993',galaxy='milky_way',show_err=False)
# Extract the numerical predictions (OMEGA)
xy_f = o_mw.plot_spectro(fig=3,xaxis=xaxis,yaxis=yaxis,return_x_y=True)
# Overplot the numerical predictions (they are normalized according to Grevesse & Noels 1993)
plt.plot(xy_f[0],xy_f[1],linewidth=4,color='w')
plt.plot(xy_f[0],xy_f[1],linewidth=2,color='k',label='OMEGA')
# Update the existing legend
plt.legend(loc='center left', bbox_to_anchor=(1.01, 0.5), markerscale=0.8, fontsize=13)
# Choose X and Y limits
plt.xlim(-4.5,0.5)
plt.ylim(-1.4,1.6)
Explanation: Comparison of chemical evolution prediction with observation
End of explanation
s0p0001=sygma.sygma(iniZ=0.0001)
s0p006=sygma.sygma(iniZ=0.006)
Explanation: Tracing back to simple stellar populations.
End of explanation
elem='[C/Fe]'
s0p0001.plot_spectro(fig=3,yaxis=elem,marker='D',color='b',label='Z=0.0001')
s0p006.plot_spectro(fig=3,yaxis=elem,label='Z=0.006')
Explanation: What is [C/Fe] for two SSPs at Z=0.006 and Z=0.0001?
End of explanation
# Plot the ejected mass of a certain element
elem='C'
s0p0001.plot_mass(fig=4,specie=elem,marker='D',color='b',label='Z=0.0001')
s0p006.plot_mass(fig=4,specie=elem,label='Z=0.006')
Explanation: Now lets focus on C. What is the evolution of the total mass of C?
End of explanation
elem='C'
s0p0001.plot_mass_range_contributions(specie=elem,marker='D',color='b',label='Z=0.0001')
s0p006.plot_mass_range_contributions(specie=elem,label='Z=0.006')
Explanation: Which stars contribute the most to C?
End of explanation
s0p0001.plot_table_yield(fig=6,iniZ=0.0001,table='yield_tables/isotope_yield_table.txt',yaxis='C-12',
                         masses=[1.0, 1.65, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0],marker='D',color='b',)
s0p006.plot_table_yield(fig=6,iniZ=0.006,table='yield_tables/isotope_yield_table.txt',yaxis='C-12',
                         masses=[1.0, 1.65, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0])
Explanation: Which stellar yields are the most?
End of explanation
<END_TASK>