In [1]:
%matplotlib inline

import matplotlib
import numpy as np
import matplotlib.pyplot as plt

from matplotlib import rc
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
## for Palatino and other serif fonts use:
#rc('font',**{'family':'serif','serif':['Palatino']})
rc('text', usetex=True)

In [2]:
%pwd


Out[2]:
u'/Users/evanbiederstedt'

In [3]:
cd downloads


/Users/evanbiederstedt/Downloads

In [4]:
cd class_public-master


/Users/evanbiederstedt/Downloads/class_public-master

In [5]:
#run CPU.py -h

In [6]:
#run CPU.py output/explanatory200_cl.dat

In [7]:
#run output/explanatory200_cl.py

In [8]:
#run output/cl_test1.py

In [9]:
import classy

In [10]:
from classy import Class

In [11]:
import numpy as np
from classy import Class
from numpy.polynomial.legendre import legval
cosmo = Class()
cosmo.set({'output':'lCl, tCl','lensing':'no'})
cosmo.compute()
rcl = cosmo.raw_cl()
theta = np.linspace(0,np.pi,1000)
rCtheta = legval(np.cos(theta),(2.*rcl['ell']+1.)*rcl['tt']/(4.*np.pi))
deg = np.degrees(theta)
plt.plot(deg, rCtheta)


Out[11]:
[<matplotlib.lines.Line2D at 0x111a80b10>]

In [12]:
plt.plot(deg, rCtheta)
plt.ylim([-1e-10,5e-10])
plt.xlabel(r'degrees in $\theta$')
plt.ylabel(r"$\displaystyle C(\theta)^{TT}$")


Out[12]:
<matplotlib.text.Text at 0x111a8e990>

In [13]:
# Plot for Hogg, 
# From Fig. 2 in the Starkman, Huterer paper, 
# http://arxiv.org/pdf/1004.5602.pdf
plt.plot(deg, rCtheta)
plt.ylim([-0.5e-10,1e-10])
plt.xlabel(r'degrees in $\theta$')
plt.ylabel(r"$\displaystyle C(\theta)^{TT}$")
plt.grid()



In [14]:
# Plot log10 degrees
plt.plot(deg, rCtheta)
plt.xscale('log')
plt.ylim([-0.5e-10,1e-10])
plt.xlabel(r'degrees in $\theta$')
plt.ylabel(r"$\displaystyle C(\theta)^{TT}$")
plt.grid()



In [15]:
# Plot log10 degrees
plt.plot(deg, rCtheta)
plt.ylim([-1e-10,5e-10])
plt.xscale('log')
plt.xlabel(r'degrees in $\theta$')
plt.ylabel(r"$\displaystyle C(\theta)^{TT}$")
plt.grid()



In [ ]:


In [ ]: