pythonmathhealpy

Why do healpix "alm" routines return arrays l and m of the same length?


From what I remember of my quantum physics and university maths, for every mode l, there exists m = l-1, l, l+1. Why do healpix (in my case, specifically healpy) spherical harmonic routines, e.g. healpy.sphtfunc.alm2map, return arrays of l and m that are the same length?


Solution

  • I think you are referring to map2alm.

    Let's check an example:

    import numpy as np
    import healpy as hp
    m = np.arange(12) # define a map
    lmax = 2
    alm = hp.map2alm(m, lmax=lmax) # spherical armonic transform
    print(alm)
    [  1.94198894e+01 +0.00000000e+00j  -1.22780488e+01 +0.00000000e+00j
      -3.22928935e-01 +0.00000000e+00j   6.85510448e-01 -2.13069336e+00j
       4.66136940e-16 +6.36302781e-18j  -6.44680479e-01 +1.16180552e+00j]
    print(alm.shape)
    (6,)
    

    So alm is actually a 1D vector.

    How is alm indexed?

    l, m = hp.Alm.getlm(lmax=lmax)
    print(l)
    [0 1 2 1 2 2]
    print(m)
    [0 0 0 1 1 2]
    

    So, for l = 2, m is [0, 1, 2].

    You can find out more about HEALPix in the HEALPix primer: http://healpix.jpl.nasa.gov/pdf/intro.pdf