Camb

Latest version: v1.5.9

Safety actively analyzes 714815 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

1.0.7

* HM_code updates for numerical stability, speed, fix for linear massive neutrino growth (thanks A. Mead; can change results and significantly faster)
* Fix for Mac ifort compatibility (thanks C. Kreisch)

1.0.6

* fix for z_drag with high matter densities and for P(k) without reionization
* fix memory leak freeing python result objects
* forutils compatibility update
* Exposes HM code baryon parameters to python

1.0.5

* Added [get_lensed_gradient_cls](https://camb.readthedocs.io/en/latest/results.html#camb.results.CAMBdata.get_lensed_gradient_cls) function for flat-sky non-perturbative lensing reconstruction responses
* Fix HMCode bug for w/=-1 models
* Fix k^2 factor in 21cm transfer function output
* Misc minor bug fixes, code and doc tidies

1.0.4

Fix bugs in Fortran Makefile and get_total_cls.

1.0.3

Misc bug fixes, and support for passing BBN interpolation table name as bbn_predictor in [set_cosmology](https://camb.readthedocs.io/en/latest/model.html#camb.model.CAMBparams.set_cosmology).

1.0.2

This is a major new release, with CAMB now configured mainly as a Python package (wrapping modern Fortran for fast numerics). See the [example notebook](https://camb.readthedocs.io/en/latest/CAMBdemo.html) for examples of usage and now comprehensive [documentation](https://camb.readthedocs.io).


Major new features (in Python and Fortran) include:

- Integrated CAMB sources, for CMB, CMB lensing, lensing convergence, number counts and 21cm including all linear velocity and GR effects; [SplinedSourceWindow and GaussianWindow](https://camb.readthedocs.io/en/latest/sources.html) classes for setting SourceWindows array describing additional sources.

- New [set_initial_power_function](https://camb.readthedocs.io/en/latest/model.html#camb.model.CAMBparams.set_initial_power_function) and [set_initial_power_table functions](https://camb.readthedocs.io/en/latest/model.html#camb.model.CAMBparams.set_initial_power_table) to set initial power spectra from arbitrary python function or sampled arrays

- [DarkEnergy](https://camb.readthedocs.io/en/latest/dark_energy.html), [InitialPower](https://camb.readthedocs.io/en/latest/initialpower.html), [NonLinearModel](https://camb.readthedocs.io/en/latest/nonlinear.html), [ReionizationModel](https://camb.readthedocs.io/en/latest/reionization.html) and [RecombinationModel](https://camb.readthedocs.io/en/latest/recombination.html) classes that can be dynamically assigned to [CAMBparams](https://camb.readthedocs.io/en/latest/model.html#camb.model.CAMBparams) object fields.

- Easily switch Dark Energy model between fluid and PPF, and support for setting custom w(z) evolution

- Python command line camb script. Functions to load .ini file settings from python scripts.

Python changes:

- [set_cosmology](https://camb.readthedocs.io/en/latest/model.html#camb.model.CAMBparams.set_cosmology) now supports more general exact thetastar as well as H0 and cosmomc_theta.
- [read_ini](https://camb.readthedocs.io/en/latest/camb.html#camb.read_ini) and [run_ini](https://camb.readthedocs.io/en/latest/camb.html#camb.run_ini) functions
- Reworked python-fortran interface using metaclass and decorators, supporting allocatable arrays and class instances and directly import and call of Fortran class methods
- Support multiple [CAMBdata](https://camb.readthedocs.io/en/latest/results.html#camb.results.CAMBdata) result instances, and results object can be called safely in any order (removing most global variables)
- [CAMBparams](https://camb.readthedocs.io/en/latest/model.html#camb.model.CAMBparams) read-only properties for omegam, N_eff, omegab, omegac, omaganu, h
- T_CMB changes handled consistently
- [set_params](https://camb.readthedocs.io/en/latest/camb.html#camb.set_params) supports options for changing dark energy, initial power and non-linear model classes
- [set_params](https://camb.readthedocs.io/en/latest/camb.html#camb.set_params) can set CAMBparam members if not already used as an argument (and things like InitPower.ns via an input string)
- Fields support named enumerations, name-length fields for arrays, fortran-compatible boolean and help
docs include help for field values (auto-generated via metaclass)
- Faster and array versions of various background functions
- SecondOrderPK non-linear model class available from Python
- Optional support for CosmoRec and HyRec [RecombinationModel](https://camb.readthedocs.io/en/latest/recombination.html) classes (need to compile with them linked)
- Updated BBN model default to Parthenope 2017 as Planck 2018 analysis
- "setup.py make" command to re-build the Fortran library, which also works on Windows if gfortran is installed.

General changes

- Changed [CAMBparams](https://camb.readthedocs.io/en/latest/model.html#camb.model.CAMBparams) parameters to be physical density parameters ombh2, omch3, omnuh2 (+omk)
- Modest speed improvement from using higher order series solutions for background neutrino density combined with linear rather than log spline.
- Uses splined a(t) for perturbation evolution rather than evolving for each perturbation mode; tensor spectrum results now much faster
- More accurate background calculations with partial parallelism
- Finer every-L sampling at L=11-15 (small change in EE). Updated c_l interpolation template.
- min_l and custom source functions now set as parts of [CAMBparams](https://camb.readthedocs.io/en/latest/model.html#camb.model.CAMBparams)
- Account for radiation when setting dark energy density from matter densities and omk
- Smoother default reionization history parameters around helium second reionization
- Use matter temperature evolution from recfast (still harmlessly wrong - as before - from reionization onwards)
- scalarCovCls.dat and _array outputs for lensing potential now deflection angle
- Halofit default updated to HMcode to match Planck 2018 analysis
- Added TAxionEffectiveFluid example specific dark energy class implementation
- high_accuracy_default option removed (is now the default)
- Git repository now uses submodule for [forutils](https://github.com/cmbant/forutils)

Underlying Fortran changes:

- Fortran 2003 Object-oriented code restructuring; Fortran code structure now closer to the python ([see class trees](https://camb.info/doc/classes/_index.html)). [this is a breaking change]
- Now requires [gfortran 6 or ifort 14 or higher](https://camb.readthedocs.io/en/latest/fortran_compilers.html#fortran-compilers) (ifort 18.0.1 or higher recommended)
- Fix for auto-kmax when using lensing from command line

Page 4 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.