Skip to content
A unified pseudo-Cl framework
C Python Shell Makefile Other
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis better testing Dec 10, 2018
doc updated docs May 9, 2019
pymaster updated docs May 9, 2019
sandbox_validation latest modifications after first resubmission Dec 25, 2018
src implemented in C May 8, 2019
test all tested May 9, 2019
.gitignore migration to desc Jul 29, 2018
.travis.yml better testing Dec 10, 2018
CHANGELOG.md documented all changes, updated to v1.0 May 9, 2019
LICENSE added LICENSE Jul 29, 2018
Makefile.am
Makefile.in merged master Jan 31, 2019
NERSC_installation.md Update NERSC_installation.md Aug 7, 2019
README.md Update README.md May 9, 2019
aclocal.m4
ar-lib migration to desc Jul 29, 2018
compile migration to desc Jul 29, 2018
config.guess migration to desc Jul 29, 2018
config.h.in
config.sub migration to desc Jul 29, 2018
configure
configure.ac ENH pthreads for fftw Dec 10, 2018
depcomp migration to desc Jul 29, 2018
install-sh migration to desc Jul 29, 2018
ltmain.sh migration to desc Jul 29, 2018
missing migration to desc Jul 29, 2018
setup.py documented all changes, updated to v1.0 May 9, 2019

README.md

NaMaster

NaMaster is a C library, Python module and standalone program to compute full-sky angular cross-power spectra of masked, spin-0 and spin-2 fields with an arbitrary number of known contaminants using a pseudo-Cl (aka MASTER) approach. The code also implements E/B-mode purification and is available in both full-sky and flat-sky modes.

Installation

Unless you care a lot about optimizing the code, you should probably use the conda recipe for NaMaster currently hosted on conda-forge (infinite kudos to Mat Becker for this). This means simply running:

conda install -c conda-forge namaster

If that works for you and you don't care about optimizing the code too much, skip the rest of this section. If you don't have admin permissions, you can give virtual environments a try (or else follow the instructions below).

0- Dependencies

NaMaster has the following dependencies, which should be present in your system before you can install the code:

  • GSL. Version 2 required.
  • FFTW. Version 3 required. Install with --enable-openmp and potentially also --enable-shared.
  • libsharp (see instructions in NERSC_installation.md for more details on how to install libsharp).
  • cfitsio. Any version >3 should work.
  • HEALPix. Any version >2 should work. You only need to install the C libraries (including the shared ones).

1- C library

First, install the C library libnmt. In UNIX, in the simplest case, this should be a matter of running

./configure
make
make install

where the last command should be preceded by sudo if you need (and can get) admin privileges. If you don't have admin privileges, you can change the first command to

./configure --prefix=/path/to/install

where /path/to/install is an absolute path to the directory where the C library and include files will be installed.

If you have installed the C library in a non-standard path, you may have to add

export LD_LIBRARY_PATH=/path/to/install/lib:$LD_LIBRARY_PATH

to your .bashrc or .bash_profile for your system to be able to find libnmt.

Note that the installation process will also generate an executable namaster, residing in /path/to/install/bin that can be used to compute power spectra. The use of this program is discouraged over using the C library or python module.

Once you have installed the C library, you can check that everything works by running

make check

If all the checks pass, you're good to go.

2- Python module

Installing the python module pymaster should be as simple as running

python setup.py install [--user]

or, even better, if you can use pip:

pip install . [--user]

where the optional --user flag can be used if you don't have admin privileges.

You can check that the python installation works by running the unit tests:

python -m unittest discover -v

Note that the test directory, containing all unit tests, also contains all the sample python scripts described in the documentation (see below).

If you installed pymaster via pip, you can uninstall everything by running

pip uninstall pymaster

Documentation

The following sources of documentation are available for users:

Licensing, credits and feedback

You are welcome to re-use the code, which is open source and freely available under terms consistent with BSD 3-Clause licensing (see LICENSE).

If you use NaMaster for any scientific publication, we kindly ask you to cite this github repository and the companion paper https://arxiv.org/abs/1809.09603. Special kudos should go to the following heroes for their contributions to the code:

  • Mat Becker (@beckermr)
  • Daniel Lenz (@DanielLenz)
  • Zack Li (@xzackli)
  • Thibaut Louis (@thibautlouis)

For feedback, please contact the author via github issues or emaild (david.alonso@physics.ox.ac.uk).

You can’t perform that action at this time.