new variables: Stopping during running ./cosmomc params.ini

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
moslem zarei
Posts: 28
Joined: March 11 2008
Affiliation: Isfahan University of Technology
Contact:

new variables: Stopping during running ./cosmomc params.ini

Post by moslem zarei » June 16 2008

Dear Antony
In the previos post (new power spectrum new parameter) I asked a question that was how can I fit my formula by cosmomc.
I have made the folowing changes in cosmomc files:
at first I take the variable "ant" as "epsilon" and "SZ" as "sigma"
then I have modified the power_tilt.f90 :
***************************************************
!For the default implementation return power spectra based on spectral indices
real(dl) an(nnmax) !scalar spectral indices
real(dl) n_run(nnmax) !running of spectral index
real(dl) ant(nnmax) !tensor spectral indices
real(dl) rat(nnmax) !ratio of scalar to tensor initial power spectrum amplitudes
real(dl) k_0_scalar, k_0_tensor
real(dl) ScalarPowerAmp(nnmax)
real(dl) SZ
end Type InitialPowerParams
*************************************************

AP%nn = 1 !number of initial power spectra
AP%an = 1 !scalar spectral index
AP%n_run = 0.020 !running of scalar spectral index
AP%ant = 0.020 !tensor spectra index
AP%rat = 1
AP%k_0_scalar = 0.05
AP%k_0_tensor = 0.05
AP%ScalarPowerAmp = 1
AP%SZ =0.0001
end subroutine SetDefPowerParams
*****************************************************

lnrat = log(k/P%k_0_scalar)
ScalarPower=P%ScalarPowerAmp(in)*exp((P%an(in)-1)*lnrat)*(1.0+SZ*exp((-ant)*lnrat)*cos((2/SZ)*exp((ant)*lnrat))
! + P%n_run(in)/2*lnrat**2)*(1+)
[tex]$[/tex][tex]$[/tex][tex]$[/tex][tex]$[/tex][tex]$[/tex][tex]$[/tex][tex]$[/tex]$$
then I have modified the CAMB/params.ini
#Main cosmological parameters, neutrino masses are assumed degenerate
# If use_phyical set phyiscal densities in baryone, CDM and neutrinos + Omega_k
use_physical = T
ombh2 = 0.022
omch2 = 0.12
omnuh2 = 0
omk = 0
hubble = 70
ant = 0.020
SZ = 0.0001

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
then I have modified cosmomc files as:
1) CAMB_cls_simple.f90 :
subroutine CMBToCAMB(CMB,P)
use LambdaGeneral
type(CMBParams) CMB
type(CAMBParams) P
P = CAMBP
P%omegab = CMB%omb
P%omegan = CMB%omnu
P%omegac = CMB%omc
P%omegav = CMB%omv
P%H0 = CMB%H0
P%ant=CMB%ant
P%SZ=CMB%SZ
P%Reion%redshift= CMB%zre
****************************
2)params_CMB_f90 :
subroutine SetForH(Params,CMB,H0)
use settings
use cmbtypes
use CMB_Cls
implicit none
real Params(num_Params)

Type(CMBParams) CMB
real h2,H0
Type(CMBParams) CMB
real h2,H0

CMB%H0=H0
CMB%ombh2 = Params(1)
CMB%omdmh2 = Params(2)
CMB%zre = Params(4) !!Not actually used.. is tau in this parameterization
CMB%Omk = Params(5)
CMB%nufrac = Params(6)
CMB%w = Params(7)
CMB%ant=Params(9)
CMB%SZ=Params(13)
*******
subroutine CMBParamsToParams(CMB, Params)
use settings
use cmbtypes
implicit none
real Params(num_Params)
Type(CMBParams) CMB
real CMBToTheta
external CMBToTheta

Params(1) =CMB%ombh2
Params(2) =CMB%omdmh2

Params(3) = CMBToTheta(CMB)*100
Params(4) = CMB%reserved(1)
Params(5) =CMB%omk

Params(6) =CMB%nufrac
Params(7) =CMB%w
Params(9)=CMB%ant
Params(13)=CMB%SZ
*******************************************
3)cambtype.f90 :
Type CMBParams
real norm(1:num_norm)
!These are fast parameters controling amplitudes, calibrations, etc.
real InitPower(1:num_initpower)
!These are fast paramters for the initial power spectrum
!Now remaining (non-independent) parameters
real omb, omc, omv, omnu, omk, omdm
real ombh2, omch2, omnuh2, omdmh2
real zre, nufrac
real h, H0
real w
real reserved(5)
real ant
real SZ
end Type CMBParams
**********************************************
4)setting :

integer, parameter :: num_hard =7
integer, parameter :: num_initpower = 3
integer, parameter :: num_norm = 3
************************************************
5)cosmomc/params.ini :
#parameter start center, min, max, start width, st. dev. estimate
#ombh2
param1 = 0.0223 0.005 0.1 0.001 0.001
#omdmh2
param2 = 0.105 0.01 0.99 0.01 0.01
#theta
param3 = 1.04 0.5 10 0.002 0.002
#tau
param4 = 0.09 0.01 0.8 0.03 0.03

#omk
param5 = 0 0 0 0 0
#nufrac
param6 = 0 0 0 0 0
#w
param7 = -1 -1 -1 0 0

#n_s
param8 = 0.95 0.5 1.5 0.02 0.01
#n_t
param9 = 0.020 0.001 0.030 0.001 0.001
#n_run
param10 = 0 0 0 0 0

#log[10^10 A_s]
param11 = 3 2.7 4 0.01 0.01
#amp_ratio
param12 = 0 0 0 0 0
#SZ amplitude, as in WMAP analysis
param13 = 0.0001 0.00001 0.001 0.00001 0.00001
*************************************
Now after runing ./cosmomc params.ini
I get the following error with empty output files:
Random seeds: 10328, 21149 rand_inst: 0
Computing tensors: F
Doing CMB lensing: T
lmax = 2100
Number of C_ls = 3
Varying 8 parameters ( 0 fast)
reading: params_CMB.covmat
starting Monte-Carlo
reading WMAP5 data
Initializing WMAP likelihood, version v3
Stopping as have 10000 samples.
0 Slow proposals: 10001
finished
**********************************************
I will be so thankfull if you inform me about my mistakes.

Post Reply