Installing and using the C library

The core functionalities of FLAG are written in C and self-documented. The C library only requires SSHT and FFTW. The optional spherical Bessel and Fourier-Bessel routines require the GSL library. Several examples, tests and demos are provided to demonstrate the usability of the C library.

Dependencies

FLAG requires the SSHT and FFTW packages. Obviously suitable C and Fortran 90 compilers will be required to build the respective implementations. Both C and Matlab mex compilers will be required to build the Matlab interface. The Java interfaces are pre-compiled and provided in a self-contained jar.

Linking with GSL adds the spherical Bessel and Fourier-Bessel features.

Compiling

Makefiles are provided to build the code. However the locations of SSHT, FFTW and optionnaly GSL must be specified. In FLAG the default Makefile will look at these symbols in Bash/Shell profiles. Alternatively you may declare them explicitely in the first section of the makefile. The compilers and their options may also be changed in the Makefile.

Once you have set the Makefile up for your system, FLAG may be compiled by running:

 >> make all

This will build the C library, Matlab interface, test programs, high-level programs and documentation. The Fourier-Bessel features will be added if GSL is found. We recommend to run the tests (flag_test) to check that compilation worked and that the transform achieves floating-point precision.

You may alternatively build the individual components of FLAG. To build the library only run (which will work without GSL):

 >> make lib

To build the test framework for the exact Fourier-Laguerre transform run:

 >> make test

To build the Matlab interfaces (MW by default, Healpix added if found):

 >> make matlab

Documentation

The FLAG code is self documenting. Although the package ships with source documentation, you may generate html source documentation by running:

 >> make doc

Documentation is generated using doxygen, thus you must have doxygen installed on your system to generate the source documentation.

Cleaning up

To tidy up all temporary files and objects run:

 >> make tidy

To remove all compiled files and programs run:

 >> make clean

To remove all source documentation run:

 >> make cleandoc


Source code documentation

FLAG ships with source documentation that is generated by doxygen. The C documentation is available here. The Matlab routines that interface with the C implementation are self documenting (documentation can be access through the help command in Matlab), as discussed below.


Testing and using the library

A test program may be run to test and familiarize yourself with the framework. It is extensively documented and may serve as starting point to learn to use the functionalities of FLAG. The command

 >> ./bin/flag_test

will run various performance and accuracy tests for the spherical Laguerre and Fourier-Laguerre transform as well as for the sampling theorems.

Finally, to check the version and build numbers of your version run:

 >> ./bin/flag_about