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)

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)

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.

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

Uploaded Source

Built Distributions

coffe-3.0.dev4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

coffe-3.0.dev4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

coffe-3.0.dev4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

coffe-3.0.dev4-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.dev4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.7 MB view details)

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

File details

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

File metadata

  • Download URL: coffe-3.0.dev4.tar.gz
  • Upload date:
  • Size: 354.2 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.dev4.tar.gz
Algorithm Hash digest
SHA256 9c0f627496cd746ac8d73a3055e84817e41a7e9014936bbbeabc4ef7ca6330a6
MD5 fc7e7922e0a6add763397266d204c404
BLAKE2b-256 09ca2993bd77630ad38de18a32fa28c481cbd6e5e82322ea6f5938c6c357d988

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coffe-3.0.dev4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8165043fad21c59763b35cefbe31c7c95a7ea4155149d83ac8880b9e692f1620
MD5 e501eecf43cfc26f80901fa285009bf2
BLAKE2b-256 bc5f6c8d7b1e30416e141211241c26aee110e61b5e72612134796116d1997f81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coffe-3.0.dev4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9bc174c391925a9941a55d2e79910bc8f1915cca5dd65b8f2d410d481236a77c
MD5 002659ee843cc5590b549e77c39f849d
BLAKE2b-256 6cb11e23469fe0f33ab055a851ebff08da1f1967c778ca2040a7bc01acb0dc86

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coffe-3.0.dev4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c32099e3ff0b9561e83d5db92f2deea137a117a314fc902aaab0b3dbbf017f2
MD5 ff516bf92ba43717c39cbda5a2f27704
BLAKE2b-256 a23a49620e3e441134ef01e6fc93e8dfd69562add1d7f38cd9c8ff1c26451ed9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coffe-3.0.dev4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d1bb0fc34009c09becf4dbcb5cee1bb89a797f3ff9778b2f3e044cf8d7f00129
MD5 fd16b0114e2362d2096bc8343b945612
BLAKE2b-256 e538128937b8da7e30f51feac713900b1e7e137e2eb0d67960bae723e13d8066

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coffe-3.0.dev4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 35b59a3abe6fd53fc44fdb7858ca3eee267ace03e969054d8d32fbfec7ed7bf9
MD5 001c3fd7ad5ac1279f0bc14703a34ebe
BLAKE2b-256 bf63a8e7ae942380010ae758e1e6da3a9a60ce2a9ee094c0ff58fc1c90a4a141

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