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 (not available in v3)
  • flat-sky Gaussian covariance matrix of the multipoles of the 2PCF
  • flat-sky Gaussian covariance matrix of the redshift-averaged multipoles of the 2PCF (not available in v3)

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)

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), version 2.1 or above
  • FFTW, version 3 or above

NOTE: if you are using Conda, you can install all of the above 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 first clone this repository:

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

Then after cd-ing to it, 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. For bug reports, if you are running something other than the Docker version, please specify your platform as well as library versions.

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

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.dev2.tar.gz (343.3 kB view details)

Uploaded Source

Built Distributions

coffe-3.0.dev2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

coffe-3.0.dev2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

coffe-3.0.dev2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

coffe-3.0.dev2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

coffe-3.0.dev2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB view details)

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

File details

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

File metadata

  • Download URL: coffe-3.0.dev2.tar.gz
  • Upload date:
  • Size: 343.3 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.dev2.tar.gz
Algorithm Hash digest
SHA256 be2856369733b803ff9de0b647bdb3c99b069781aab0e00161d52a9b3d4713a0
MD5 5a42fc591c210b0a6408a80616bb66ec
BLAKE2b-256 b6c8f00c9d776560b9b39b6dea8e90ebab139f6bbeb28b47db43aa029204e925

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coffe-3.0.dev2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7b2469d4996f23cc6497ea96e7246428fd1d00c8cb1b38afdd23af06dcb5dfdc
MD5 280972c087524027e79bbbe585b73ab9
BLAKE2b-256 d0afae31a7b42060cad2a2d4cb78d648af3d5ccd39b0e35e2189a850cb25fed3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coffe-3.0.dev2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6a36386101bc8211cf96e14762cd55937f54883b398840790161f8ffe1172bf5
MD5 f289216aff0a48034aec8c1efbe49ecc
BLAKE2b-256 d908f24e9b1b594f30bfe0b1e50c027a6794ea93e3dffd545688f181891a2434

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coffe-3.0.dev2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c55c546547bd1b0deae4389f69681826495d4fe0c454540c7c8ba4b3bb719744
MD5 c683636f97daabcb531775bb1f90ed7f
BLAKE2b-256 9ccb9179594dcc94c2ba0c7f098b686f9d4a4b80a4f26bf1d1e94b2df44262dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coffe-3.0.dev2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 480e6989e40a5b7b117e0ce81cd1e5aaa978788d4bee620ea9b8fd6812ba3998
MD5 f0e809baab57116a1a647a181cf251f0
BLAKE2b-256 e950609d2c7878c7ed86c0d576e750ca43e400b6ee557ce622d90865d67d683d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coffe-3.0.dev2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 73449dc992589d3dcbbf91d1ed5dacf5468d427b3ecf7b7476da1212df71f730
MD5 9ad969eb120732dae557fc523c45305c
BLAKE2b-256 2ba95be3b6da8c96bec334d10265b81298c3b9d0af897ea095e412b42c2b2847

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