reproject.reproject_to_healpix(input_data, coord_system_out, hdu_in=None, order='bilinear', nested=False, nside=128)[source]

Reproject data from a standard projection to a HEALPIX projection.


This function uses healpy, which is licensed under the GPLv2, so any package using this funtions has to (for now) abide with the GPLv2 rather than the BSD license.


input_data : str or HDUList or PrimaryHDU or ImageHDU or tuple

The input data to reproject. This can be:

  • The name of a FITS file
  • An HDUList object
  • An image HDU object such as a PrimaryHDU or ImageHDU instance
  • A tuple where the first element is a ndarray and the second element is either a WCS or a Header object

coord_system_out : BaseCoordinateFrame or str

The output coordinate system for the HEALPIX projection

hdu_in : int or str, optional

If input_data is a FITS file or an HDUList instance, specifies the HDU to use.

order : int or str, optional

The order of the interpolation (if mode is set to 'interpolation'). This can be either one of the following strings:

  • ‘nearest-neighbor’
  • ‘bilinear’
  • ‘biquadratic’
  • ‘bicubic’

or an integer. A value of 0 indicates nearest neighbor interpolation.

nested : bool

The order of the healpix_data, either nested (True) or ring (False)

nside : int, optional

The resolution of the HEALPIX projection.


array_new : ndarray

The reprojected array

footprint : ndarray

Footprint of the input array in the output array. Values of 0 indicate no coverage or valid values in the input image, while values of 1 indicate valid values.