根据 Healpy/Healpix 文档,我无法理解天空图中的一个像素(这是一些测量值)与 Healpyhealpy.sphtfunc.map2alm
函数产生的球谐系数之间的关系,该函数计算给定地图的 a_lm 系数数组。(这个问题也适用于 anafast。)
我的理解是一个给定的像素应该对应一个球谐系数。然而,事实并非如此。完全没有。
拿一张地图nside = 8
。本程序使用Healpy读取FITS格式的CMB图,手动设置nside
值,读入图,显示,然后计算球谐系数。
import math
import matplotlib.pyplot as plt
import numpy as np
import healpy as hp
import pyfits as pf
filename = "cmb_map.fits" # the name of the full-sky map
readmap = hp.read_map(filename) # readmap i.e. input map
nside = 8 # manually input the side value
'''
Here outputs:
NSIDE = 8
ORDERING = RING in fits file
'''
view = hp.mollview(readmap) # view the map, i.e. display it
'''
Shows sky map of the CMB
'''
totalnumberpixels = hp.nside2npix(nside)
print totalnumberpixels # For nside = 8, this should be 12*nside**2 = 768
arr = hp.map2alm(readmap) # This is an array of a_lm values
到目前为止,一切都很好。该hp.map2alm()
函数现在返回 300 个值,即 300 个球谐系数 a_lm。
arr.shape
输出“ (300,) ”。
为什么 768 像素会计算为 300 a_lm 值?nside
球谐系数和球谐系数总数之间是否存在数学关系?每个都nside
给出不同数量的 a_lm 系数吗?
计算一个a_lm需要多少像素?非常感谢任何帮助/解释!
编辑:如下所述,像素总数为npix = 12*nside**2
. map2alm
使用默认值lmax = 3*nside-1
。所以,球谐系数的总数应该是奇数之和,直到3*nside-1=23
. 球谐系数的总数应该是(2*lmax+1)**2 = (6*nside-1)**2。(2*lmax+1)^2=(2*23+1)^2 = (47)^2 = 2209。那么,这个数字 300 是从哪里来的呢?究竟在map2alm
做什么?这怎么可能只是一个近似值?
我预计 2209 a_lm。我算了300。