CAMB - Plotting density constrast

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Paul Anthony Fronteri
Posts: 28
Joined: July 18 2013
Affiliation: University of Oslo

CAMB - Plotting density constrast

Post by Paul Anthony Fronteri » April 07 2014

Hey.

I would like to plot the density contrast of neutrinos as a function of time/redshift/scale factor.

However, when I am in puting the quantities grho/dgrho, where grho = a^2 kappa rho and dgrho = a^2 kappa \delta\rho, in MassiveNuVarsOut, or MassiveNuVars, or even directly from the integration in Nu_Integrate_L012, do I get that it jumps around in the scale factor. It even outputs the same scale factor with different number? Why is this, and how does then this actually works? Is it because of some numerical scheme to make it go faster, or do one spline the values? Or is it just that the "integration" is not done and one get several numbers for the density contrast at the same scale factor?

I have tried to go backwards and it seems that it jumps around (meaning not in chronological order) even in cmbmain.f90 in DoSourcek.

Could anyone explain why CAMB act this way? And more importantly, how can I plot the density contrast of the neutrinos, or any of the other components like baryons, dark matter? Is there an intrinsic function that will do this for me, or a flag?

Thanks in advanced for any help or clarifying of this problem.

Sincerly,

Paul

Antony Lewis
Posts: 1941
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: CAMB - Plotting density constrast

Post by Antony Lewis » April 07 2014

Use the fixq parameter, which sets the k value you want to output evolution for. e.g. look in cmbmain.f90 and modify the output code to put out what variables you want.

(you get jumps in Runge-Kutta integration because it is adaptive step size)

Paul Anthony Fronteri
Posts: 28
Joined: July 18 2013
Affiliation: University of Oslo

CAMB - Plotting density constrast

Post by Paul Anthony Fronteri » April 07 2014

Hey again. And thank you very much Antony.

Just another question, what does the frixq parameter stand for, and how does this relates to the wavenumber k?

As I understand does the Example code for plotting out variable evolution with fixq only do the perturbation part, or does it give out the background aswell?

Paul

Antony Lewis
Posts: 1941
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: CAMB - Plotting density constrast

Post by Antony Lewis » April 07 2014

q is used instead of k in parts of the code (for non-flat models). You can write out whatever you like.

Paul Anthony Fronteri
Posts: 28
Joined: July 18 2013
Affiliation: University of Oslo

CAMB - Plotting density constrast

Post by Paul Anthony Fronteri » April 24 2014

Hey again.

I don't know why, but I am getting an error creating the text file: Error creating file evolve_q005.txt when I want to do my independent plottings. However, have I no idea what might be wrong.

Paul

Erick Almaraz
Posts: 29
Joined: June 10 2012
Affiliation: University of Mexico

CAMB - Plotting density constrast

Post by Erick Almaraz » May 08 2015

Dear Paul.

I had the same problem, but when I removed
-openmp
in the FLAGS of the Makefile, the problem was solved

Regards

Post Reply