Open brycem1 opened 6 years ago
Hi Bryce
The easiest way is to use the Python wrapper of CLASS. The following lines will compute dkappadtau in Mpc^-1:
cosmo = Class()
cosmo.set({})
cosmo.compute()
th = cosmo.get_thermodynamics()
dkappadtau = th["kappa' [Mpc^-1]"]
You can then compute the spherical Bessel functions from scipy and do the the numerical integration in Python as well. You can of course do all this by modifying the CLASS C-code, but it will be somewhat more complicated if you are not familiar with the code.
Cheers, Thomas
Hi Thomas,
Yes I tried doing it in python but I had convergence issue when trying to do the integral. I suspect it is because the bessel function is an oscillatory function and the scipy quad integral tolerance/error is the same order as the output which is not ideal. I was wondering how does class deal with the bessel function integrals generally?
Regards,
Bryce
I do not know if you have found the answer to your question in these years but I can quickly share this paper which might give some insight. https://arxiv.org/pdf/1705.05022.pdf
Hello,
I'm new to using CLASS and I'm trying to calculate the transfer function from equation 30 from this paper for my research. Now the tau_dot term is dkappadtau in CLASS and j_L is the spherical bessel function. What I'm unsure about is what would be the relevant modules and functions to modify my local copy of the CLASS c code to output such a Transfer function?
Any help would be appreciated.
Regards,
Bryce