#include <healpix_base.h>
Inherits Healpix_Tables.
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 |
void | query_disc_inclusive (pointing ptg, double radius, rangeset< I > &pixset, 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 |
void | query_polygon_inclusive (const std::vector< pointing > &vertex, rangeset< I > &pixset, int fact=1) const |
void | query_strip (double theta1, double theta2, bool inclusive, rangeset< I > &pixset) 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_ |
Definition at line 46 of file healpix_base.h.
T_Healpix_Base< I >::T_Healpix_Base | ( | ) | [inline] |
Constructs an unallocated object.
Definition at line 694 of file healpix_base.cc.
T_Healpix_Base< I >::T_Healpix_Base | ( | int | order, | |
Healpix_Ordering_Scheme | scheme | |||
) | [inline] |
Constructs an object with a given order and the ordering scheme scheme.
Definition at line 105 of file healpix_base.h.
T_Healpix_Base< I >::T_Healpix_Base | ( | I | nside, | |
Healpix_Ordering_Scheme | scheme, | |||
const | nside_dummy | |||
) | [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.
I T_Healpix_Base< I >::ring_above | ( | double | z | ) | const [inline, protected] |
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.
int T_Healpix_Base< I >::nside2order | ( | I | nside | ) | [inline, 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.
I T_Healpix_Base< I >::npix2nside | ( | I | npix | ) | [inline, 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 | |||
) | [inline] |
Adjusts the object to order and scheme.
Reimplemented in Healpix_Map< T >.
Definition at line 698 of file healpix_base.cc.
void T_Healpix_Base< I >::SetNside | ( | I | nside, | |
Healpix_Ordering_Scheme | scheme | |||
) | [inline] |
Adjusts the object to nside and scheme.
Reimplemented in Healpix_Map< T >.
Definition at line 711 of file healpix_base.cc.
double T_Healpix_Base< I >::ring2z | ( | I | ring | ) | const [inline] |
Returns the z-coordinate of the ring ring. This also works for the (not really existing) rings 0 and 4*nside.
Definition at line 726 of file healpix_base.cc.
I T_Healpix_Base< I >::pix2ring | ( | I | pix | ) | const [inline] |
Returns the number of the ring in which pix lies.
Definition at line 736 of file healpix_base.cc.
I T_Healpix_Base< I >::nest2ring | ( | I | pix | ) | const [inline] |
Translates a pixel number from NEST to RING.
Definition at line 755 of file healpix_base.cc.
I T_Healpix_Base< I >::ring2nest | ( | I | pix | ) | const [inline] |
Translates a pixel number from RING to NEST.
Definition at line 763 of file healpix_base.cc.
I T_Healpix_Base< I >::nest2peano | ( | I | pix | ) | const [inline] |
Translates a pixel number from NEST to its Peano index.
Definition at line 792 of file healpix_base.cc.
I T_Healpix_Base< I >::peano2nest | ( | I | pix | ) | const [inline] |
Translates a pixel number from its Peano index to NEST.
Definition at line 795 of file healpix_base.cc.
I T_Healpix_Base< I >::zphi2pix | ( | double | z, | |
double | phi | |||
) | const [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.
I T_Healpix_Base< I >::ang2pix | ( | const pointing & | ang | ) | const [inline] |
Returns the number of the pixel which contains the angular coordinates ang.
Definition at line 152 of file healpix_base.h.
I T_Healpix_Base< I >::vec2pix | ( | const vec3 & | vec | ) | const [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.
void T_Healpix_Base< I >::pix2zphi | ( | I | pix, | |
double & | z, | |||
double & | phi | |||
) | const [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.
pointing T_Healpix_Base< I >::pix2ang | ( | I | pix | ) | const [inline] |
Returns the angular coordinates of the center of the pixel with number pix.
Definition at line 185 of file healpix_base.h.
vec3 T_Healpix_Base< I >::pix2vec | ( | I | pix | ) | const [inline] |
Returns the vector to the center of the pixel with number pix.
Definition at line 193 of file healpix_base.h.
I T_Healpix_Base< I >::pixel_import | ( | I | pix, | |
const T_Healpix_Base< I > & | b | |||
) | const [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 [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 | |
pixset | a rangeset object containing the indices of all pixels whose centers lie inside the disk |
Definition at line 324 of file healpix_base.cc.
void T_Healpix_Base< I >::query_disc_inclusive | ( | pointing | ptg, | |
double | radius, | |||
rangeset< I > & | pixset, | |||
int | fact = 1 | |||
) | const [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 | |
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. |
This method is more efficient in the RING scheme.
Definition at line 330 of file healpix_base.cc.
void T_Healpix_Base< I >::query_disc | ( | const pointing & | dir, | |
double | radius, | |||
std::vector< I > & | listpix | |||
) | const [inline] |
void T_Healpix_Base< I >::query_disc_inclusive | ( | const pointing & | dir, | |
double | radius, | |||
std::vector< I > & | listpix, | |||
int | fact = 1 | |||
) | const [inline] |
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 |
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. |
This method is more efficient in the RING scheme.
void T_Healpix_Base< I >::query_strip | ( | double | theta1, | |
double | theta2, | |||
bool | inclusive, | |||
rangeset< I > & | pixset | |||
) | const [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 1031 of file healpix_base.cc.
void T_Healpix_Base< I >::get_ring_info | ( | I | ring, | |
I & | startpix, | |||
I & | ringpix, | |||
double & | costheta, | |||
double & | sintheta, | |||
bool & | shifted | |||
) | const [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 | |
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 1071 of file healpix_base.cc.
void T_Healpix_Base< I >::get_ring_info2 | ( | I | ring, | |
I & | startpix, | |||
I & | ringpix, | |||
double & | theta, | |||
bool & | shifted | |||
) | const [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 | |
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 1098 of file healpix_base.cc.
void T_Healpix_Base< I >::get_ring_info_small | ( | I | ring, | |
I & | startpix, | |||
I & | ringpix, | |||
bool & | shifted | |||
) | const [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 1048 of file healpix_base.cc.
void T_Healpix_Base< I >::neighbors | ( | I | pix, | |
fix_arr< I, 8 > & | result | |||
) | const [inline] |
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 1126 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 [inline] |
Returns interpolation information for the direction ptg. The surrounding pixels are returned in pix, their corresponding weights in wgt.
Definition at line 1182 of file healpix_base.cc.
int T_Healpix_Base< I >::Order | ( | ) | const [inline] |
Returns the order parameter of the object.
Definition at line 353 of file healpix_base.h.
I T_Healpix_Base< I >::Nside | ( | ) | const [inline] |
Returns the N_side parameter of the object.
Definition at line 355 of file healpix_base.h.
I T_Healpix_Base< I >::Npix | ( | ) | const [inline] |
Returns the number of pixels of the object.
Definition at line 357 of file healpix_base.h.
Healpix_Ordering_Scheme T_Healpix_Base< I >::Scheme | ( | ) | const [inline] |
Returns the ordering scheme of the object.
Definition at line 359 of file healpix_base.h.
bool T_Healpix_Base< I >::conformable | ( | const T_Healpix_Base< I > & | other | ) | const [inline] |
Returns true, if both objects have the same nside and scheme, else false.
Definition at line 363 of file healpix_base.h.
void T_Healpix_Base< I >::swap | ( | T_Healpix_Base< I > & | other | ) | [inline] |
Swaps the contents of two Healpix_Base objects.
Definition at line 1250 of file healpix_base.cc.
double T_Healpix_Base< I >::max_pixrad | ( | ) | const [inline] |
Returns the maximum angular distance (in radian) between any pixel center and its corners.
Definition at line 1262 of file healpix_base.cc.
double T_Healpix_Base< I >::max_pixrad | ( | I | ring | ) | const [inline] |
Returns the maximum angular distance (in radian) between any pixel center and its corners in a given ring.
Definition at line 1272 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. |
int T_Healpix_Base< I >::order_ [protected] |
The order of the map; -1 for nonhierarchical map.
Definition at line 50 of file healpix_base.h.
I T_Healpix_Base< I >::nside_ [protected] |
The N_side parameter of the map; 0 if not allocated.
Definition at line 52 of file healpix_base.h.
Healpix_Ordering_Scheme T_Healpix_Base< I >::scheme_ [protected] |
The map's ordering scheme.
Definition at line 56 of file healpix_base.h.