/home/adeel

An overview of Hierarchical Progressive Surveys (HiPS) and the HEALPix framework

The Hierarchical Progressive Surveys (HiPS) is a scheme for describing astronomical images and provides a solution for managing large amounts of data. Underneath, HiPS utilizes the HEALPix framework for mapping a sphere (in this case, part of a sky) and transforms it into HiPS tiles and HiPS pixels which contain the astronomical data. The HiPS scheme emphasizes on usability, and abstracts the scientific details to reach a wider audience. This can be further built upon for statistical analysis of large datasets. A brief overview of HEALPix is given below before moving onto the working of HiPS.

Introduction to HEALPix

HEALPix, an acronym of ‘Hierarchical Equal Area isoLatitude Pixelization of a sphere’, is a framework for discretizing high resolution data. It was devised at NASA’s Jet Propulsion Laboratory. The software is available in C, C++, Fortran90, IDL, Java, and Python. The main features provided by the software library include:

  • Pixel manipulation
  • Spherical Harmonics Transforms
  • Visualization
  • Input / Output (with support for FITS files)

In a nutshell, the pixelization procedure divides a spherical sphere in which each pixel is equidistant from the origin, i.e. all pixels cover the same surface area. This produces a HEALPix grid, which has the interesting property that all pixels are distributed on lines of constant latitude. Due to this iso-latitude distribution of pixels the complexity for computing integrals over each harmonics is N1/2.

HEALPix provides a standard format for storing data in FITS files. There are numerous software packages that can work with HEALPix data. For this GSoC project, healpy will be used which is an abstraction of the HEALPix C++ package. There also exist other packages, such as Aladin Lite. The main functionality required for this project is HEALPix pixel index to sky coordinate transformation (and vice-versa), and a method to list HEALPix pixels in a given region of the sky (e.g. query_disc from healpy).

Pixel numbering schemes

HEALPix provides two numbering schemes for pixels, namely the RING scheme and NESTED scheme.

  • RING scheme In this scheme the pixels are counted down from the north to south along each iso-latitude ring.
  • NESTED scheme This scheme arranges the pixels into 12 tree structures with respect to their base-resolution pixels.

HEALPix projection

Introduction to HiPS

HiPS is the hierarchical tiling mechanism which allows one to access, visualize and browse image data.

HiPS working

The multi-resolution representation of original images provides the basis for visualizing data in a progressive way, as the pixels that are required for a given view can be accessed through pre-computed HEALPix maps, and the nested pixel numbering scheme provides a simple hierarchical indexing system that encodes pixel inheritance across different orders.

HiPS scheme groups pixels into different tiles. The general relationship between tiles and pixels is that a tile with n-tile pixels along each side forms a HEALPix mesh of order ktile. Tiles store map information from HEALPix and are presented as square arrays. It is possible to store them in different file formats. The files are organized into different directories. Here, tiles are used as files and tile orders are used for grouping data in directories which follow a naming convention. For more information on the method used for file storage, this provides a brief description.

HiPS pixels

HiPS pixels are defined in the hips_pixel_bitpix header and are stored in BITPIX code. hips_pixel_bitpix refers to the data type used for storing a FITS tile (a value of 8 represents 8-bit integers, -32 represents simple floating points, and -64 represents double precision floating points).

This is usually the same value as the BITPIX value of the original images (described in keyword data_pixel_bitpix), but might be different, notably for HiPS built from heterogeneous origins. The BITPIX value is always present in the HiPS FITS tiles.

HiPS tiles

As it is cumbersome to transfer each pixel (which will essentially be a single file), HiPS scheme groups pixels into what they call a tile. The general relationship between the tiles and pixels is that a tile with n-tile pixels along each side forms a HEALPix mesh of order k-tile. A HiPS tile is show below.

A HiPS tile

HiPS images

The way HiPS represents images is by re-sampling them onto a HEALPix grid at the maximum desired order, denoted by kmax. It then generates tiles based on tile orders. When mosaicking / stitching images, the angular resolution is taken into account. There are various methods for filling the data region when stitching images and dealing with background differences. The kmax determines minimum pixel size which is near to the angular pixel size or the resolution of original data.

Next important thing is whether to emphasize on display quality or photometric accuracy. This varies for each specific use case. Image encoding can be done either in FITS, PNG, or the JPG file format. For most cases it is enough to only generate FITS and PNG files. The lowest order pixel values correspond to a large area of the sky. The HiPS indexing structure takes care of mapping correct tiles onto a display.

HiPS generation for huge amounts of data such as the Hubble Space Telescope requires planning of system growth.

HiPS catalogues

A HiPS catalogue contains the RA (right ascension) / DEC (declination) coordinates stored in a TSV file. The data is ASCII tab separated and is organized into various directories in the same way as HiPS images.

Google Summer of Code 2017 project

I have been selected for creating this package as part of Google Summer of Code program, along with my mentors, Christoph Deil and Thomas Boch. My application proposal can be found on GitHub. The goal of this project is to design and create a Python client for Hierarchical Progressive Surveys (HiPS). The library will extend a low and high level API for exploring and creating WCS / HEALPix images.

Currently, there are other clients built using HiPS, such as Aladin and Aladin Lite, but they are written in Java and JavaScript, respectively. Once the proposed functionality is complete, additional features such as measuring fluxes and overplotting multi-wavelength data might be added. The code repository for this project can be found on GitHub.

If anyone has any questions or suggestions regarding the package, they are encouraged to open issues on GitHub. If you want to help us build the package or add extra features onto it, please open up a pull request.

The coding period is about to begin and my future blog posts will be based around this topic.