<p>I am currently tasked with creating a visual of a recently completed survey which is in <a href="https://en.wikipedia.org/wiki/HEALPix" rel="nofollow noreferrer">HEALPix</a><sup>1</sup> format. I am also required to use the DSS and Planck skymaps also in HEALPix, and would like to flatten the sky across an image which can be scrolled.</p>
<p>I found HIPS which is a python module which does projections and stitches tiles together depending on the below parameters:</p>
<ul>
<li>width, height (in pixels)</li>
<li>RA, DEC</li>
<li>icrs or galactic frame</li>
<li>fov</li>
<li>projection (of which there are 28)</li>
</ul>
<p>Am I to assume that since healpix has equal pixel area in the sky, so generating tiles at intervals between {0, 360} and {-90, 90} at say 45 degree fov using a particular projection will give me tiles that can be stitched into a large 2D image?</p>
<p>So far I've tried the aitoff projection which does not work, and am looking at cylindrical or mercator but I am not an astrophysicist so would like some pointers.</p>
<p>note: I've read the HEALPix primer (linked below), and it makes sense from flat to spherical, but the other way around will create warps unless one uses some <a href="https://en.wikipedia.org/wiki/Affine_transformation" rel="nofollow noreferrer">affine transforms</a>.</p>
<hr />
<ul>
<li><a href="https://gamma-astro-data-formats.readthedocs.io/en/latest/skymaps/healpix/index.html" rel="nofollow noreferrer">documentation</a></li>
<li><a href="https://healpix.jpl.nasa.gov/pdf/intro.pdf" rel="nofollow noreferrer">The HEALPix Primer</a></li>
<li><a href="https://healpix.jpl.nasa.gov" rel="nofollow noreferrer">https://healpix.jpl.nasa.gov</a></li>
</ul>

CC BY-SA 4.0
2021-06-29T01:39:17.500Z
I've added some links that may be helpful to readers unfamiliar with this, including one to the primer you mention, and some relevant tags. *cool question!*
uhoh
CC BY-SA 4.0
2021-06-29T08:16:32.087Z
Hi triple7, what do you mean by "it does not work"? In HEALPix you don't generate tiles by specifying intervals in RA and dec (and specifying in {0,360} and {–90,90} would be missing a sin(dec) factor), but by specifying two values (H and K) which hierarchically tessellate the sphere into curvilinear quadrilaterals, and which can only have certain values. I'm not familiar with HiPS, but as far as I can see it uses the HEALPix algorithm for partitioning the sky, such that each HEALPix tile then contain whatever data would be associated with that region.
pela
CC BY-SA 4.0
2021-06-29T13:10:45.983Z
@pela yes got it!
uhoh
CC BY-SA 4.0
2021-06-29T21:18:57.570Z
@pela, thanks for asking. yes, I understand healpix is a hierarchical algorithm which structures pixels in such a way that every pixel has equal area and can be subdivided into 4 other pixels which will then represent a higher resolution of the area on a spherical map. I would like to flatten the entire sky into one 2D map which can then be used for infinite scrolling on both axes.
triple7
CC BY-SA 4.0
2021-06-30T08:32:47.493Z
I'm not very familiar with HEALPix, and have only used it with a Mollweide projection,  but the standard, H=4, K=3 projection _is_ infinitely scrollable (in the RA direction): See [here](https://observablehq.com/@redblobgames/tissots-indicatrix-for-healpix).
pela
CC BY-SA 4.0
2021-07-06T05:23:11.880Z
@pela I've tried stereographic and CAR. Seems the former is good for 2D and latter for 3D spherical mapping as mentioned in the cds website. However, I'm trying to validate my assumptions on the relationship between Ra/Dec, fov, width/height, projection and HIPS so I can create some hierarchical flat maps which increase in resolution as I zoom in.
triple7
CC BY-SA 4.0
2021-07-06T06:32:46.697Z
Okay, I understand (I think), but I'm not able to help with that. Sorry :\
pela
<python><image-processing><fits><projection>
healpix: creating isometric tiles for flat map of survey
triple7
# healpix: creating isometric tiles for flat map of survey

(Asked by: username_0 on 2021-06-29)

I am currently tasked with creating a visual of a recently completed survey which is in [HEALPix](https://en.wikipedia.org/wiki/HEALPix)1 format. I am also required to use the DSS and Planck skymaps also in HEALPix, and would like to flatten the sky across an image which can be scrolled.

I found HIPS which is a python module which does projections and stitches tiles together depending on the below parameters:

* width, height (in pixels)
* RA, DEC
* icrs or galactic frame
* fov
* projection (of which there are 28)

Am I to assume that since healpix has equal pixel area in the sky, so generating tiles at intervals between {0, 360} and {-90, 90} at say 45 degree fov using a particular projection will give me tiles that can be stitched into a large 2D image?

So far I've tried the aitoff projection which does not work, and am looking at cylindrical or mercator but I am not an astrophysicist so would like some pointers.

note: I've read the HEALPix primer (linked below), and it makes sense from flat to spherical, but the other way around will create warps unless one uses some [affine transforms](https://en.wikipedia.org/wiki/Affine_transformation).

---

* [documentation](https://gamma-astro-data-formats.readthedocs.io/en/latest/skymaps/healpix/index.html)
* [The HEALPix Primer](https://healpix.jpl.nasa.gov/pdf/intro.pdf)
* <https://healpix.jpl.nasa.gov>

**Tags:** python, image-processing, fits, projection

> **Comments:**
> **username_1**: I've added some links that may be helpful to readers unfamiliar with this, including one to the primer you mention, and some relevant tags. *cool question!*  
> **username_2**: Hi username_0, what do you mean by "it does not work"? In HEALPix you don't generate tiles by specifying intervals in RA and dec (and specifying in {0,360} and {–90,90} would be missing a sin(dec) factor), but by specifying two values (H and K) which hierarchically tessellate the sphere into curvilinear quadrilaterals, and which can only have certain values. I'm not familiar with HiPS, but as far as I can see it uses the HEALPix algorithm for partitioning the sky, such that each HEALPix tile then contain whatever data would be associated with that region.  
> **username_1**: @username_2 yes got it!  
> **username_0**: @username_2, thanks for asking. yes, I understand healpix is a hierarchical algorithm which structures pixels in such a way that every pixel has equal area and can be subdivided into 4 other pixels which will then represent a higher resolution of the area on a spherical map. I would like to flatten the entire sky into one 2D map which can then be used for infinite scrolling on both axes.  
> **username_2**: I'm not very familiar with HEALPix, and have only used it with a Mollweide projection,  but the standard, H=4, K=3 projection _is_ infinitely scrollable (in the RA direction): See [here](https://observablehq.com/@redblobgames/tissots-indicatrix-for-healpix).  
> **username_0**: @username_2 I've tried stereographic and CAR. Seems the former is good for 2D and latter for 3D spherical mapping as mentioned in the cds website. However, I'm trying to validate my assumptions on the relationship between Ra/Dec, fov, width/height, projection and HIPS so I can create some hierarchical flat maps which increase in resolution as I zoom in.  
> **username_2**: Okay, I understand (I think), but I'm not able to help with that. Sorry :\  

---

## 0 answers

