Skip to main content

Python interface to the Cosmological Boltzmann code hi_class

Project description

hi_class: Horndeski in the Cosmic Linear Anisotropy Solving System

hi_class extends the CLASS Boltzmann code to cover Horndeski and related scalar-tensor models of dark energy and modified gravity. It is based on CLASS by Julien Lesgourgues, with major inputs from Thomas Tram and others.

Authors

  • Emilio Bellini
  • Ignacy Sawicki
  • Miguel Zumalacarregui

Installation

From PyPI/TestPyPI

pip install hiclassy

This installs the Python wrapper and builds the C core. You need a working C compiler (e.g. gcc) and, optionally, OpenMP support for parallel execution.

From source

make clean
make class

To build the Python wrapper, run:

make

If compilation fails, check the Makefile for compiler, optimization flags, and OpenMP settings.

Quick start

Use the Python interface:

from hiclassy import HiClass

The HiClass object is the equivalent of the Class object for standard Class. All methods and attributes, plus additional HiClass specific, are shared between the two. Then, the usage of the two should be equivalent.

If you want to use the C executable instead, you can run:

./class explanatory.ini

Parameter documentation and examples are available in hi_class.ini and explanatory.ini, plus the example files in gravity_models/.

Citing hi_class

If you use hi_class, please cite:

  • M. Zumalacarregui, E. Bellini, I. Sawicki, J. Lesgourgues, P. Ferreira, "hi_class: Horndeski in the Cosmic Linear Anisotropy Solving System", JCAP 1708 (2017) no.08, 019, http://arxiv.org/abs/arXiv:1605.06102
  • E. Bellini, I. Sawicki, M. Zumalacarregui, "hi_class: Background Evolution, Initial Conditions and Approximation Schemes", http://arxiv.org/abs/arXiv:1909.01828

Please also cite the relevant CLASS papers, including:

Plotting utilities

The package includes the Class Plotting Utility CPU.py for plotting Cl's, P(k), and related outputs, including model comparisons. Run:

python CPU.py --help

A MATLAB helper is available in plot_CLASS_output.m.

Development

We recommend developing from the GitHub repository:

https://github.com/emiliobellini/hi_class_public

For hi_class-specific updates, see this repository and the gravity_models/ examples.

Support

For support, please open an issue in the repository or refer to the documentation at http://hiclass-code.net.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hiclassy-3.3.4.2.tar.gz (6.1 MB view details)

Uploaded Source

File details

Details for the file hiclassy-3.3.4.2.tar.gz.

File metadata

  • Download URL: hiclassy-3.3.4.2.tar.gz
  • Upload date:
  • Size: 6.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hiclassy-3.3.4.2.tar.gz
Algorithm Hash digest
SHA256 c762a3e0e2a12ef8c35223cdef984662eab00997a80868ae7cb649ea828c55c2
MD5 2b774af1f7d116a71b92c80ec2de5a1e
BLAKE2b-256 8f940e74c4ac18597ebdc6c362f28edde95433eb329b0883fe68a43a898cc683

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page