"if (any(Params%P > Scales%PMax) .or. any(Params%P < Scales%PMin))" in calclike.f90 becomes true sometimes

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
xian yong shen
Posts: 2
Joined: June 07 2012
Affiliation: shanghai nomorl university

\"if (any(Params%P > Scales%PMax) .or. any(Params%P

Post by xian yong shen » June 25 2012

Hi,

I add two new parameters, and the code has been modified, the condition "if (any(Params%P > Scales%PMax) .or. any(Params%P < Scales%PMin))" in calclike.f90 becomes true sometimes, but I checked parameters in params.ini and they are OK, like this:
param[a1]= -7 -8 -6 0.01 0.01
param= -3.3 -3.6 -3 0.01 0.01
(Note: the other paramters has been fixed)

so, I print out the details of Params%P, Scales%PMax, Scales%PMin by add code
" write (*,*) Params%P
write (*,*) Scales%PMax
write (*,*) Scales%PMin"
and one of results is like this:
Params%P
2.2299999E-02 0.1050000 70.00000 9.0000004E-02 0.0000000E+00
0.0000000E+00 -1.000000 -25.00000 -19.00000 -6.212852
-2.869388 0.9500000 0.0000000E+00 0.0000000E+00 3.000000
0.0000000E+00 1.000000
Scales%PMax
0.1000000 0.9900000 70.00000 0.8000000 0.0000000E+00
0.0000000E+00 -1.000000 -25.00000 -19.00000 -6.000000
-3.000000 1.500000 0.0000000E+00 0.0000000E+00 4.000000
0.0000000E+00 2.000000
Scales%PMin
4.9999999E-03 9.9999998E-03 70.00000 9.9999998E-03 0.0000000E+00
0.0000000E+00 -1.000000 -25.00000 -19.00000 -8.000000
-3.600000 0.5000000 0.0000000E+00 0.0000000E+00 2.700000
0.0000000E+00 0.0000000E+00

you will find the value of parameter b is -2.869388 which is above the Max -3.

by the way in the params.ini I used "propose_matrix = "


Could someone tell me what is the secret?

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

Re: \\\"if (any(Params%P > Scales%PMax) .or. any(Par

Post by Antony Lewis » June 25 2012

Seems OK, you expect points outside the prior to be proposed, but they should be rejected.

Post Reply