Coder Social home page Coder Social logo

jcgoran / coffe Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 7.0 5 MB

The public repository for the code COFFE

Home Page: https://jcgoran.github.io/coffe/

License: GNU General Public License v3.0

Makefile 1.36% M4 0.41% C 75.88% C++ 0.23% Dockerfile 0.24% Python 4.96% Shell 0.47% Cython 16.45%
cosmology correlation-functions galaxy-clustering covariance-matrix

coffe's Introduction

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 and encouraged.

coffe's People

Contributors

fsorrenti avatar jcgoran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

coffe's Issues

Creating a new settings.cfg

Hi,

I created a copy of and modified the settings.cfg according to my requirement, and I saved it by a different name (say settings1.cfg). But while running the new cfg file, I get the following error: "Cannot read the parameter file."

Do I need to do something to enable the code to read the newly named cfg file? Or only a file named as settings.cfg can be run?

Thanks in advance,
Basundhara

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.