libsharp's main functionality is the conversion between maps on the sphere and spherical harmonic coefficients (or a_lm). A map is defined as a set of rings, which in turn consist of individual pixels that
The a_lm array is a one-dimensional array of type complex float or complex double, which contains all spherical harmonic coefficients for a full or partial set of m quantum numbers with 0<=m<=mmax and m<=l<=lmax. There is only one constraint on the internal structure of the array, which is:
Index[a_l+1,m] = Index[a_l,m] + stride
That means that coefficients with identical m but different l can be interpreted as a one-dimensional array in l with a unique stride.
Several functions are provided for efficient index computation in this array; they are documented here.
Information about a pixelisation of the sphere is stored in objects of type sharp_geom_info. It is possible to create such an object for any supported pixelisation by using the function sharp_make_geometry_info(); however, several easier-to-use functions are supplied for generating often-used pixelisations like ECP grids, Gaussian grids, and Healpix grids.
Currently, libsharp supports the following kinds of transforms:
libsharp supports shared-memory parallelisation via OpenMP; this feature will be automatically enabled if the compiler supports it.
Libsharp will also make use of SSE2 and AVX instructions when compiled for a platform known to support them.
Support for MPI-parallel transforms is also available; in this mode, every MPI task must provide a unique subset of the map and a_lm coefficients.
The spherical harmonic transforms can be executed on double-precision and single-precision maps and a_lm, but for accuracy reasons the computations will always be performed in double precision. As a consequence, single-precision transforms will most likely not be faster than their double-precision counterparts, but they will require significantly less memory.