Hi everybody,
I want to add a new input parameter when running CAMB from the python wrapper.
What I did was to add it in the SourceWindow class in sources.py: the code compiles and import the new parameter inside the python libraries.
Now I need to pass it to the SourceWindow.f90 library as well: I initialize Type, extends(TPythonInterfacedClass) :: TSourceWindow , but the parameter in fortran is set = 0. It seems to me that the python wrapper is not updating the input value of this new parameter.
Note: I am working by defining this parameter in complete analogy to the dlog10Ndm parameter.
Do you have any suggestions?
Thank you in advance for your help!
Sarah
Add new input par to CAMB
-
- Posts: 4
- Joined: April 19 2021
- Affiliation: Università degli studi di Padova
-
- Posts: 1943
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Add new input par to CAMB
If you just want to add another parameter to TSourceWindow, just add it in the fortran and python in equivalent places, making sure you keep the parameter ordering consistent (add your new parameter at the bottom of the list). And make sure you rebuild after any fortran changes.
-
- Posts: 4
- Joined: April 19 2021
- Affiliation: Università degli studi di Padova
Re: Add new input par to CAMB
Hi Antony,
Thank you for your quick reply.
Indeed, it was a simple mistake in the ordering of the parameters in the fortran initialisation respect to the python one.
Thanks again!
Sarah
Thank you for your quick reply.
Indeed, it was a simple mistake in the ordering of the parameters in the fortran initialisation respect to the python one.
Thanks again!
Sarah