cosmomc: adding an extra parameter
cosmomc: adding an extra parameter
Hi!
I am trying to change cosmomc adding an extra, new parameter.
I have changed settings.f90 (changing num_hard) as well as params_CMB.f90.
The problem is that the new parameter does not show up in the final
.txt file because I am not sure what file should I change for that...I guess
something in the Getdist.f90 file??
Any ideas?
Thanks a lot in advance&sorry for the naive question!
I am trying to change cosmomc adding an extra, new parameter.
I have changed settings.f90 (changing num_hard) as well as params_CMB.f90.
The problem is that the new parameter does not show up in the final
.txt file because I am not sure what file should I change for that...I guess
something in the Getdist.f90 file??
Any ideas?
Thanks a lot in advance&sorry for the naive question!
-
- Posts: 18
- Joined: August 08 2006
- Affiliation: IPMU, U. of Tokyo
cosmomc: adding an extra parameter
Olga --
It's easiest to simply reassign an already present parameter in params.ini. Is this what you are doing?
Brian
It's easiest to simply reassign an already present parameter in params.ini. Is this what you are doing?
Brian
Re: cosmomc: adding an extra parameter
Hi Brian!
Thanks a lot! Is what at the end I decided to do...
now it works perfectly!
Thanks a lot again!
Olga
Thanks a lot! Is what at the end I decided to do...
now it works perfectly!
Thanks a lot again!
Olga
-
- Posts: 72
- Joined: June 13 2007
- Affiliation: Malaviya National Institute of Technology Jaipur
cosmomc: adding an extra parameter
HI Olga,
Would you please let me know, what did you do to add the new parameter.
I tried all the way but couldn't get.
I request you to tell me the full procedure.
Regards,
Akhilesh
Would you please let me know, what did you do to add the new parameter.
I tried all the way but couldn't get.
I request you to tell me the full procedure.
Regards,
Akhilesh
Re: cosmomc: adding an extra parameter
Hi Akhilesh!
Sure!
Just pick up one of the parameters in the params.ini file that you might not want to use. In my case I chose w by fixing it to -1 in CMB_Cls_simple.f90,
setting the logical variable "w_is_w" to true.
You must first define the new parameter in "Type CMBParams" of cmbtypes.f90
Then you should change CAMB properly, including the new parameter wherever required. You should change as well the subroutine CMBtoCAMB in CMB_Cls_simple.f90, adding the new parameter there
newparam=CMB%newparam
and, in case you decide to fix w to -1 you can change:
if (w_is_w) then
w_lam = -1
You should change as well the subroutine SetForH(Params,CMB,H0) and the subroutine CMBParamsToParams in params_CMB.f90.
I think that's all I did...there might be easier and faster ways, but this works!
Cheers!
Olga
Sure!
Just pick up one of the parameters in the params.ini file that you might not want to use. In my case I chose w by fixing it to -1 in CMB_Cls_simple.f90,
setting the logical variable "w_is_w" to true.
You must first define the new parameter in "Type CMBParams" of cmbtypes.f90
Then you should change CAMB properly, including the new parameter wherever required. You should change as well the subroutine CMBtoCAMB in CMB_Cls_simple.f90, adding the new parameter there
newparam=CMB%newparam
and, in case you decide to fix w to -1 you can change:
if (w_is_w) then
w_lam = -1
You should change as well the subroutine SetForH(Params,CMB,H0) and the subroutine CMBParamsToParams in params_CMB.f90.
I think that's all I did...there might be easier and faster ways, but this works!
Cheers!
Olga
-
- Posts: 28
- Joined: March 11 2008
- Affiliation: Isfahan University of Technology
- Contact:
cosmomc: adding an extra parameter
Dear Olga
I have a new parameter and I have changed files as you told. But after make all in the source subdirectry I give the following error:
ifort -DMATRIX_SINGLE -O2 -ip -W0 -WB -fpp -vec_report0 -I/home/zareie/Desktop/cfitsio/include -I/home/zareie/Desktop/likelihood_v3 -I../camb -c params_CMB.f90
fortcom: Error: params_CMB.f90, line 96: This is not a field name that is defined in the encompassing structure. [SIGGMA]
P%InitPower%siggma(in) = CMB%InitPower%sigmma
-------------------^
fortcom: Error: params_CMB.f90, line 96: This is not a field name that is defined in the encompassing structure. [SIGMMA]
P%InitPower%siggma(in) = CMB%InitPower%sigmma
----------------------------------------------^
compilation aborted for params_CMB.f90 (code 1)
make: *** [params_CMB.o] Error 1
sigmma is my new parameter.
could you please tell me more about this error.
Bests
I have a new parameter and I have changed files as you told. But after make all in the source subdirectry I give the following error:
ifort -DMATRIX_SINGLE -O2 -ip -W0 -WB -fpp -vec_report0 -I/home/zareie/Desktop/cfitsio/include -I/home/zareie/Desktop/likelihood_v3 -I../camb -c params_CMB.f90
fortcom: Error: params_CMB.f90, line 96: This is not a field name that is defined in the encompassing structure. [SIGGMA]
P%InitPower%siggma(in) = CMB%InitPower%sigmma
-------------------^
fortcom: Error: params_CMB.f90, line 96: This is not a field name that is defined in the encompassing structure. [SIGMMA]
P%InitPower%siggma(in) = CMB%InitPower%sigmma
----------------------------------------------^
compilation aborted for params_CMB.f90 (code 1)
make: *** [params_CMB.o] Error 1
sigmma is my new parameter.
could you please tell me more about this error.
Bests
-
- Posts: 50
- Joined: March 26 2006
- Affiliation: DESY
- Contact:
cosmomc: adding an extra parameter
Hi Moslem,
Check the spelling of the siggma vs. sigmma vs. sigma.
Pascal
Check the spelling of the siggma vs. sigmma vs. sigma.
Pascal
-
- Posts: 28
- Joined: March 11 2008
- Affiliation: Isfahan University of Technology
- Contact:
cosmomc: adding an extra parameter
Hi
Thanks for your reply
I corrected the "sigmma" and now the error disappeared but when I run
./cosmomc params.ini
in the chain, the outpot file "test.log" is empty also I can not see the computed likelihood on the terminal.
I would be thankfull if you help me about this.
Thanks for your reply
I corrected the "sigmma" and now the error disappeared but when I run
./cosmomc params.ini
in the chain, the outpot file "test.log" is empty also I can not see the computed likelihood on the terminal.
I would be thankfull if you help me about this.
-
- Posts: 72
- Joined: June 13 2007
- Affiliation: Malaviya National Institute of Technology Jaipur
cosmomc: adding an extra parameter
Hi Olga,
Thanks a lot for your help. I successful added a parameter in power spectrum by reinterpreting w.
Regards,
Akhilesh
Thanks a lot for your help. I successful added a parameter in power spectrum by reinterpreting w.
Regards,
Akhilesh
-
- Posts: 11
- Joined: May 29 2009
- Affiliation: university of geneva
cosmomc: adding an extra parameter
Hi all,
I saw the discussion about "how to add a new parameter in Cosmomc", and this is exactly what I need to do now. But I do not properly undersand what is meant by reinterpreting w as my new parameter. It would be very nice if someone could answer these questions :
Let's call my new parameter S.
1. define the new parameter in "Type CMBParams" of cmbtypes.f90, does it mean I have to add "real S" to the other parameters ?
2. Which are the files I need to change in CAMB ?
3. For changing the subroutine SetForH(Params,CMB,H0) and the subroutine CMBParamsToParams in params_CMB.f90, do I have to replace w by S or add a similar line with S instead of w.
Thank you for being very explicit in the answers, I am not used to fortran...
Thanks,
marc
I saw the discussion about "how to add a new parameter in Cosmomc", and this is exactly what I need to do now. But I do not properly undersand what is meant by reinterpreting w as my new parameter. It would be very nice if someone could answer these questions :
Let's call my new parameter S.
1. define the new parameter in "Type CMBParams" of cmbtypes.f90, does it mean I have to add "real S" to the other parameters ?
2. Which are the files I need to change in CAMB ?
3. For changing the subroutine SetForH(Params,CMB,H0) and the subroutine CMBParamsToParams in params_CMB.f90, do I have to replace w by S or add a similar line with S instead of w.
Thank you for being very explicit in the answers, I am not used to fortran...
Thanks,
marc
-
- Posts: 16
- Joined: July 07 2014
- Affiliation: Raman Research Institute
cosmomc: adding an extra parameter
Can't find CMBParamsToParams in the new version of CosmoMC. Has it been renamed or put somewhere else?
-
- Posts: 1945
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: cosmomc: adding an extra parameter
Yes, see CosmologyParameterizations.f90 for the new equivalent.
-
- Posts: 16
- Joined: July 07 2014
- Affiliation: Raman Research Institute
cosmomc: adding an extra parameter
Hi Antony,
Thanks for the suggestion. I am currently using the October 2013 version of camb and cosmomc. In the params_CMB.f90 file there is a subroutine named "SetForH "which contains 15 slow parameters and the range of those parameters are given in params_CMB_defaults.ini file.
The .f90 file also contains a subroutine called "BK_ParamArrayToTheoryParams" where there are 7 background parameters. Where are the ranges of these 7 parameters defined?
Thanks for the suggestion. I am currently using the October 2013 version of camb and cosmomc. In the params_CMB.f90 file there is a subroutine named "SetForH "which contains 15 slow parameters and the range of those parameters are given in params_CMB_defaults.ini file.
The .f90 file also contains a subroutine called "BK_ParamArrayToTheoryParams" where there are 7 background parameters. Where are the ranges of these 7 parameters defined?
-
- Posts: 1945
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: cosmomc: adding an extra parameter
I haven't used the background-only parameterization for while, so don't think an example .ini file is supplied. Just define the ranges for the parameters as you wish in a new .ini file (as in params_CMB_defaults.ini).
-
- Posts: 14
- Joined: May 29 2015
- Affiliation: BITS-Pilani, India
cosmomc: adding an extra parameter
Hi Antony,
I have modified CAMB by including a new parameter say myparam1 in the July 2015 version where it is doing fine. How can I make COSMOMC to read this new parameter correctly? Please write the file names and the changes to be made for the inclusion of the new parameter. I think this information should be included in the read me of COSMOMC. It would be of great help to the new users of COSMOMC.
Thanks.
I have modified CAMB by including a new parameter say myparam1 in the July 2015 version where it is doing fine. How can I make COSMOMC to read this new parameter correctly? Please write the file names and the changes to be made for the inclusion of the new parameter. I think this information should be included in the read me of COSMOMC. It would be of great help to the new users of COSMOMC.
Thanks.