簡體   English   中英

HealPix 中不同的 Nside 值對應不同的 a_lm 系數值

[英]Different values of a_lm coefficients for different values of Nside in HealPix

我正在使用 HealPix 來計算粒子通過具有一定半徑的球體的流出率,並且我正在嘗試確定球諧函數的系數(基本上用球諧函數擬合一些數據)。

基本步驟是:

#I create a HealPix map of the outflow rate (values of the rate for every pixel) called dotM_map with a resolution determined by the nside parameter.
nside = 8
dotM_map = some_function(nside, ...)

#Then I calculate a_lm coefficients of spherical harmonics for this map.
a_lm = hp.map2alm(dotM_map,lmax=2)

但是,如果我為相同的 lmax 值更改 map 的分辨率(更改 nside),我會得到不同的系數值(不同的 a_lm 值)。 我嘗試從系數中復制初始的 map

sph_harm_map = hp.alm2map(a_lm,nside=nside)

結果非常吻合。 為什么 a_lm 的值對於不同的 nside 不同? 我怎樣才能獲得不依賴於 nside 的 a_lm 系數?

我嘗試使用像素權重作為

a_lm = hp.map2alm(hpxmap,lmax=2,use_weights=True)

但沒有明顯改善。 我也試過

a_lm = hp.map2alm(hpxmap,lmax=2,use_pixel_weights=True)

但我收到一個錯誤:urllib.error.URLError: <urlopen error Unable to open any source: Exceptions were {'https.//healpy.github.io/healpy-data/full_weights/healpix_full_weights_nside_0008:fits': <HTTPError 404, “未找到”>:“https.//github.com/healpy/healpy-data/releases/download/full_weights/healpix_full_weights_nside_0008:fits”:<HTTPError 404:“未找到”>}>

為什么會這樣? 如果有必要,我可以舉一個最小的例子。

為了獲得相同的 a_lm 系數值,有必要使用像素表面對單個像素的值進行歸一化 - 除以 4*pi/npix。

另一件事,以防萬一它可能對某人有幫助。 流出率可以很容易地計算出

npix = healpy.nside2npix(nside) # total number of Healpix pixels on the sphere at a given Nside
pix = healpy.ang2pix(nside, theta, phi) # tells you in which pixel is each particle, considering the exact pixel boundary
count, edge = numpy.histogram(pix, bins=np.arange(npix+1)) # count is the number of particles in each Healpix pixel

並計算 (count2 - count2)/(t2-t1),其中 count2 = count(t2) 和 count1 = count(t1) 是兩個不同時間單個像素中的粒子數。

感謝 HealPix 的支持,Eric Hivon。 謝謝!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM