CosmoCoffee Forum Index CosmoCoffee

 
 FAQFAQ   SearchSearch  MemberlistSmartFeed   MemberlistMemberlist    RegisterRegister 
   ProfileProfile   Log inLog in 
Arxiv New Filter | Bookmarks & clubs | Arxiv ref/author:

cosmomc: adding an extra parameter
Goto page 1, 2  Next  
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software
View previous topic :: View next topic  
Author Message
Olga Mena



Joined: 03 Apr 2008
Posts: 9
Affiliation: IEEC Bellaterra Spain

PostPosted: May 31 2008  Reply with quote

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!
Back to top
View user's profile  
Brian Powell



Joined: 08 Aug 2006
Posts: 18
Affiliation: IPMU, U. of Tokyo

PostPosted: June 06 2008  Reply with quote

Olga –

It's easiest to simply reassign an already present parameter in params.ini. Is this what you are doing?

Brian
Back to top
View user's profile [ Hidden ]
Olga Mena



Joined: 03 Apr 2008
Posts: 9
Affiliation: IEEC Bellaterra Spain

PostPosted: June 06 2008  Reply with quote

Hi Brian!

Thanks a lot! Is what at the end I decided to do...
now it works perfectly!

Thanks a lot again!

Olga
Back to top
View user's profile  
Akhilesh Nautiyal(akhi)



Joined: 13 Jun 2007
Posts: 58
Affiliation: Malaviya National Institute of Technology Jaipur

PostPosted: June 18 2008  Reply with quote

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
Back to top
View user's profile [ Hidden ]
Olga Mena



Joined: 03 Apr 2008
Posts: 9
Affiliation: IEEC Bellaterra Spain

PostPosted: June 18 2008  Reply with quote

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
Back to top
View user's profile  
moslem zarei



Joined: 11 Mar 2008
Posts: 29
Affiliation: Isfahan University of Technology

PostPosted: June 20 2008  Reply with quote

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
Back to top
View user's profile   Visit poster's website
Pascal Vaudrevange



Joined: 26 Mar 2006
Posts: 50
Affiliation: DESY

PostPosted: June 20 2008  Reply with quote

Hi Moslem,

Check the spelling of the siggma vs. sigmma vs. sigma.

Pascal
Back to top
View user's profile [ Hidden ] Visit poster's website
moslem zarei



Joined: 11 Mar 2008
Posts: 29
Affiliation: Isfahan University of Technology

PostPosted: June 21 2008  Reply with quote

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.
Back to top
View user's profile   Visit poster's website
Akhilesh Nautiyal(akhi)



Joined: 13 Jun 2007
Posts: 58
Affiliation: Malaviya National Institute of Technology Jaipur

PostPosted: June 23 2008  Reply with quote

Hi Olga,
Thanks a lot for your help. I successful added a parameter in power spectrum by reinterpreting w.

Regards,
Akhilesh
Back to top
View user's profile [ Hidden ]
marc vonlanthen



Joined: 29 May 2009
Posts: 11
Affiliation: university of geneva

PostPosted: June 08 2009  Reply with quote

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
Back to top
View user's profile [ Hidden ]
Abir Sarkar



Joined: 07 Jul 2014
Posts: 16
Affiliation: Raman Research Institute

PostPosted: February 19 2016  Reply with quote

Can't find CMBParamsToParams in the new version of CosmoMC. Has it been renamed or put somewhere else?
Back to top
View user's profile [ Hidden ]
Antony Lewis



Joined: 23 Sep 2004
Posts: 1250
Affiliation: University of Sussex

PostPosted: February 19 2016  Reply with quote

Yes, see CosmologyParameterizations.f90 for the new equivalent.
Back to top
View user's profile [ Hidden ] Visit poster's website
Abir Sarkar



Joined: 07 Jul 2014
Posts: 16
Affiliation: Raman Research Institute

PostPosted: March 04 2016  Reply with quote

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?
Back to top
View user's profile [ Hidden ]
Antony Lewis



Joined: 23 Sep 2004
Posts: 1250
Affiliation: University of Sussex

PostPosted: March 04 2016  Reply with quote

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).
Back to top
View user's profile [ Hidden ] Visit poster's website
Suresh Kumar India



Joined: 29 May 2015
Posts: 14
Affiliation: BITS-Pilani, India

PostPosted: August 18 2016  Reply with quote

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.
Back to top
View user's profile  
Display posts from previous:   
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software All times are GMT + 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group. Sponsored by WordWeb online dictionary and dictionary software.