Skip to main content

Python wrapper for the COrrelation Function Full-sky Estimator code

Project description

COFFE v3

This is the public repository for the code COFFE (COrrelation Function Full-sky Estimator), which can be used to compute the following quantities in linear perturbation theory:

  • full-sky and flat-sky 2-point correlation function (2PCF) of galaxy number counts, taking into account all of the effects (density, RSD, lensing, etc.)
  • full-sky and flat-sky multipoles of the 2PCF
  • redshift-averaged multipoles of the 2PCF
  • flat-sky Gaussian covariance matrix of the multipoles of the 2PCF
  • flat-sky Gaussian covariance matrix of the redshift-averaged multipoles of the 2PCF

The relevant theoretical papers are:

Installation

From pip

If you are on Linux, the latest version of COFFE can be installed using:

pip install coffe

If you are on another platform, refer to the section below.

Development version (including non-Linux machines)

NOTE: the use of a virtual environment (such as Python's venv or Conda) is highly recommended.

If you would like to install the development version, you will need to first install the following:

  • a C compiler, compatible with the C99 standard
  • a Python interpreter, version 3.7 or above
  • GSL (GNU Scientific Library) and the corresponding headers, version 2.1 or above (available as libgsl-dev on Debian-based, and as gsl-devel on RHEL/CentOS-based distros)
  • FFTW and the corresponding headers, version 3 or above (available as libfftw3-dev on Debian-based, and as fftw-devel on RHEL/CentOS-based distros)

Then clone this repository:

git clone https://github.com/JCGoran/coffe

then change directory to it:

cd coffe

NOTE: if you are using Conda, you can install the above dependencies easily. First, create a new environment:

conda create --name [NAME]

and activate it:

conda activate [NAME]

Finally, run:

conda install --channel conda-forge --file requirements.txt

Once you have installed the above (either natively or using Conda), you can run:

./install

to install all of the other dependencies which COFFE requires.

Documentation

The documentation for the latest version is available here.

Bug reports and feature requests

Please use the issue tracker to submit any bug reports and feature requests.

License

COFFE is licensed under the GNU GPL 3.0. See the LICENSE file for more information.

Citations

If you use COFFE in a publication, we kindly ask that you cite the original paper describing the code, located at arXiv:1806.11090. A bibTeX entry is provided below for convenience.

@article{coffe:v1,
      author         = "Tansella, Vittorio and Jelic-Cizmek, Goran and Bonvin,
                        Camille and Durrer, Ruth",
      title          = "{COFFE: a code for the full-sky relativistic galaxy
                        correlation function}",
      year           = "2018",
      eprint         = "1806.11090",
      archivePrefix  = "arXiv",
      primaryClass   = "astro-ph.CO",
      SLACcitation   = "%%CITATION = ARXIV:1806.11090;%%"
}

Development

Testing

C tests (legacy)

To run the C test suite, you can use the command make check, which will build the binaries test_[MODULE], where [MODULE] can currently be one of background, integrals, corrfunc, multipoles, covariance, and automatically run them. Alternatively, you can build them one by one using make test_[MODULE], and run them manually via ./test_[MODULE]. This is primarily useful when modifying the code itself, to make sure the old results of the code weren't broken by some new change (feature, bugfix, etc.).

Python tests

To run the Python test suite, first install the development requirements:

pip install -r pip-requirements-dev.txt

Then run:

pytest tests/test_coffe.py

Building Python wheels

The building of wheels is done using the cibuildwheel utility. If building wheels for Linux, you can run:

sh build_wheels_linux.sh

which should build all of the wheels for Python 3.7 and above on Linux. The building of wheels for other platforms is not implemented, however, contributions are certainly welcome.

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

coffe-3.0.dev5.tar.gz (375.4 kB view details)

Uploaded Source

Built Distributions

coffe-3.0.dev5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

coffe-3.0.dev5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

coffe-3.0.dev5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

coffe-3.0.dev5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

coffe-3.0.dev5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

File details

Details for the file coffe-3.0.dev5.tar.gz.

File metadata

  • Download URL: coffe-3.0.dev5.tar.gz
  • Upload date:
  • Size: 375.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for coffe-3.0.dev5.tar.gz
Algorithm Hash digest
SHA256 21bd7e64e0b7e1a105a4d49d88125f5bba1c54381e2210769c07d1f546033370
MD5 656752f3e26fc10a0d94c45d8ce076fe
BLAKE2b-256 d312e1e234bc072e9158a1e5d49b28a49d51816877f06aa769bc404ee59b5015

See more details on using hashes here.

File details

Details for the file coffe-3.0.dev5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coffe-3.0.dev5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cf100c329a07296c0e4d9a0eec4a45f11ce425aa953debad11e7181712653a63
MD5 95662fe3254fbe26cc1eba01798fd03f
BLAKE2b-256 acf48e7afa486f7b84ee3adef2f7c87a38857c61956ab1cbcdee250bf44b264c

See more details on using hashes here.

File details

Details for the file coffe-3.0.dev5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coffe-3.0.dev5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 49e516d917fa5cf9465417f5d1b520b6816480e0db9a5d28038ea9e30ebf63c7
MD5 bd71ed1a1fd6d29abf47da05ffb9fc68
BLAKE2b-256 360d390fd4ac31ac89129b0c6b978cb760fe622382d2376a3bdc6d8ec1959153

See more details on using hashes here.

File details

Details for the file coffe-3.0.dev5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coffe-3.0.dev5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e5d63f6ff2c4db07bfad2f9344578def3bc6be1b52927fbe228420a75cdd90af
MD5 f08c64abbbadceeb802e800c25212699
BLAKE2b-256 26e435fa57c392e9cf540c8489fe507723cfd38b6931a1f38b227e8c20bee44c

See more details on using hashes here.

File details

Details for the file coffe-3.0.dev5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coffe-3.0.dev5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a215d0bc16d917e49b1655698e05911de4c020539a4405be5871ee01b445d8d7
MD5 27c1c5a7e8679a031f1bb6379238507c
BLAKE2b-256 ab024d35757cd98827b8df252d3ea31bf9186dd6a21f4a40060ed1657cd67fe2

See more details on using hashes here.

File details

Details for the file coffe-3.0.dev5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coffe-3.0.dev5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a463f7c5827a0b1d1ece894c8cb1657f6ee442e4f47fd94869587c65beacf281
MD5 3a2697ce9bcb17884f017c3880d20ca4
BLAKE2b-256 f85f084ad5ba9e41086984bbc2a09c49d7ad858f0929b9642c9744f0bafe49cf

See more details on using hashes here.

Supported by

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