README.rst 2.47 KB
Newer Older
Matthieu Tristram's avatar
Matthieu Tristram committed
1
====
Matthieu Tristram's avatar
Matthieu Tristram committed
2
Xpol
Matthieu Tristram's avatar
Matthieu Tristram committed
3
====
Matthieu Tristram's avatar
Matthieu Tristram committed
4

Matthieu Tristram's avatar
Matthieu Tristram committed
5
A code to compute angular power spectra based on cross-correlation between maps and covariance matrices.
Matthieu Tristram's avatar
Matthieu Tristram committed
6

Matthieu Tristram's avatar
Matthieu Tristram committed
7 8
This is the generalisation to polarisation of `Tristram M. et al., 2005 MNRAS 358 833 <https://arxiv.org/abs/astro-ph/0405575>`_

Matthieu Tristram's avatar
Matthieu Tristram committed
9
.. .. contents:: **Table of Contents** */
Matthieu Tristram's avatar
Matthieu Tristram committed
10 11


Matthieu Tristram's avatar
Matthieu Tristram committed
12 13 14 15
Install Python
==============

The easiest way to install ``Xpol`` is via ``pip``
Matthieu Tristram's avatar
Matthieu Tristram committed
16

Matthieu Tristram's avatar
Matthieu Tristram committed
17
.. code:: shell
Matthieu Tristram's avatar
Matthieu Tristram committed
18

Matthieu Tristram's avatar
Matthieu Tristram committed
19
 pip install xpol [--user]
Matthieu Tristram's avatar
Matthieu Tristram committed
20

Matthieu Tristram's avatar
Matthieu Tristram committed
21

Matthieu Tristram's avatar
Matthieu Tristram committed
22 23 24 25 26 27
If you plan to develop the code, it is better to clone the repository

.. code:: shell

 git clone https://gitlab.in2p3.fr/tristram/Xpol.git /where/to/clone

Matthieu Tristram's avatar
Matthieu Tristram committed
28

Matthieu Tristram's avatar
Matthieu Tristram committed
29
and install the python library
Matthieu Tristram's avatar
Matthieu Tristram committed
30 31 32

.. code:: shell

Matthieu Tristram's avatar
Matthieu Tristram committed
33
  pip install -e /where/to/clone
Matthieu Tristram's avatar
Matthieu Tristram committed
34 35 36 37

The -e option allow the developer to make changes within the Xpol directory without having
to reinstall at every changes. If you plan to just use the code and do not develop it, you can
remove the -e option.
Matthieu Tristram's avatar
Matthieu Tristram committed
38 39 40

You can find a example of the module usage in test/script_xpol.py

Matthieu Tristram's avatar
Matthieu Tristram committed
41

Matthieu Tristram's avatar
Matthieu Tristram committed
42
Install C
Matthieu Tristram's avatar
Matthieu Tristram committed
43
=========
Matthieu Tristram's avatar
Matthieu Tristram committed
44

Matthieu Tristram's avatar
Matthieu Tristram committed
45
The code is in C, fully MPI parallelized in CPU and memory (using spherical transform by s2hat).
46

Matthieu Tristram's avatar
Matthieu Tristram committed
47
Librairies needed are :
Matthieu Tristram's avatar
Matthieu Tristram committed
48 49 50 51

* HEALPix (http://healpix.jpl.nasa.gov/)
* cfitsio (http://heasarc.gsfc.nasa.gov/fitsio/fitsio.html)
* s2hat (http://www.apc.univ-paris7.fr/APC_CS/Recherche/Adamis/MIDAS09/software/s2hat/s2hat.html)
Matthieu Tristram's avatar
Matthieu Tristram committed
52

53
In addition you will need some BLAS/LAPACK optimized routines (MKL, NAG, ...)
Matthieu Tristram's avatar
Matthieu Tristram committed
54

Matthieu Tristram's avatar
Matthieu Tristram committed
55

Matthieu Tristram's avatar
Matthieu Tristram committed
56
Equations
Matthieu Tristram's avatar
Matthieu Tristram committed
57 58 59
=========

`wiki is here <https://gitlab.in2p3.fr/tristram/Xpol/wikis/home>`_
Matthieu Tristram's avatar
Matthieu Tristram committed
60

Matthieu Tristram's avatar
Matthieu Tristram committed
61

Matthieu Tristram's avatar
Matthieu Tristram committed
62
Usage
Matthieu Tristram's avatar
Matthieu Tristram committed
63
=====
Matthieu Tristram's avatar
Matthieu Tristram committed
64

Matthieu Tristram's avatar
Matthieu Tristram committed
65 66 67 68
You can use the python class (Xpol) to compute spectra based on a data.

.. code:: shell

Matthieu Tristram's avatar
Matthieu Tristram committed
69 70 71
 import xpol
 binning = xpol.Bins( lmins, lmaxs)
 xp = xpol.Xpol( mask, bins=binning)
Matthieu Tristram's avatar
Matthieu Tristram committed
72 73
 pcl,cl = xp.get_spectra( dT)

Matthieu Tristram's avatar
Matthieu Tristram committed
74
see the file `examples/script_xpol.py <https://gitlab.in2p3.fr/tristram/Xpol/-/blob/master/examples/script_xpol.py>`_ for more detailed usage.
Matthieu Tristram's avatar
Matthieu Tristram committed
75

Matthieu Tristram's avatar
Matthieu Tristram committed
76
For intensive computation and simulation you can alternatively use the MPI C version with a parameter file detailed `here <https://gitlab.in2p3.fr/tristram/Xpol/wikis/ParameterFile>`_
Matthieu Tristram's avatar
Matthieu Tristram committed
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95


References
==========

``Xpol`` have been used to derive power spectra for:

* Archeops

  - CMB power spectra [Tristram+2005, A&A 436 785]
  - Dust power spectra [Ponthieu+2005, A&A 444 327]

* Planck: 

  - CMB power spectra [Planck 2015 results. XI, Couchot+2015]
  - Dust power spectra [Planck Intermediate Paper XXX]
  - CIB power spectra [Planck 2013 results. XXX]
  - SZ power spectra [Planck 2013 results. XXI, Planck 2015 results XXII]
  - SZ-CIB cross-power spectra [Planck 2015 results. XXIII]
Matthieu Tristram's avatar
Matthieu Tristram committed
96 97

And many others !