Salman Habib's project solution

Veamos el análisis de sensibilidad

Cambiando $\Omega_b$


In [8]:
df6 = pd.read_table("1.omb", skiprows=5,header = None, sep=" ")
df6.drop(df6.columns[[2]],axis=1, inplace=True)
df7 = pd.read_table("2.omb", skiprows=5,header = None, sep=" ")
df7.drop(df7.columns[[2]],axis=1, inplace=True)
df8 = pd.read_table("3.omb", skiprows=5,header = None, sep=" ")
df8.drop(df8.columns[[2]],axis=1, inplace=True)
df9 = pd.read_table("4.omb", skiprows=5,header = None, sep=" ")
df9.drop(df9.columns[[2]],axis=1, inplace=True)

df6.columns = ['a', 'b']
df7.columns = ['a', 'b']
df8.columns = ['a', 'b']
df9.columns = ['a', 'b']

plt.loglog(df6["a"],df6["b"],label=r'$\Omega_b*h^2 = 0.0215$')
plt.loglog(df7["a"],df7["b"],label=r'$\Omega_b*h^2 = 0.0200$')
plt.loglog(df8["a"],df8["b"],label=r'$\Omega_b*h^2 = 0.0220$')
plt.loglog(df9["a"],df9["b"],label=r'$\Omega_b*h^2 = 0.0230$')
plt.xlabel(r'$k$')
plt.ylabel(r'$P(k)$')
plt.legend()
plt.show()


Cambiando $\Omega_m$


In [16]:
df6 = pd.read_table("1.omm", skiprows=5,header = None, sep=" ")
df6.drop(df6.columns[[2]],axis=1, inplace=True)
df7 = pd.read_table("2.omm", skiprows=5,header = None, sep=" ")
df7.drop(df7.columns[[2]],axis=1, inplace=True)
df8 = pd.read_table("3.omm", skiprows=5,header = None, sep=" ")
df8.drop(df8.columns[[2]],axis=1, inplace=True)
df9 = pd.read_table("4.omm", skiprows=5,header = None, sep=" ")
df9.drop(df9.columns[[2]],axis=1, inplace=True)

df6.columns = ['a', 'b']
df7.columns = ['a', 'b']
df8.columns = ['a', 'b']
df9.columns = ['a', 'b']

plt.loglog(df6["a"],df6["b"],label=r'$\Omega_m*h^2 = 0.120$')
plt.loglog(df7["a"],df7["b"],label=r'$\Omega_m*h^2 = 0.130$')
plt.loglog(df8["a"],df8["b"],label=r'$\Omega_m*h^2 = 0.140$')
plt.loglog(df9["a"],df9["b"],label=r'$\Omega_m*h^2 = 0.150$')
plt.xlabel(r'$k$')
plt.ylabel(r'$P(k)$')
plt.legend()
plt.show()


Cambiando $n_s$


In [15]:
df6 = pd.read_table("1.ns", skiprows=5,header = None, sep=" ")
df6.drop(df6.columns[[2]],axis=1, inplace=True)
df7 = pd.read_table("2.ns", skiprows=5,header = None, sep=" ")
df7.drop(df7.columns[[2]],axis=1, inplace=True)
df8 = pd.read_table("3.ns", skiprows=5,header = None, sep=" ")
df8.drop(df8.columns[[2]],axis=1, inplace=True)
df9 = pd.read_table("4.ns", skiprows=5,header = None, sep=" ")
df9.drop(df9.columns[[2]],axis=1, inplace=True)

df6.columns = ['a', 'b']
df7.columns = ['a', 'b']
df8.columns = ['a', 'b']
df9.columns = ['a', 'b']

plt.loglog(df6["a"],df6["b"],label=r'$n_s = 0.85$')
plt.loglog(df7["a"],df7["b"],label=r'$n_s = 0.90$')
plt.loglog(df8["a"],df8["b"],label=r'$n_s = 0.95$')
plt.loglog(df9["a"],df9["b"],label=r'$n_s = 1.05$')
plt.xlabel(r'$k$')
plt.ylabel(r'$P(k)$')
plt.legend()
plt.show()