Package: coffe
COFFE v3This 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 2PCFredshift-averaged multipoles of the 2PCFflat-sky Gaussian covariance matrix of the multipoles of the 2PCFflat-sky Gaussian covariance matrix of the redshift-averaged multipoles of the 2PCFThe relevant theoretical papers are:The full-sky relativistic correlation function and power spectrum of galaxy number counts: I. Theoretical aspects, arXiv:1708.00492COFFE: a code for the full-sky relativistic galaxy correlation function, arXiv:1806.11090The flat-sky approximation to galaxy number counts - redshift space correlation function, arXiv:2011.01878InstallationFrom pipIf you are on Linux, the latest version of COFFE can be installed using:pipinstallcoffeIf 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'svenvorConda) 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 standarda Python interpreter, version 3.7 or aboveGSL(GNU Scientific Library) and the corresponding headers, version 2.1 or above (available aslibgsl-devon Debian-based, and asgsl-develon RHEL/CentOS-based distros)FFTWand the corresponding headers, version 3 or above (available aslibfftw3-devon Debian-based, and asfftw-develon RHEL/CentOS-based distros)Then clone this repository:gitclonehttps://github.com/JCGoran/coffethen change directory to it:cdcoffeNOTE: if you are using Conda, you can install the above dependencies easily.
First, create a new environment:condacreate--name[NAME]and activate it:condaactivate[NAME]Finally, run:condainstall--channelconda-forge--filerequirements.txtOnce you have installed the above (either natively or using Conda), you can run:./installto install all of the other dependencies which COFFE requires.DocumentationThe documentation for the latest version is availablehere.Bug reports and feature requestsPlease use theissue trackerto submit any bug reports and feature requests.LicenseCOFFE is licensed under the GNU GPL 3.0. See theLICENSEfile for more information.CitationsIf you use COFFE in a publication, we kindly ask that you cite the original paper describing the code, located atarXiv:1806.11090.
AbibTeXentry 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;%%"
}DevelopmentTestingC tests (legacy)To run the C test suite, you can use the commandmake check, which will build the binariestest_[MODULE], where[MODULE]can currently be one ofbackground,integrals,corrfunc,multipoles,covariance, and automatically run them.
Alternatively, you can build them one by one usingmake 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 testsTo run the Python test suite, first install the development requirements:pipinstall-rpip-requirements-dev.txtThen run:pytesttests/test_coffe.pyBuilding Python wheelsThe building of wheels is done using thecibuildwheelutility.
If building wheels for Linux, you can run:shbuild_wheels_linux.shwhich 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.