Cosmomc getting $r$, $n_s$ Plots of Planck Paper

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Akhilesh Nautiyal(akhi)
Posts: 72
Joined: June 13 2007
Affiliation: Malaviya National Institute of Technology Jaipur

Cosmomc getting $r$, $n_s$ Plots of Planck Paper

Post by Akhilesh Nautiyal(akhi) » March 26 2015

HI,

I am trying to get the [tex]r[/tex], [tex]n_s[/tex] plots of Planck paper 1502.02114 (Constraints on inflation) using the Python Scripts provided with the cosmomc Feb 2015 version.
I changed the script ns_r_inflation.py to get the plot with running (Fig.6 at page 12 of the paper) but I am getting different contours. and my upper limit for [tex]r[/tex] is going bit higher.
I am attaching the plot and the script with this e-mail.

Can any one help me in getting the correct plot.

Antony Lewis
Posts: 1943
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: Cosmomc getting $r$, $n_s$ Plots of Planck Paper

Post by Antony Lewis » March 26 2015

Without the script hard to tell, but also compare with Fig 22 of the parameter paper?

Akhilesh Nautiyal(akhi)
Posts: 72
Joined: June 13 2007
Affiliation: Malaviya National Institute of Technology Jaipur

Cosmomc getting $r$, $n_s$ Plots of Planck Paper

Post by Akhilesh Nautiyal(akhi) » March 26 2015

thanks Antony,
my plot is similar to the Fig22 of parameter paper. but I am unable to reproduce the Fig6 of Planck constraint on inflation paper. I am pasting the script here.

# Uses first-order slow-roll results, with naive N definition, as in inflation paper

Code: Select all

import planckStyle as s
from pylab import *
import numpy as np

for BKP in [False, True]:
    g = s.getSinglePlotter(ratio=1)

    if BKP:
        roots = ['base_nrun_r_' + s.defdata,
               'base_nrun_r_plikHM_TT_lowTEB_BKP',
               'base_nrun_r_plikHM_TT_lowTEB_BKP_lensing_post_BAO_H070p6_JLA'
                ]
        colors = [g.settings.solid_colors[1], g.settings.solid_colors[3], g.settings.solid_colors[0]]
    else:
        roots = [  g.getRoot('nnu_r', s.defdata + '_nnup39_lensing'),
               'base_r_' + s.defdata,
                g.getRoot('r', s.defdata + '_lensing_BAO_H070p6_JLA')]
        colors = None

    g.plot_2d(roots, ['ns', 'r02'], filled=True, colors=colors)


    if BKP:
        labels = [ s.defplanck , s.defplanck + '+BKP', '+lensing+ext']
    else:
        labels = [ s.lensing + r' ([tex]\Delta N_{\rm eff}=0.39[/tex])', s.LCDM + ' ' + s.defplanck, '+lensing+ext']

    leg = g.add_legend(labels, colored_text=True, align_right=True)
    if not BKP: leg.get_texts()[0].set_color('grey')

    xlim([0.93, 1])
    ylim([0, 0.35])

    gca().set_xticks([0.94, 0.96, 0.98,  1.0])
    gca().set_yticks([0, 0.15, 0.18, 0.26, 0.30])

    if BKP:
        g.export('ns_r_bicep_nrun')
    else:
        g.export()
the plot file is at ns_r_bicep_nrun.pdf

Antony Lewis
Posts: 1943
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: Cosmomc getting $r$, $n_s$ Plots of Planck Paper

Post by Antony Lewis » March 26 2015

It doesn't look as though you are using the same datasets?

Akhilesh Nautiyal(akhi)
Posts: 72
Joined: June 13 2007
Affiliation: Malaviya National Institute of Technology Jaipur

Cosmomc getting $r$, $n_s$ Plots of Planck Paper

Post by Akhilesh Nautiyal(akhi) » March 26 2015

Here basically I am using

base_nrun_r_plikHM_TT_lowTEB

So can you suggest me by which datasets it will come?? I have all the planck chains downloaded?

Antony Lewis
Posts: 1943
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: Cosmomc getting $r$, $n_s$ Plots of Planck Paper

Post by Antony Lewis » March 26 2015

OK, I guess the difference here is that you are plotting r_{0.002} but the inflation paper plot is r_{0.05}. Try plotting "r" rather than "r02"?
Last edited by Antony Lewis on March 27 2015, edited 1 time in total.

Akhilesh Nautiyal(akhi)
Posts: 72
Joined: June 13 2007
Affiliation: Malaviya National Institute of Technology Jaipur

Cosmomc getting $r$, $n_s$ Plots of Planck Paper

Post by Akhilesh Nautiyal(akhi) » March 27 2015

Done. Thanks a lot.

Post Reply