Class Pixelization

Class Documentation

class Pixelization

Every communication with healpix is done through this class to avoid bugs with missmatching coordinates (and make python hooks easier)

Public Functions

inline Pixelization()
inline Pixelization(uint8_t order)

Constructor creating Pixelization with healpix order 6 (about 50000 pixels)

inline ~Pixelization()
uint32_t direction2Pix(double longitude, double latitude) const

Returns the number of the pixel which includes the direction (phi,theta) phi in [-pi, pi], theta in [-pi/2, pi/2].

inline uint32_t nPix() const

Returns the number of pixels of the pixelization.

inline int getNumberOfPixels()

Returns the number of pixels of the pixelization.

void pix2Direction(uint32_t i, double &longitude, double &latitude) const

Gives the center of pixel i in longitude [rad] and latitude [rad].

double angularDistance(uint32_t i, uint32_t j) const

Calculate the angle [rad] between the vectors pointing to pixels i and j.

inline uint8_t getMaxOrder() const

Returns the maximum possible pixelization order.

inline uint8_t getOrder() const

Returns healpix order.

void getRandomDirectionInPixel(uint32_t pixel, double &longitude, double &latitude)
inline void getPixelsInCone(double longitude, double latitude, double radius, std::vector<int> &listpix)

Public Static Functions

static uint32_t nPix(uint8_t order)

Returns the number of pixels given by healpix order.

static uint8_t pix2Order(uint32_t pix)

Returns the order, a given pixel number corresponds to. 0 if no match!