How do HEALPix FITS files of CMB maps translate into ndarrays? What are the coordinates?

青春壹個敷衍的年華 提交于 2019-12-25 02:53:03

问题


I'm using Healpy (the HEALPix tools developed in Python) to read and write full-sky CMB maps.

I am confused as to how the coordinates of pixels on a sky map translates into entries of a numpy ndarray. How does one HEALPix pixel in a FITS file translate into an ndarray entry?

For example, let's say I have a generated CMB map, Nside=64, lmax=64, using the default RING scheme. The total number of pixels is given by Npix=12*Nside**2. So, for my example, that is 49152 total number of pixels.

The FITS file I have is in the format 1 column by 48 rows. (The 1 column is all temperature values.) So, I transform this file into a n-dim numpy ndarray. The shape of this array gives (48,1024).

Question 1: Is this 2-d array a projection of all the map pixels on the sky into "matrix" form? I think it is. Using my example, 48*1024 = 49152, the total number of pixels.

Question 2: Where does the 1024 standard come from? What does this mean in terms of a HEALPix map and its coordinates? How does one 2-dim ndarray entry (pixel) relate to another (by angle, by HEALPix position, etc.)?

For another example, map Nside=1024. When I convert this into a 2-dimensional ndarray, I get the shape (12288, 1024).

EDIT: Why does this convention of 1024-element arrays exist? How does this correspond to the pixel coordinates on a map?


回答1:


the best source of information about the HEALPIX pixelization is the Healpix primer:

http://healpix.jpl.nasa.gov/html/intro.htm

A map is a 1-dimensional vector, each index is a pixel in the sky. you can turn pixel number into coordinates in the sky using hp.pix2ang.

Shaping it in rows of 1024 is just a trick to make read/write to disk faster.



来源:https://stackoverflow.com/questions/29682518/how-do-healpix-fits-files-of-cmb-maps-translate-into-ndarrays-what-are-the-coor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!