Installing SSHT, S2LET, FLAG and FLAGLET

Dec.
25th
2012

This is a post to guide you through the installation of the various packages required to perform exact wavelets on the sphere and on the ball. The first step is of course to visit this page to receive the previous packages by email. Once they are unzipped, you may follow the simple steps below.

Step 1 : Installing FFTW and optionally CFITSIO and HEALPIX

SSHT, thus all the other packages, require FFTW. The later can be downloaded here and the installation should be straightforward using the usual ./configure and sudo make all install commands.

If you intend to use the FITS and HEALPix features of S2LET, you should also download and install CFITSIO and HEALPIX. The Fortran HEALPix library must be compiled with consistent Fortran flags; you will have to use the same flags to compile the Healpix Fortran interface in S2LET.

Step 2 : Creating symbols in Bash or Shell

One only need to check a few lines in each Makefile to be able to build all packages. In brief, the things that potentially need to be adapted are the locations of the dependencies and the compilers with their options. But the very first step before looking at the makefiles is to define symbols pointing to the libraries. For example in Bash you can modify the following pattern and copy it to your ~/.profile or ~/.bashrc :

If you intend to use the FITS and HEALPix features of S2LET, you should also define

export CFITSIO='~/sofware/cfitsio'
export HEALPIX='~/sofware/healpix'

and make sure the libraries are located in /lib subdirectories.

Step 3 : Setting up the makefiles

In the makefile for SSHT you must specify the location of FFTW, the C compilers+options and optionally the Matlab Mex compiler if you intend to use the Matlab interfaces. More details can be found below. On the contrary, in the makefiles for S2LET/FLAG/FLAGLET you should only check the compilers+options, since the makefiles will find the dependencies based on symbols defined in Bash/Shell.

All packages have Matlab interfaces that use Mex/C functions and must be built using the Matlab Mex compiler. Hopefully only the location of Matlab should be specified. For example on my machine it is

# Directory for MATLAB
MLAB = /Applications/MATLAB_R2011b.app

If you work on a recent Mac you should be able to build all libraries by running make all. On a Linux you may have to change a few options. In case you need to make these changes, below are the standard settings that work on Mac OS.

The standard settings for compiling the C libraries are

# Compilers and options for C
CC = gcc
OPT = -Wall -O3 -g

If you want to use HEALPix in S2LET, the following flags must agree with those used to build HEALPix: