healpy.sphtfunc.Alm.getidx

static Alm.getidx(lmax, l, m)

Returns index corresponding to (l,m) in an array describing alm up to lmax.

In HEALPix C++ and healpy, \(a_{lm}\) coefficients are stored ordered by \(m\). I.e. if \(\ell_{max}\) is 16, the first 16 elements are \(m=0, \ell=0-16\), then the following 15 elements are \(m=1, \ell=1-16\), then \(m=2, \ell=2-16\) and so on until the last element, the 153th, is \(m=16, \ell=16\).

Parameters:
lmaxint

The maximum l, defines the alm layout

lint

The l for which to get the index

mint

The m for which to get the index

Returns:
idxint

The index corresponding to (l,m)