### Asking CosmoMC to print theta_s rather than H_0

Posted:

**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:
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:
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.:
Thanks in advance for your help! Cheers,

Sunny

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)
```

Code: Select all

```
write(*,*) 'H0=', CMB%H0
```

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))
```

Sunny