The S2DW code provides functionality to perform the scale discretised wavelet transform on the sphere developed in our paper: Exact reconstruction with directional wavelets on the sphere (ArXiv|DOI). Routines are provided to compute wavelet and scaling coefficients from the spherical harmonic coefficients of a signal on the sphere and to synthesise the spherical harmonic coefficients of the original signal from its wavelet and scaling coefficients. The reconstruction of the spherical harmonic coefficients of the original signal is exact to numerical precision. Typically, maximum reconstruction errors are of the order 10^(-12) or smaller. Please see our paper for further details of the wavelet transform and a discussion of typical reconstruction errors and execution times of this implementation.
It is considerably more accurate and efficient to perform our wavelet transform on the sphere in harmonic space, hence this is the approach adopted in the S2DW code. The S2DW library itself considers only the spherical harmonic representation of data defined on the sphere and not real space representations. Many different pixelisations schemes for the sphere exist, with corresponding algorithms to perform forward and inverse spherical harmonic transforms. These algorithms are not always exact, hence the core functionality of the S2DW code operates on the spherical harmonic coefficients of signals only. Users are then free to use any pixelisation of the sphere and the computation of spherical harmonic coefficients is the users' concern.
A number of optional utility programs are also provided in the S2DW code. These enable users to perform the scale discretised wavelet transform on data defined on the sphere in real space. The HEALPix pixelisation of the sphere is adopted for this purpose. The spherical harmonic transform on a HEALPix pixelisation is not exact, hence the reconstruction accuracy of our S2DW code for real space data is limited by the accuracy of the forward and inverse spherical harmonic transforms provided by HEALPix.
For further details see the README.txt file.
The S2DW library requires only the FFTW and CFITSIO packages. If one wishes to also use the utility programs then the HEALPix and S2 packages are also required. Please note that all S2DW code is written in Fortran 90 and a suitable Fortran compiler will be required.
For details on how to use the S2DW library code see the documentation below.
>> make lib
The test may then be performed by running:
>> make test
If you see the message 'Tests passed!' printed then the S2DW library has been installed correctly and is reconstructing the spherical harmonic coefficients of a random test signal exactly from its wavelet and scaling coefficients. By default the test is performed at a band limit of B=64. To run the test for other band limits run:
>> make runtest
where xx is the band limit of the test.
>> ./bin/s2dw_test xx
The utility programs require the HEALPix and S2 packages to handle real space representations of data on the sphere (these are not required for the S2DW library). Before attempting to compile the utility programs please ensure that these libraries are linked correctly in the makefile. Once these libraries are linked you may compile the S2DW utility programs by running:
For details on how to use the S2DW utility programs see the documentation below.
>> make prog
By default, the S2DW code ships with only this single documentation page. The remainder of the documentation is automatically generated from the source code using f90doc. Please ensure that you have f90doc installed in order to generate this documentation. Once f90doc is installed the documentation may be generated by running:
>> make docs
To remove all documentation, except the front page (i.e. this file), run:
>> make clean
>> make cleandocs
Provides core functionality to perform a scale discretised wavelet
transform on the sphere.
Functionality to compute specified plane of the Wigner dl matrix.
Functionality to compute statistics of wavelet coefficients.
Functionality to handle errors that may occur in the S2DW
library. Public S2DW error codes are defined, with corresponding
private error comments and default halt execution status.
Functionality to read and write S2DW formatted fits files containing
wavelet and scaling coefficients.
Definition of intrinsic types and constants used in the S2DW library.
Computes the S2DW wavelet and scaling coefficients of a Healpix sky map.
Reconstructs a Healpix sky map from S2DW wavelet and scaling coefficients.
Performs S2DW transform analysis and synthesis and check that the
original signal is reconstructed exactly (to numerical precision).
Note that this utility program does not deal with real space
representations of data on the sphere and hence does not require the
HEALPix or S2 packages.
Converts wavelet coefficients read from a S2DW formatted fits/matlab file
to a sky Healpix fits file.
Computes a Healpix sky map of wavelet for a given j for subsequent plotting.
Converts a fits S2DW file containing wavelet and scaling coefficients to
a matlab S2DW file.
Converts a matlab S2DW file containing wavelet and scaling coefficients
to a fits S2DW file.
Write S2DW data manipulated in Matlab to a S2DW m file that can be read
by Matlab and the S2DW Fortran code.
jason.mcewen AT ucl.ac.uk).
Authors: J. D. McEwen & Y. Wiaux
Version: 1.1 - August 2013
S2DW package to compute the scale discretised wavelet transform on the sphere
Copyright (C) 2008 Yves Wiaux & Jason McEwen
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details (LICENSE.txt).
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
We thank Gilles Puy very much for testing the S2DW code.
The code to compute Wigner dl functions was provided by Daniel Mortlock.
This documentation has been generated largely by f90doc, with some minor modifications.
Last modified: December 2008