Cobaya: my code doesn't converge

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Zhu-Yao Wang
Posts: 14
Joined: September 16 2020
Affiliation: Northeastern University

Cobaya: my code doesn't converge

Post by Zhu-Yao Wang » September 17 2020

Hi all,
I met a problem when trying to reproduce paper 1804.07154v1 's plot. So I'm using the parameters provided in the paper. And in the paper it mentioned:
"For analyzing these models, we use Planck CMB observations for temperature anisotropy power
spectrum over the multipole range l ∼ 2−2500 and Planck CMB polarization data for low only.We refer to these data sets combined as Planck data.We also use the baryon acoustic oscillations(BAO) data from 6dF Galaxy Survey, BOSS DR11 and SDSS DR7 Main Galaxy Sample."
So I generated .yaml file looking like:

Code: Select all

packages_path: '/home/zywang'  
theory:                                                                                                                                                                                       
  camb:   
   extra_args:                                                                                                                                                                                    
   halofit_version: mead                                                                                                                                                                      
   bbn_predictor: PArthENoPE_880.2_standard.dat                                                                                                                                             
   lens_potential_accuracy: 1                                                                                                                                                                   
   num_massive_neutrinos: 1                                                                                                                                                                    
   nnu: 3.046                                                                                                                                                                                   
   theta_H0_range:                                                                                                                                                                             
    - 20                                                                                                                                                                                        
    - 100                                                                                                                                                                                  
    likelihood:                                                                                                                                                                                    
    bao.sixdf_2011_bao: null                                                                                                                                                                     
    bao.sdss_dr7_mgs: null                                                                                                                                                                       
    bao.sdss_dr12_consensus_bao: null                                                                                                                                                            
    planck_2018_lowl.TT: null                                                                                                                                                                    
    planck_2018_lowl.EE: null                                                                                                                                                                 
    #planck_2018_highl_plik.TTTEEE: null                                                                                                                                                         
    #planck_2018_lensing.clik: null                                                                                                                                                            
    params:                                                                                                                                                                                        
    logA:                                                                                                                                                                                          
    prior:                                                                                                                                                                                         
    min: 2                                                                                                                                                                                       
    max: 4                                                                                                                                                                                     
    ref:                                                                                                                                                                                           
    dist: norm                                                                                                                                                                                   
    loc: 3.05                                                                                                                                                                                   
    scale: 0.001                                                                                                                                                                               
    proposal: 0.001                                                                                                                                                                              
    latex: \log(10^{10} A_\mathrm{s})                                                                                                                                                            
    drop: true                                                                                                                                                                                 
    As:                                                                                                                                                                                            
    value: 'lambda logA: 1e-10*np.exp(logA)'                                                                                                                                                     
    latex: A_\mathrm{s}                                                                                                                                                                       
    ns:                                                                                                                                                                                            
    prior:                                                                                                                                                                                         
    min: 0.8                                                                                                                                                                                     
    max: 1.2                                                                                                                                                                                   
    ref:                                                                                                                                                                                           
    dist: norm                                                                                                                                                                                   
    loc: 0.965                                                                                                                                                                                  
    scale: 0.004                                                                                                                                                                               
    proposal: 0.002                                                                                                                                                                              
    latex: n_\mathrm{s}                                                                                                                                                                        theta_MC_100:                                                                                                                                                                                  
    prior:                                                                                                                                                                                         
    min: 0.5                                                                                                                                                                                     
    max: 10                                                                                                                                                                                    
    ref:                                                                                                                                                                                           
    dist: norm
        ref:
      dist: norm
      loc: 1.04109
      scale: 0.0004
    proposal: 0.0002
    latex: 100\theta_\mathrm{MC}
    drop: true
    renames: theta
  cosmomc_theta:
    value: 'lambda theta_MC_100: 1.e-2*theta_MC_100'
    derived: false
  H0:
    latex: H_0
    min: 20
    max: 100
  ombh2:
    prior:
      min: 0.005
      max: 0.1
    ref:
      dist: norm
      loc: 0.0224
      scale: 0.0001
    proposal: 0.0001
    latex: \Omega_\mathrm{b} h^2
  omch2:
    prior:
      min: 0.001
      max: 0.99
    ref:
      dist: norm
      loc: 0.12
      scale: 0.001
    proposal: 0.0005
    latex: \Omega_\mathrm{c} h^2
  omegam:
    latex: \Omega_\mathrm{m} 
   mnu: 0.06 
     tau:
    prior:
      min: 0.01
      max: 0.8
    ref:
      dist: norm
      loc: 0.055
      scale: 0.006
    proposal: 0.003
    latex: \tau_\mathrm{reio}
  zre:
    latex: z_\mathrm{re}
  sigma8:
    latex: \sigma_8
   A:
    derived: 'lambda As: 1e9*As'
    latex: 10^9 A_\mathrm{s}
 sampler:
  mcmc:
    covmat: auto
    drag: true
    Rminus1_stop: 0.01
    oversample_power: 0.4
    proposal_scale: 1.9
    
    
        
I commented out the high l and lensing sentences to make my code consistent with the paper. But once I do that the sampling never meet the convergence requirement anymore. Is there any way to fix this problem? Thank you so much!

Zhu-Yao Wang
Posts: 14
Joined: September 16 2020
Affiliation: Northeastern University

Re: Cobaya: my code doesn't converge

Post by Zhu-Yao Wang » September 18 2020

Here is an update:
I changed "#planck_2018_highl_plik.TTTEEE: null" to "planck_2018_highl_plik.TT: null" to include high l TT spectrums and now it converges.
But a new problem raised up is the inconsistency with the result in the paper.
The way they set prior is explained in the paper. But the "ref" part is not clarified. Will it make a great difference choosing different loc, scale and proposal in the code?


Thanks!

Zhu-Yao Wang
Posts: 14
Joined: September 16 2020
Affiliation: Northeastern University

Re: Cobaya: my code doesn't converge

Post by Zhu-Yao Wang » September 18 2020

Hey guys,
I think I've figured out the reason why there's a difference between my result and that in paper. That is due to the likelihood difference between Planck2015 and Planck2018. They changed the likelihood and caused [math] difference on [math] which causes the shift of parameters, therefore cause an influence on [math].
I post the reason here in case someone meet the same problem and it might be a reason.

Post Reply