[CAMB] $N_{eff}$ and taking derivatives

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Felipe Maldonado
Posts: 26
Joined: November 10 2016
Affiliation: FSU

[CAMB] $N_{eff}$ and taking derivatives

Post by Felipe Maldonado »

Hello Dr. Lewis,

I'm interested in taking derivatives of matter power spectra with respect to $N_{eff}$ in order to get Fisher estimates.
Unfortunately, I'm confused because there seem to be two parameters with very similar names, nnu and standard_neutrino_neff.

The documentation has this to say about them:
  • nnu – N_eff, effective relativistic degrees of freedom
  • standard_neutrino_neff – default value for N_eff in standard cosmology (non-integer to allow for partial heating of neutrinos at electron-positron annihilation and QED effects)
I apologize, but I'm just uncertain on what is the difference between these two parameters.

Furthermore, if I wanted to slightly change $N_{eff}$, I'm unclear as to whether they should both change or only one of them.

I appreciate any assistance.

Felipe Maldonado
Antony Lewis
Posts: 1984
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: [CAMB] $N_{eff}$ and taking derivatives

Post by Antony Lewis »

Use nnu. standard_neutrino_neff is fixed to the standard model calculated values for the three standard neutrinos.
Felipe Maldonado
Posts: 26
Joined: November 10 2016
Affiliation: FSU

Re: [CAMB] $N_{eff}$ and taking derivatives

Post by Felipe Maldonado »

Thank you, Doctor Lewis.
Simony S. da Costa
Posts: 6
Joined: December 20 2022
Affiliation: INFN - Sezione di Pisa

Re: [CAMB] $N_{eff}$ and taking derivatives

Post by Simony S. da Costa »

Dear Antony,
I am using cosmomc to allow Neff to vary in terms of other two parameters (of the model I am studying).
In principle, I am changing the Num_Nu_Massless parameter, as I understood it stands for the calculation of nnu, am I right to do this?
Do I need to modify all these files: camb/model.f90, camb/results.f90 and source/Calculator_CAMB.f90 ?
Antony Lewis
Posts: 1984
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: [CAMB] $N_{eff}$ and taking derivatives

Post by Antony Lewis »

Yes; what you need to modify will depend on what other physics your model is affecting
Simony S. da Costa
Posts: 6
Joined: December 20 2022
Affiliation: INFN - Sezione di Pisa

Re: [CAMB] $N_{eff}$ and taking derivatives

Post by Simony S. da Costa »

Dear Antony,

The physics of my model just affects the Neff, it is something like Neff + DeltaNeff, where this DeltaNeff can depend on two or only one parameter (within its appropriate range).

I am not sure, but I think when using only camb, I need to modify model.f90, results.f90 and camb.f90.

However, if I want to use cosmomc, these files are not used (as soon as I tested with some write(*,*) to check where the code was passing through), but instead I need to modify Calculator_CAMB.f90 and CosmologyParameterizations.f90 on the source directory.

On a first moment I did the modification using the following on Calculator_CAMB.f90:

Code: Select all

    P%Num_Nu_Massless = CMB%nnu + 7.9e-5*CMB%nnu_darkmat !SIMONY
    P%share_delta_neff = .true. !SIMONY .false.

    if (CMB%omnuh2>0) then
        call P%SetNeutrinoHierarchy(CMB%omnuh2, CMB%omnuh2_sterile, P%Num_Nu_Massless, &!SIMONY CMB%nnu, &
            CosmoSettings%neutrino_hierarchy, CosmoSettings%num_massive_neutrinos)
    end if
And on CosmologyParameterizations.f90

Code: Select all

CMB%nnu_darkmat = Params(17)
in different routines to include the new parameter (using the proper index according to params_CMB.paramnames, params_background.paramnames and params_astro.paramnames).

I ran the code and obtained my results.

--------------------------------------------------------

The point is that I realize that I should (?) consider the modification on Neff also on CosmologyParameterizations.f90, which means:

Code: Select all

CMB%nnu_darkmat = Params(17)
CMB%nnu = Params(10) + 7.9e-5*CMB%nnu_darkmat
which I think would modify the constraints on cosmological parameters.

Could you or anyone confirm that this last modification is the correct one?

I would really appreciate your attention.

Simony
Post Reply