Healpix C++
3.83
|
#include <healpix_base.h>
Public Member Functions | |
T_Healpix_Base () | |
T_Healpix_Base (int order, Healpix_Ordering_Scheme scheme) | |
T_Healpix_Base (I nside, Healpix_Ordering_Scheme scheme, const nside_dummy) | |
void | Set (int order, Healpix_Ordering_Scheme scheme) |
void | SetNside (I nside, Healpix_Ordering_Scheme scheme) |
double | ring2z (I ring) const |
I | pix2ring (I pix) const |
I | nest2ring (I pix) const |
I | ring2nest (I pix) const |
I | nest2peano (I pix) const |
I | peano2nest (I pix) const |
I | zphi2pix (double z, double phi) const |
I | ang2pix (const pointing &ang) const |
I | vec2pix (const vec3 &vec) const |
void | pix2zphi (I pix, double &z, double &phi) const |
pointing | pix2ang (I pix) const |
vec3 | pix2vec (I pix) const |
I | pixel_import (I pix, const T_Healpix_Base &b) const |
void | query_disc (pointing ptg, double radius, rangeset< I > &pixset) const |
rangeset< I > | query_disc (pointing ptg, double radius) const |
void | query_disc_inclusive (pointing ptg, double radius, rangeset< I > &pixset, int fact=1) const |
rangeset< I > | query_disc_inclusive (pointing ptg, double radius, int fact=1) const |
void | query_disc (const pointing &dir, double radius, std::vector< I > &listpix) const |
void | query_disc_inclusive (const pointing &dir, double radius, std::vector< I > &listpix, int fact=1) const |
void | query_polygon (const std::vector< pointing > &vertex, rangeset< I > &pixset) const |
rangeset< I > | query_polygon (const std::vector< pointing > &vertex) const |
void | query_polygon_inclusive (const std::vector< pointing > &vertex, rangeset< I > &pixset, int fact=1) const |
rangeset< I > | query_polygon_inclusive (const std::vector< pointing > &vertex, int fact=1) const |
void | query_strip (double theta1, double theta2, bool inclusive, rangeset< I > &pixset) const |
rangeset< I > | query_strip (double theta1, double theta2, bool inclusive) const |
void | get_ring_info (I ring, I &startpix, I &ringpix, double &costheta, double &sintheta, bool &shifted) const |
void | get_ring_info2 (I ring, I &startpix, I &ringpix, double &theta, bool &shifted) const |
void | get_ring_info_small (I ring, I &startpix, I &ringpix, bool &shifted) const |
void | neighbors (I pix, fix_arr< I, 8 > &result) const |
void | get_interpol (const pointing &ptg, fix_arr< I, 4 > &pix, fix_arr< double, 4 > &wgt) const |
int | Order () const |
I | Nside () const |
I | Npix () const |
Healpix_Ordering_Scheme | Scheme () const |
bool | conformable (const T_Healpix_Base &other) const |
void | swap (T_Healpix_Base &other) |
double | max_pixrad () const |
double | max_pixrad (I ring) const |
void | boundaries (I pix, tsize step, std::vector< vec3 > &out) const |
Static Public Member Functions | |
static int | nside2order (I nside) |
static I | npix2nside (I npix) |
Protected Member Functions | |
I | ring_above (double z) const |
Protected Attributes | |
int | order_ |
I | nside_ |
Healpix_Ordering_Scheme | scheme_ |
Functionality related to the HEALPix pixelisation.
Definition at line 46 of file healpix_base.h.
T_Healpix_Base< I >::T_Healpix_Base | ( | ) |
Constructs an unallocated object.
Definition at line 746 of file healpix_base.cc.
|
inline |
Constructs an object with a given order and the ordering scheme scheme.
Definition at line 105 of file healpix_base.h.
|
inline |
Constructs an object with a given nside and the ordering scheme scheme. The nside_dummy parameter must be set to SET_NSIDE.
Definition at line 110 of file healpix_base.h.
|
inlineprotected |
Returns the number of the next ring to the north of z=cos(theta). It may return 0; in this case z lies north of all rings.
Definition at line 50 of file healpix_base.cc.
|
static |
Calculates the map order from its N_side parameter. Returns -1 if nside is not a power of 2.
nside | the N_side parameter |
Definition at line 38 of file healpix_base.cc.
|
static |
Calculates the N_side parameter from the number of pixels.
npix | the number of pixels |
Definition at line 43 of file healpix_base.cc.
void T_Healpix_Base< I >::Set | ( | int | order, |
Healpix_Ordering_Scheme | scheme | ||
) |
Adjusts the object to order and scheme.
Definition at line 750 of file healpix_base.cc.
void T_Healpix_Base< I >::SetNside | ( | I | nside, |
Healpix_Ordering_Scheme | scheme | ||
) |
Adjusts the object to nside and scheme.
Definition at line 763 of file healpix_base.cc.
double T_Healpix_Base< I >::ring2z | ( | I | ring | ) | const |
Returns the z-coordinate of the ring ring. This also works for the (not really existing) rings 0 and 4*nside.
Definition at line 778 of file healpix_base.cc.
I T_Healpix_Base< I >::pix2ring | ( | I | pix | ) | const |
Returns the number of the ring in which pix lies.
Definition at line 788 of file healpix_base.cc.
I T_Healpix_Base< I >::nest2ring | ( | I | pix | ) | const |
Translates a pixel number from NEST to RING.
Definition at line 807 of file healpix_base.cc.
I T_Healpix_Base< I >::ring2nest | ( | I | pix | ) | const |
Translates a pixel number from RING to NEST.
Definition at line 815 of file healpix_base.cc.
I T_Healpix_Base< I >::nest2peano | ( | I | pix | ) | const |
Translates a pixel number from NEST to its Peano index.
Definition at line 844 of file healpix_base.cc.
I T_Healpix_Base< I >::peano2nest | ( | I | pix | ) | const |
Translates a pixel number from its Peano index to NEST.
Definition at line 847 of file healpix_base.cc.
|
inline |
Returns the number of the pixel which contains the angular coordinates (z:=cos(theta), phi).
Definition at line 147 of file healpix_base.h.
|
inline |
Returns the number of the pixel which contains the angular coordinates ang.
Definition at line 152 of file healpix_base.h.
|
inline |
Returns the number of the pixel which contains the vector vec (vec is normalized if necessary).
Definition at line 162 of file healpix_base.h.
|
inline |
Returns the angular coordinates (z:=cos(theta), phi) of the center of the pixel with number pix.
Definition at line 176 of file healpix_base.h.
|
inline |
Returns the angular coordinates of the center of the pixel with number pix.
Definition at line 185 of file healpix_base.h.
|
inline |
Returns the vector to the center of the pixel with number pix.
Definition at line 193 of file healpix_base.h.
|
inline |
Returns the pixel number for this T_Healpix_Base corresponding to the pixel number pix in b.
Definition at line 210 of file healpix_base.h.
void T_Healpix_Base< I >::query_disc | ( | pointing | ptg, |
double | radius, | ||
rangeset< I > & | pixset | ||
) | const |
Returns the range set of all pixels whose centers lie within the disk defined by dir and radius.
dir | the angular coordinates of the disk center |
radius | the radius (in radians) of the disk |
pixset | a rangeset object containing the indices of all pixels whose centers lie inside the disk |
Definition at line 343 of file healpix_base.cc.
|
inline |
Returns the range set of all pixels whose centers lie within the disk defined by dir and radius.
dir | the angular coordinates of the disk center |
radius | the radius (in radians) of the disk |
Definition at line 236 of file healpix_base.h.
void T_Healpix_Base< I >::query_disc_inclusive | ( | pointing | ptg, |
double | radius, | ||
rangeset< I > & | pixset, | ||
int | fact = 1 |
||
) | const |
Returns the range set of all pixels which overlap with the disk defined by dir and radius.
dir | the angular coordinates of the disk center |
radius | the radius (in radians) of the disk |
pixset | a rangeset object containing the indices of all pixels overlapping with the disk. |
fact | The overlapping test will be done at the resolution fact*nside. For NESTED ordering, fact must be a power of 2, else it can be any positive integer. A typical choice would be 4. |
Definition at line 349 of file healpix_base.cc.
|
inline |
Returns the range set of all pixels which overlap with the disk defined by dir and radius.
dir | the angular coordinates of the disk center |
radius | the radius (in radians) of the disk |
fact | The overlapping test will be done at the resolution fact*nside. For NESTED ordering, fact must be a power of 2, else it can be any positive integer. A typical choice would be 4. |
Definition at line 268 of file healpix_base.h.
|
inline |
Definition at line 277 of file healpix_base.h.
|
inline |
Definition at line 285 of file healpix_base.h.
void T_Healpix_Base< I >::query_polygon | ( | const std::vector< pointing > & | vertex, |
rangeset< I > & | pixset | ||
) | const |
Returns a range set of pixels whose centers lie within the convex polygon defined by the vertex array.
vertex | array containing the vertices of the polygon. |
pixset | a rangeset object containing the indices of all pixels whose centers lie inside the polygon |
|
inline |
Returns a range set of pixels whose centers lie within the convex polygon defined by the vertex array.
vertex | array containing the vertices of the polygon. |
Definition at line 309 of file healpix_base.h.
void T_Healpix_Base< I >::query_polygon_inclusive | ( | const std::vector< pointing > & | vertex, |
rangeset< I > & | pixset, | ||
int | fact = 1 |
||
) | const |
Returns a range set of pixels which overlap with the convex polygon defined by the vertex array.
vertex | array containing the vertices of the polygon. |
pixset | a rangeset object containing the indices of all pixels overlapping with the polygon. |
fact | The overlapping test will be done at the resolution fact*nside. For NESTED ordering, fact must be a power of 2, else it can be any positive integer. A typical choice would be 4. |
|
inline |
Returns a range set of pixels which overlap with the convex polygon defined by the vertex array.
vertex | array containing the vertices of the polygon. |
fact | The overlapping test will be done at the resolution fact*nside. For NESTED ordering, fact must be a power of 2, else it can be any positive integer. A typical choice would be 4. |
Definition at line 340 of file healpix_base.h.
void T_Healpix_Base< I >::query_strip | ( | double | theta1, |
double | theta2, | ||
bool | inclusive, | ||
rangeset< I > & | pixset | ||
) | const |
Returns a range set of pixels whose centers lie within the colatitude range defined by theta1 and theta2 (if inclusive==false), or which overlap with this region (if inclusive==true). If theta1<theta2, the region between both angles is considered, otherwise the regions 0<theta<theta2 and theta1<theta<pi.
theta1 | first colatitude |
theta2 | second colatitude |
inclusive | if false, return the exact set of pixels whose pixels centers lie within the region; if true, return all pixels that overlap with the region. |
Definition at line 1083 of file healpix_base.cc.
|
inline |
Returns a range set of pixels whose centers lie within the colatitude range defined by theta1 and theta2 (if inclusive==false), or which overlap with this region (if inclusive==true). If theta1<theta2, the region between both angles is considered, otherwise the regions 0<theta<theta2 and theta1<theta<pi.
theta1 | first colatitude |
theta2 | second colatitude |
inclusive | if false, return the exact set of pixels whose pixels centers lie within the region; if true, return all pixels that overlap with the region. |
Definition at line 370 of file healpix_base.h.
void T_Healpix_Base< I >::get_ring_info | ( | I | ring, |
I & | startpix, | ||
I & | ringpix, | ||
double & | costheta, | ||
double & | sintheta, | ||
bool & | shifted | ||
) | const |
Returns useful information about a given ring of the map.
ring | the ring number (the number of the first ring is 1) |
startpix | the number of the first pixel in the ring (NOTE: this is always given in the RING numbering scheme!) |
ringpix | the number of pixels in the ring |
costheta | the cosine of the colatitude of the ring |
sintheta | the sine of the colatitude of the ring |
shifted | if true, the center of the first pixel is not at phi=0 |
Definition at line 1123 of file healpix_base.cc.
void T_Healpix_Base< I >::get_ring_info2 | ( | I | ring, |
I & | startpix, | ||
I & | ringpix, | ||
double & | theta, | ||
bool & | shifted | ||
) | const |
Returns useful information about a given ring of the map.
ring | the ring number (the number of the first ring is 1) |
startpix | the number of the first pixel in the ring (NOTE: this is always given in the RING numbering scheme!) |
ringpix | the number of pixels in the ring |
theta | the colatitude (in radians) of the ring |
shifted | if true, the center of the first pixel is not at phi=0 |
Definition at line 1150 of file healpix_base.cc.
|
inline |
Returns useful information about a given ring of the map.
ring | the ring number (the number of the first ring is 1) |
startpix | the number of the first pixel in the ring (NOTE: this is always given in the RING numbering scheme!) |
ringpix | the number of pixels in the ring |
shifted | if true, the center of the first pixel is not at phi=0 |
Definition at line 1100 of file healpix_base.cc.
void T_Healpix_Base< I >::neighbors | ( | I | pix, |
fix_arr< I, 8 > & | result | ||
) | const |
Returns the neighboring pixels of pix in result. On exit, result contains (in this order) the pixel numbers of the SW, W, NW, N, NE, E, SE and S neighbor of pix. If a neighbor does not exist (this can only be the case for the W, N, E and S neighbors), its entry is set to -1.
Definition at line 1178 of file healpix_base.cc.
void T_Healpix_Base< I >::get_interpol | ( | const pointing & | ptg, |
fix_arr< I, 4 > & | pix, | ||
fix_arr< double, 4 > & | wgt | ||
) | const |
Returns interpolation information for the direction ptg. The surrounding pixels are returned in pix, their corresponding weights in wgt.
Definition at line 1234 of file healpix_base.cc.
|
inline |
Returns the order parameter of the object.
Definition at line 425 of file healpix_base.h.
|
inline |
Returns the N_side parameter of the object.
Definition at line 427 of file healpix_base.h.
|
inline |
Returns the number of pixels of the object.
Definition at line 429 of file healpix_base.h.
|
inline |
Returns the ordering scheme of the object.
Definition at line 431 of file healpix_base.h.
|
inline |
Returns true, if both objects have the same nside and scheme, else false.
Definition at line 435 of file healpix_base.h.
void T_Healpix_Base< I >::swap | ( | T_Healpix_Base< I > & | other | ) |
Swaps the contents of two Healpix_Base objects.
Definition at line 1302 of file healpix_base.cc.
double T_Healpix_Base< I >::max_pixrad | ( | ) | const |
Returns the maximum angular distance (in radian) between any pixel center and its corners.
Definition at line 1314 of file healpix_base.cc.
double T_Healpix_Base< I >::max_pixrad | ( | I | ring | ) | const |
Returns the maximum angular distance (in radian) between any pixel center and its corners in a given ring.
Definition at line 1324 of file healpix_base.cc.
void T_Healpix_Base< I >::boundaries | ( | I | pix, |
tsize | step, | ||
std::vector< vec3 > & | out | ||
) | const |
Returns a set of points along the boundary of the given pixel. step=1 gives 4 points on the corners. The first point corresponds to the northernmost corner, the subsequent points follow the pixel boundary through west, south and east corners.
pix | pixel index number |
step | the number of returned points is 4*step. |
Definition at line 1400 of file healpix_base.cc.
|
protected |
The order of the map; -1 for nonhierarchical map.
Definition at line 50 of file healpix_base.h.
|
protected |
The N_side parameter of the map; 0 if not allocated.
Definition at line 52 of file healpix_base.h.
|
protected |
The map's ordering scheme.
Definition at line 56 of file healpix_base.h.