Skip to content

Commit

Permalink
Doc install (#980)
Browse files Browse the repository at this point in the history
* Update correlations.py

Add a formula for test

* pyccl.correlations.correlation doc improvment

* pyccl.correlations.correlation doc improvment

* Update correlations.py

suppress unnecessary lines

* Update installation.rst

Google Colab installation

* minor doc fix

* new module base

* current CCL lead

* restructured

* flaked docs

---------

Co-authored-by: Jean-Eric Campagne <[email protected]>
Co-authored-by: Nick Koukoufilippas <[email protected]>
  • Loading branch information
3 people authored Mar 12, 2023
1 parent 163b319 commit 7e14f89
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 17 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!---
STYLE CONVENTION USED
STYLE CONVENTION USED
bolt italic:
***file***"
code:
Expand All @@ -10,7 +10,7 @@ STYLE CONVENTION USED
**`function`**
**`type`** or **`structure`**
-->
# CCL
# CCL
[![Build Status](https://travis-ci.org/LSSTDESC/CCL.svg?branch=master)](https://travis-ci.org/LSSTDESC/CCL) [![Coverage Status](https://coveralls.io/repos/github/LSSTDESC/CCL/badge.svg?branch=master)](https://coveralls.io/github/LSSTDESC/CCL?branch=master) [![Documentation Status](https://readthedocs.org/projects/ccl/badge/?version=latest)](https://ccl.readthedocs.io/en/latest/?badge=latest)

The Core Cosmology Library (CCL) is a standardized library of routines to calculate
Expand Down Expand Up @@ -111,13 +111,13 @@ for more information.
# Contact

If you have comments, questions, or feedback, please
[write us an issue](https://github.com/LSSTDESC/CCL/issues).
[write us an issue](https://github.com/LSSTDESC/CCL/issues).

The current lead of the LSST DESC CCL Topical Team is Danielle Leonard (c-d-leonard, danielle.leonard at ncl.ac.uk)
The current lead of the LSST DESC CCL Topical Team is David Alonso (damonge, david.alonso at physics.ox.ac.uk)


# Acknowledgements

The DESC acknowledges ongoing support from the Institut National de Physique Nucleaire et de Physique des Particules in France; the Science \& Technology Facilities Council in the United Kingdom; and the Department of Energy, the National Science Foundation, and the LSST Corporation in the United States. DESC uses resources of the IN2P3 Computing Center (CC-IN2P3--Lyon/Villeurbanne - France) funded by the Centre National de la Recherche Scientifique; the National Energy Research Scientific Computing Center, a DOE Office of Science User Facility supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231; STFC DiRAC HPC Facilities, funded by UK BIS National E-infrastructure capital grants; and the UK particle physics grid, supported by the GridPP Collaboration. This work was performed in part under DOE Contract DE-AC02-76SF00515.

NEC acknowledges support from a Royal Astronomical Society research fellowship and the Delta ITP consortium, a program of the Netherlands Organisation for Scientific Research (NWO) that is funded by the Dutch Ministry of Education, Culture and Science (OCW). DA acknowledges support from the Science and Technology Facilities Council through an Ernest Rutherford Fellowship, grant reference ST/P004474. AL and CG acknowledge support from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement No. [616170] for work on the generic interface for theory inputs.
NEC acknowledges support from a Royal Astronomical Society research fellowship and the Delta ITP consortium, a program of the Netherlands Organisation for Scientific Research (NWO) that is funded by the Dutch Ministry of Education, Culture and Science (OCW). DA acknowledges support from the Science and Technology Facilities Council through an Ernest Rutherford Fellowship, grant reference ST/P004474. AL and CG acknowledge support from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement No. [616170] for work on the generic interface for theory inputs.
34 changes: 31 additions & 3 deletions pyccl/correlations.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,40 @@

def correlation(cosmo, ell, C_ell, theta, type='NN', corr_type=None,
method='fftlog'):
"""Compute the angular correlation function.
r"""Compute the angular correlation function.
.. math::
\xi^{ab}_\pm(\theta) =
\sum_\ell\frac{2\ell+1}{4\pi}\,(\pm1)^{s_b}\,
C^{ab\pm}_\ell\,d^\ell_{s_a,\pm s_b}(\theta)
where :math:`\theta` is the angle between the two fields :math:`a` and
:math:`b` with spins :math:`s_a` and :math:`s_b` after alignement of their
tangential coordinate. :math:`d^\ell_{mm'}` are the Wigner-d matrices and
we have defined the power spectra
.. math::
C^{ab\pm}_\ell \equiv\ left(C^{a_Eb_E}_\ell\pm C^{a_Bb_B}_\ell\right)
+ i\left(C^{a_Bb_E}_\ell\mp C^{a_Eb_B}_\ell\right)
which reduces to the :math:`EE` power spectrum when all :math:`B`-modes
are 0.
The different spin combinaisons are:
- :math:`s_a=s_b=0` e.g. galaxy-galaxy, galaxy-:math:`\kappa`
and :math:`\kappa`-:math:`\kappa`
- :math:`s_a=2`, `s_b=0` e.g. galaxy-shear, and :math:`\kappa`-shear
- :math:`s_a=s_b=2` e.g. shear-shear.
.. note::
For scales smaller than :math:`\\sim 0.1^{\\circ}`, the input power
spectrum should be sampled to sufficienly high :math:`\\ell` to ensure
For scales smaller than :math:`\sim 0.1^{\circ}`, the input power
spectrum should be sampled to sufficienly high :math:`\ell` to ensure
the Hankel transform is well-behaved. The following spline parameters,
related to ``FFTLog``-sampling may also be modified for accuracy:
- ``ccl.spline_params.ELL_MIN_CORR``
Expand Down
1 change: 1 addition & 0 deletions readthedocs/api/pyccl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Submodules
:maxdepth: 4

pyccl.background
pyccl.base
pyccl.bcm
pyccl.boltzmann
pyccl.cls
Expand Down
34 changes: 25 additions & 9 deletions readthedocs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Installation

CCL can be installed from ``pip``, ``conda``, or directly from source.
It is configured to install most of its requirements automatically. However, if
you want to use CCL with Boltzmann codes like ``CLASS`` or ``CAMB``, or do
you want to use CCL with Boltzmann codes like ``CLASS`` or ``CAMB``, or do
perturbation theory calculations with ``FAST-PT``, you will
need to make sure these packages and their ``Python`` wrappers are installed
as well. See the instructions for :ref:`boltzmann-codes` and
as well. See the instructions for :ref:`boltzmann-codes` and
:ref:`getting-fast-pt` below.

CCL works on Linux or Mac OS. Windows installation is not supported.
Expand Down Expand Up @@ -41,6 +41,19 @@ Once you have ``CMake``, simply run:
$ pip install pyccl
Google Colab
============

To install ``pyccl`` on https://colab.research.google.com then one way is the following

.. code-block:: python
!pip install -q condacolab
import condacolab
condacolab.install()
!mamba install pyccl
.. _boltzmann-codes:

Getting a Boltzmann Code
Expand Down Expand Up @@ -91,6 +104,7 @@ If you are working in a ``conda`` environment, then ``ISiTGR`` is also available
Note that if you installed CCL with ``conda``, ``isitgr``
should already be in your environment.


.. _getting-fast-pt:

Getting FAST-PT
Expand All @@ -102,9 +116,10 @@ To use ``FAST-PT`` with CCL, you can install it with:
$ pip install fast-pt
Note the hyphen in the package name! You can also get it directly from the
Note the hyphen in the package name! You can also get it directly from the
`FAST-PT <https://github.com/JoeMcEwen/FAST-PT>`__ repo.


.. _getting-cmake:

Getting CMake
Expand Down Expand Up @@ -147,21 +162,22 @@ Known Installation Issues
$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
which will install all the required headers into ``/usr/include``.

On Mac OSX 10.15 or greater, this patch is no longer included.
Instead, you can manually add the location of required headers to your CPATH by running the following, or adding to your ``.bash_profile``:

.. code:: bash
$ export CPATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
#. Newer versions of Xcode do not automatically have the required command line tools installed. This can be done from the command line:

.. code:: bash
$ sudo xcode-select --install
$ sudo xcodebuild -license
.. _uninstalling:

Uninstalling ``CCL``
Expand Down

0 comments on commit 7e14f89

Please sign in to comment.