The SKIRT project
advanced radiative transfer for astrophysics
Classes | Functions
pts.simulation.healpix Namespace Reference

Handling of HEALPix grids. More...

Classes

class  HEALPixGrid
 This class represents a HEALPix grid. More...
 

Functions

def getDistanceOnSky (thetaA, phiA, thetaB, phiB)
 Get the shortest distance (in radians) between two points (A, B) on the celestial sphere with the given zenith and azimuth. More...
 
def getEmptyHEALPixGrid (order, numValuesPerPixel=1)
 Construct a new, empty HEALPixGrid of the given order and with the given number of values per pixel. More...
 

Detailed Description

Handling of HEALPix grids.

This module offers functionality to work with HEALPix grids output by the HEALPixSkyInstrument.

Function Documentation

◆ getDistanceOnSky()

def pts.simulation.healpix.getDistanceOnSky (   thetaA,
  phiA,
  thetaB,
  phiB 
)

Get the shortest distance (in radians) between two points (A, B) on the celestial sphere with the given zenith and azimuth.

The distance can easily be derived by realizing that the angle between the unit vectors pointing to A and B is given by

δ=arccosrA˙rB.

In spherical coordinates, the dot product of the two unit vectors with sky coordinates (θA,ϕA) and (θB,ϕB) yields

rA˙rB=sinθAsinθB(cosϕAcosϕB+sinϕAsinϕB)+cosθAcosθB=sinθAsinθBcos(ϕAϕB)+cosθAcosθB=12[cos(θAθB)cos(θA+θB)]cos(ϕAϕB)+12[cos(θAθB)+cos(θA+θB)].

◆ getEmptyHEALPixGrid()

def pts.simulation.healpix.getEmptyHEALPixGrid (   order,
  numValuesPerPixel = 1 
)

Construct a new, empty HEALPixGrid of the given order and with the given number of values per pixel.

The order k relates to the HEALPix parameter Nside=2k, which gives the number of pixels along one axis of the 12 HEALPix base pixels. The total number of pixels is then given by 12Nside2. Each pixel has the exact same size, π3Nside2. Assuming square pixels (which is approximately true), the angular resolution R can be computed from

Rπ3Nside2=1Nside(108003π)(3520Nside)

For example, most Planck maps are published with an order k=10, which corresponds to a resolution of 3.4 (nominally 5). k=6 would correspond to a resolution of 1.