| |
| |
|
|
| |
|
|
|
|
| |
| |
| import matplotlib |
| import matplotlib.pyplot as plt |
| import numpy as np |
| from classy import Class |
| from scipy.optimize import fsolve |
| from scipy.interpolate import interp1d |
| import math |
|
|
|
|
| |
|
|
|
|
| common_settings = {'output' : 'tCl', |
| |
| 'h':0.6781, |
| 'omega_b':0.02238280, |
| 'omega_cdm':0.1201075, |
| 'A_s':2.100549e-09, |
| 'n_s':0.9660499, |
| 'tau_reio':0.05430842, |
| 'thermodynamics_verbose':1 |
| } |
| |
| |
| |
| |
| |
| M = Class() |
| M.set(common_settings) |
| M.compute() |
| derived = M.get_current_derived_parameters(['tau_rec','conformal_age','conf_time_reio']) |
| thermo = M.get_thermodynamics() |
| print (thermo.keys()) |
|
|
|
|
| |
|
|
|
|
| tau = thermo['conf. time [Mpc]'] |
| g = thermo['g [Mpc^-1]'] |
| |
| g[:500] *= 100 |
| |
| |
| |
| |
| |
| |
| plt.xlim([1.e2,derived['conformal_age']]) |
| plt.xlabel(r'$\tau \,\,\, \mathrm{[Mpc]}$') |
| plt.ylabel(r'$\mathrm{visibility} \,\,\, g \,\,\, [\mathrm{Mpc}^{-1}]$') |
| plt.axvline(x=derived['tau_rec'],color='k') |
| plt.axvline(x=derived['conf_time_reio'],color='k') |
| |
| plt.semilogx(tau,g,'r',label=r'$\psi$') |
| plt.savefig('thermo.pdf',bbox_inches='tight') |
|
|
|
|