CAMB: Choosing resolution in z and k for ISW integral
-
- Posts: 6
- Joined: October 28 2021
- Affiliation: University of Waterloo
CAMB: Choosing resolution in z and k for ISW integral
I am working with CAMB as implemented in CosmoMC, specifically in the Modified Gravity extension ISiTGR. I have been investigating an issue regarding the CMB temperature-temperature correlation spectrum (the TT Cls) when varying a specific modified gravity parameter, and have narrowed it down to most likely having something to do with the "resolution" of points in redshift z and scale k when integrating to obtain [math] for the Integrated Saches-Wolfe effect.
In camb/fortran/equations.f90, the ISW component of the CMB OutputSources is essentially just the time-derivative of the Weyl potential, which is later integrated as a function of redshift (and indirectly as a function of scale k). I cannot figure out how the points in z and k at which the ISW integrand is computed are chosen, whether there is an algorithm somewhere in CAMB that decides how they are chosen, and if there is some parameter somewhere that controls this (eg. a parameter that determines the spacing in z or k, or how much interpolation occurs, or the regions where a higher density of points is required). Additionally, tracing through the CAMB code, I am having trouble finding where the ISW integrand (the time-derivative of the Weyl potential) is integrated to give [math], and the subsequent calculation for transforming this into a correlation coefficient Cl.
Any help would be greatly appreciated, and would aid in resolving this issue!
In camb/fortran/equations.f90, the ISW component of the CMB OutputSources is essentially just the time-derivative of the Weyl potential, which is later integrated as a function of redshift (and indirectly as a function of scale k). I cannot figure out how the points in z and k at which the ISW integrand is computed are chosen, whether there is an algorithm somewhere in CAMB that decides how they are chosen, and if there is some parameter somewhere that controls this (eg. a parameter that determines the spacing in z or k, or how much interpolation occurs, or the regions where a higher density of points is required). Additionally, tracing through the CAMB code, I am having trouble finding where the ISW integrand (the time-derivative of the Weyl potential) is integrated to give [math], and the subsequent calculation for transforming this into a correlation coefficient Cl.
Any help would be greatly appreciated, and would aid in resolving this issue!
-
- Posts: 1765
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: CAMB: Choosing resolution in z and k for ISW integral
You can adjust the accuracy parameters for various samplings:
https://camb.readthedocs.io/en/latest/model.html#camb.model.CAMBparams.set_custom_scalar_sources
https://camb.readthedocs.io/en/latest/model.html#camb.model.CAMBparams.set_custom_scalar_sources
-
- Posts: 6
- Joined: October 28 2021
- Affiliation: University of Waterloo
Re: CAMB: Choosing resolution in z and k for ISW integral
This appears to only be relevant for the python implementation of CAMB. Since I am running CAMB - to produce the theory Cls - through CosmoMC, so that I can use my results (from MCMC runs) with the Planck likelihoods (and their extra nuisance parameters) to get more accurate Cls, are their corresponding accuracy parameters in the Fortran implementation?
-
- Posts: 1765
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: CAMB: Choosing resolution in z and k for ISW integral
Sorry, I posted the wrong link
https://camb.readthedocs.io/en/latest/model.html?highlight=lsampleboost#camb.model.AccuracyParams
The structure is available in Fortran and CAMB. (though you might want to look at using Cobaya rather than Cosmomc to make life easier).
https://camb.readthedocs.io/en/latest/model.html?highlight=lsampleboost#camb.model.AccuracyParams
The structure is available in Fortran and CAMB. (though you might want to look at using Cobaya rather than Cosmomc to make life easier).
-
- Posts: 6
- Joined: October 28 2021
- Affiliation: University of Waterloo
Re: CAMB: Choosing resolution in z and k for ISW integral
Oh I see, no worries, and thank you!
A while ago, we were thinking about Cobaya, but unfortunately the relevant modified gravity code is built on CosmoMC, and additionally one of the specific datasets and its associated likelihood code is already integrated with another modification of CosmoMC, all of which I have merged into amalgamation of CosmoMC code (which took a bit of time and effort).
Thank you so much!
A while ago, we were thinking about Cobaya, but unfortunately the relevant modified gravity code is built on CosmoMC, and additionally one of the specific datasets and its associated likelihood code is already integrated with another modification of CosmoMC, all of which I have merged into amalgamation of CosmoMC code (which took a bit of time and effort).
Thank you so much!
-
- Posts: 6
- Joined: October 28 2021
- Affiliation: University of Waterloo
Re: CAMB: Choosing resolution in z and k for ISW integral
By any chance, if you have time, do you think you could address my second question, ie. where the ISW integrand is integrated to give ΔT/T, and the subsequent calculation for transforming this into a Cl?
Additionally, I am wondering why, when looking at the spacing in redshift for the points at which the ISW integrand is evaluated, they are not uniform. Is there an algorithm that optimizes these points to be more dense in the regions where the Weyl potential changes quickly or is larger?
Additionally, I am wondering why, when looking at the spacing in redshift for the points at which the ISW integrand is evaluated, they are not uniform. Is there an algorithm that optimizes these points to be more dense in the regions where the Weyl potential changes quickly or is larger?
-
- Posts: 1765
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: CAMB: Choosing resolution in z and k for ISW integral
Code is around here
https://github.com/cmbant/CAMB/blob/master/fortran/cmbmain.f90#L1452
The spacing is probably log or linear in conformal time.
https://github.com/cmbant/CAMB/blob/master/fortran/cmbmain.f90#L1452
The spacing is probably log or linear in conformal time.