healpy

HealPix / Healpy: Creat healpix map from (MODIS) satellite data


I’m planing to map satellite data from MODIS onto a sphere and I thought Healpix could be the right way to do it. However, I don't know how to go about it:

Does the input map need to be in FITS format or could I read an HDF4 MODIS data file into an array (with python) and then use healpy to map it onto a sphere?

I came across this answer: https://stackoverflow.com/a/50495134/7157742 and hoped that something similar would be possible in my case. Any suggestions?


Solution

  • Yes, you can use a standard numpy array.

    You need to map your data into the right HEALPix pixel. To do so you can get arrays of colatitude theta and longitude phi of your data and then find to which pixel they map to using hp.ang2pix.

    Then you can create a 1D array healpy map and work with it.

    See an example Jupyter Notebook https://gist.github.com/zonca/680c68c3d60697eb0cb669cf1b41c324