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

Pixelization(uint8_t order)

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

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].

uint32_t nPix() const

Returns the number of pixels of the pixelization.

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.

uint8_t getMaxOrder() const

Returns the maximum possible pixelization order.

uint8_t getOrder() const

Returns healpix order.

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

Public Static Functions

uint32_t nPix(uint8_t order)

Returns the number of pixels given by healpix order.

uint8_t pix2Order(uint32_t pix)

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