Skip to content

CLASS Rejects Low N_eff Values with Three Massive Neutrinos #656

@ZackCheslog

Description

@ZackCheslog

Hello, I’ve observed that when running with three massive neutrinos and allowing N_eff to vary below the standard model value, CLASS throws an error stating that N_eff cannot go below some minimum threshold. In particular, when the following parameters are set:

 ‘N_ncdm ’: 3,
 ’m_ncdm ’: ’0.02, 0.02, 0.02’,
 ’Neff’: 3.02,
 ‘deg_ncdm’: ‘1,1,1’

The error message is:

condition (pba->Omega0_ur<0) is true; You cannot set the density of ultra-relativistic relics (dark radiation/neutrinos) to negative values. You might have input a total Neff smaller than what your massive neutrinos require minimally (around 1.02 * N_ncdm * deg_ncdm)

This error message does not occur when N_eff is set to 3.044, but it appears when N_eff is lower than approximately 3.039. This makes it difficult to run MCMC chains where N_eff and the sum of neutrino masses (with three massive neutrinos) are both varied, since regions of parameter space with N_eff < 3.039 cannot be explored.

Commenting out line 2470 in source/input.c (where the error message above originates) seems to solve the issue - with this change, CLASS successfully computes spectra at low N_eff values with three massive neutrinos. Is there a better way to resolve this issue? In either case, would it be possible to incorporate the solution into CLASS, so users who want to run MCMC chains in this scenario do not need to modify CLASS themselves?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions