LevelS SHT library  3.50
Enumerations | Functions
Helpers for dealing with a_lm

Enumerations

enum  sharp_almflags { SHARP_PACKED = 1, SHARP_REAL_HARMONICS = 1<<6 }
 

Functions

void sharp_make_triangular_alm_info (int lmax, int mmax, int stride, sharp_alm_info **alm_info)
 
void sharp_make_rectangular_alm_info (int lmax, int mmax, int stride, sharp_alm_info **alm_info)
 
void sharp_make_mmajor_real_packed_alm_info (int lmax, int stride, int nm, const int *ms, sharp_alm_info **alm_info)
 
void sharp_make_alm_info (int lmax, int mmax, int stride, const ptrdiff_t *mstart, sharp_alm_info **alm_info)
 
void sharp_make_general_alm_info (int lmax, int nm, int stride, const int *mval, const ptrdiff_t *mvstart, int flags, sharp_alm_info **alm_info)
 
ptrdiff_t sharp_alm_index (const sharp_alm_info *self, int l, int mi)
 
ptrdiff_t sharp_alm_count (const sharp_alm_info *self)
 
void sharp_destroy_alm_info (sharp_alm_info *info)
 

Detailed Description

Enumeration Type Documentation

◆ sharp_almflags

alm_info flags

Enumerator
SHARP_PACKED 

m=0-coefficients are packed so that the (zero) imaginary part is not present. mvstart is in units of real float/double for all m; stride is in units of reals for m=0 and complex for m!=0

SHARP_REAL_HARMONICS 

Use the real spherical harmonic convention. For m==0, the alm are treated exactly the same as in the complex case. For m!=0, alm[i] represent a pair (+abs(m), -abs(m)) instead of (real, imag), and the coefficients are scaled by a factor of sqrt(2) relative to the complex case. In other words, (sqrt(.5) * alm[i]) recovers the corresponding complex coefficient (when accessed as complex).

Definition at line 89 of file sharp_lowlevel.h.

Function Documentation

◆ sharp_make_triangular_alm_info()

void sharp_make_triangular_alm_info ( int  lmax,
int  mmax,
int  stride,
sharp_alm_info **  alm_info 
)

Initialises an a_lm data structure according to the scheme used by Healpix_cxx.

Definition at line 35 of file sharp_almhelpers.c.

◆ sharp_make_rectangular_alm_info()

void sharp_make_rectangular_alm_info ( int  lmax,
int  mmax,
int  stride,
sharp_alm_info **  alm_info 
)

Initialises an a_lm data structure according to the scheme used by Fortran Healpix

Definition at line 54 of file sharp_almhelpers.c.

◆ sharp_make_mmajor_real_packed_alm_info()

void sharp_make_mmajor_real_packed_alm_info ( int  lmax,
int  stride,
int  nm,
const int *  ms,
sharp_alm_info **  alm_info 
)

Initialises alm_info for mmajor, real, packed spherical harmonics. Pass mmax + 1 to nm and NULL to ms in order to use everything; otherwise you can pick a subset of m to process (should only be used for MPI parallelization).

Definition at line 72 of file sharp_almhelpers.c.

◆ sharp_make_alm_info()

void sharp_make_alm_info ( int  lmax,
int  mmax,
int  stride,
const ptrdiff_t *  mstart,
sharp_alm_info **  alm_info 
)

Creates an a_lm data structure from the following parameters:

Parameters
lmaxmaximum l quantum number (>=0)
mmaxmaximum m quantum number (0<= mmax <= lmax)
stridethe stride between entries with identical m, and l differing by 1.
mstartthe index of the (hypothetical) coefficient with the quantum numbers 0,m. Must have mmax+1 entries.
alm_infowill hold a pointer to the newly created data structure

Definition at line 161 of file sharp.c.

◆ sharp_make_general_alm_info()

void sharp_make_general_alm_info ( int  lmax,
int  nm,
int  stride,
const int *  mval,
const ptrdiff_t *  mvstart,
int  flags,
sharp_alm_info **  alm_info 
)

Creates an a_lm data structure which from the following parameters:

Parameters
lmaxmaximum l quantum number (>=0)
nmnumber of different m (0<=nm<=lmax+1)
stridethe stride between entries with identical m, and l differing by 1.
mvalarray with nm entries containing the individual m values
mvstartarray with nm entries containing the (hypothetical) indices of the coefficients with the quantum numbers 0,mval[i]
flagsa combination of sharp_almflags (pass 0 unless you know you need this)
alm_infowill hold a pointer to the newly created data structure

Definition at line 143 of file sharp.c.

◆ sharp_alm_index()

ptrdiff_t sharp_alm_index ( const sharp_alm_info *  self,
int  l,
int  mi 
)

Returns the index of the coefficient with quantum numbers l, mval[mi].

Note
for a sharp_alm_info generated by sharp_make_alm_info() this is the index for the coefficient with the quantum numbers l, mi.

Definition at line 171 of file sharp.c.

◆ sharp_alm_count()

ptrdiff_t sharp_alm_count ( const sharp_alm_info *  self)

Returns the number of alm coefficients described by self. If the SHARP_PACKED flag is set, this is number of "real" coeffecients (for m < 0 and m >= 0), otherwise it is the number of complex coefficients (with m>=0).

Definition at line 178 of file sharp.c.

◆ sharp_destroy_alm_info()

void sharp_destroy_alm_info ( sharp_alm_info *  info)

Deallocates the a_lm info object.

Definition at line 191 of file sharp.c.


Generated on Mon Dec 10 2018 10:24:20 for LevelS SHT library