Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NCDM number density wrong scaling #225

Open
guidodamico opened this issue Jul 18, 2018 · 2 comments
Open

NCDM number density wrong scaling #225

guidodamico opened this issue Jul 18, 2018 · 2 comments

Comments

@guidodamico
Copy link

In the function background_ncdm_momenta, I think the number density has the wrong scaling (1+z)^5 instead of (1+z)^3.
The bug is at line 1413 of background.c, where
if (n!=NULL) *n *= factor2*(1.+z);
should read
if (n!=NULL) *n *= factor2/(1.+z);

@borisbolliet
Copy link

(Just to comment:
I also think there is a typo and got worried :-), but this seems not to be a crucial part of the code: the number density in background_ncdm_momenta is used only at one place to get a first guess for the mass estimate (which is later overwritten by the correct answer)...)

@ThomasTram
Copy link
Collaborator

ThomasTram commented Jul 30, 2018

Thanks for pointing this out! As Boris says, this is not a crucial part of the code, especially since the only time this is being used is at z=0.

Cheers,
Thomas

lesgourg added a commit that referenced this issue Sep 10, 2018
… and few bugfixes

* devel: (54 commits)
  updated doc
  added a few comments in spectra related to P_cb
  updated version  number to 2.7.0
  fixed minor issue with dcdm in input
  restored the empty directory RealSpaceInterface/cache/
  added 11 notebooks and equivalent scripts (cambridge version)
  pushing the Real Space Interface
  further cosmetic changes in P_cb
  few extra comkments to Pcb part
  Fixed a bug leading to double free when combining the new quadrature strategies with shooting
  Fixed typo in ncdm number density, cf. issue #225
  final polishing of pk_eq method
  taken care of the case thatan x-array with 2 entries only needs to be splined by using the natural_spline and not the estimated derivative spline method by default in this particular case
  sigma8 and sigma8_cb now computed in two separate functions to avoid confusion
  mem leak fix
  k_nl
  Pcb changes: M and CB share the same tau_min_nl
  Nils pk_type trick
  transfer.c dNdz according to Euclid IST specification
  removed the enum halofit_found_k_max
  ...
lesgourg added a commit that referenced this issue Sep 21, 2018
* origin/2.7: (56 commits)
  fixed a problem in the manual from release 2.7, and removed unnecessary files from the RSI
  fixed small inconsistency in many_times.ipynb leading to errors with linux
  updated doc
  added a few comments in spectra related to P_cb
  updated version  number to 2.7.0
  fixed minor issue with dcdm in input
  restored the empty directory RealSpaceInterface/cache/
  added 11 notebooks and equivalent scripts (cambridge version)
  pushing the Real Space Interface
  further cosmetic changes in P_cb
  few extra comkments to Pcb part
  Fixed a bug leading to double free when combining the new quadrature strategies with shooting
  Fixed typo in ncdm number density, cf. issue #225
  final polishing of pk_eq method
  taken care of the case thatan x-array with 2 entries only needs to be splined by using the natural_spline and not the estimated derivative spline method by default in this particular case
  sigma8 and sigma8_cb now computed in two separate functions to avoid confusion
  mem leak fix
  k_nl
  Pcb changes: M and CB share the same tau_min_nl
  Nils pk_type trick
  ...
lesgourg pushed a commit that referenced this issue Sep 26, 2019
…input

* 'devel' of https://github.com/lesgourg/class: (48 commits)
  updated doc
  added a few comments in spectra related to P_cb
  updated version  number to 2.7.0
  fixed minor issue with dcdm in input
  restored the empty directory RealSpaceInterface/cache/
  added 11 notebooks and equivalent scripts (cambridge version)
  pushing the Real Space Interface
  further cosmetic changes in P_cb
  few extra comkments to Pcb part
  Fixed a bug leading to double free when combining the new quadrature strategies with shooting
  Fixed typo in ncdm number density, cf. issue #225
  final polishing of pk_eq method
  taken care of the case thatan x-array with 2 entries only needs to be splined by using the natural_spline and not the estimated derivative spline method by default in this particular case
  sigma8 and sigma8_cb now computed in two separate functions to avoid confusion
  mem leak fix
  k_nl
  Pcb changes: M and CB share the same tau_min_nl
  Nils pk_type trick
  transfer.c dNdz according to Euclid IST specification
  removed the enum halofit_found_k_max
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants