Asking CosmoMC to print theta_s rather than H_0

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Sunny Vagnozzi
Posts: 55
Joined: August 15 2016
Affiliation: Kavli Institute for Cosmology (KICC), University of Cambridge

Asking CosmoMC to print theta_s rather than H_0

Post by Sunny Vagnozzi » March 16 2021

Hi Antony and all,

I'm debugging a likelihood I wrote, and am basically asking CosmoMC to print out 1) a bunch of likelihood-specific quantities, and 2) the cosmological parameters it is sampling at each step of the MCMC. 1) is fine, but for 2) I have basically been able to get CosmoMC to print all cosmological parameters except for theta_s.

I copy below what I do for the other parameters:

Code: Select all

write(*,*) 'Omegabh2=', CMB%ombh2
write(*,*) 'Omegach2=', CMB%omch2
write(*,*) 'tau=', CMB%tau
write(*,*) 'As=', 23.02585092+log(cl_norm*CMB%InitPower(As_index))
write(*,*) 'ns=', CMB%InitPower(ns_index)
I tried something similar for theta_s, but for all I tried I couldn't get CosmoMC to print it. Of course I can easily get CosmoMC to print H_0 simply by:

Code: Select all

write(*,*) 'H0=', CMB%H0
and with all other parameters fixed there is a 1-to-1 map between H_0 and theta_s, but it would be nice if there were a way to print theta_s directly.

On a different note, is there a "cleaner" way of printing A_s than what I am currently doing above, i.e.:

Code: Select all

write(*,*) 'As=', 23.02585092+log(cl_norm*CMB%InitPower(As_index))
Thanks in advance for your help! Cheers,
Sunny

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

Re: Asking CosmoMC to print theta_s rather than H_0

Post by Antony Lewis » March 17 2021

You'd have to get it from the parameterization or sampled parameters array elsewhere. As looks fine.

Post Reply