Installation¶
This guide is intended for people who are not currently using Anaconda. If you already have a Python 3 conda environment, skip below to the subsection Installing Software.
Create a Conda Environment¶
You first need to get the Anaconda module and enter a custom environment.
module load anaconda3
Either enter your preferred conda environment with
source activate YOUR_ENV_NAME
if you already have one, or create a
new one. I call my power spectrum conda environment ps
, but you can
name it something else if you want, just replace every mention of ps
in the instructions below with your desired environment name.
conda create -n ps python=3
Enter your environment. This is what you will type every time you want to compute some spectra (and in your SLURM power spectrum jobs!).
conda activate ps
You will need to install some other necessary packages into your conda
environment, if you just created it. Note that we are using -n
to
specify the conda environment!
conda install -n ps matplotlib cython numpy scipy astropy pillow
If you are running on a machine with Jupyter like cori or niagara, we also set up ipykernel so your conda environment shows up in Jupyter. You can do this on tiger too (see Jupyter on the Cluster).
conda install -n ps ipykernel
python -m ipykernel install --user \
--name ps --display-name "Python 3 (ps)"
Installing Software¶
We now install the power spectrum software. Install NaMaster with
conda install -c conda-forge namaster -n ps
You also need to install pixell for CAR map manipulation. This involves cloning
a GitHub repository, so for convenience you might want to set up your SSH keys
on GitHub. If you are on niagara, you will also need to
module load autotools
to get autoconf
before installing pixell. Go to the directory where you keep your software, and
run
pip install pixell --user
You also need healpy to manipulate healpix maps.
pip install healpy
Then install nawrapper (these routines for ACT power spectrum analysis). Return to the directory where you keep your software, and then run
git clone git@github.com:xzackli/nawrapper.git
cd nawrapper
pip install -e . --user
You should be all set! Try out the Getting Started.
Updating NaWrapper¶
To get new version of NaWrapper in the future, you’ll have to run git pull in the nawrapper repository you had cloned earlier. Since you installed with -e using pip, this is all you have to do.
Working on Tiger/Della¶
I maintain module files for ACT analysis on the Princeton clusters (Tiger and Della), with instructions available on the ACT wiki (scroll down to the “Power Spectrum Analysis” section). These will let you import the GitHub master branches of pixell, NaMaster (pymaster), and nawrapper by adding some paths to your PYTHONPATH.