T_Healpix_Base< I > Class Template Reference

#include <healpix_base.h>

Inherits Healpix_Tables.

List of all members.

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
pix2ring (I pix) const
nest2ring (I pix) const
ring2nest (I pix) const
nest2peano (I pix) const
peano2nest (I pix) const
zphi2pix (double z, double phi) const
ang2pix (const pointing &ang) const
vec2pix (const vec3 &vec) const
void pix2zphi (I pix, double &z, double &phi) const
pointing pix2ang (I pix) const
vec3 pix2vec (I pix) const
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
Nside () const
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

ring_above (double z) const

Protected Attributes

int order_
nside_
Healpix_Ordering_Scheme scheme_


Detailed Description

template<typename I>
class T_Healpix_Base< I >

Functionality related to the HEALPix pixelisation.

Definition at line 46 of file healpix_base.h.


Constructor & Destructor Documentation

template<typename I>
T_Healpix_Base< I >::T_Healpix_Base (  )  [inline]

Constructs an unallocated object.

Definition at line 694 of file healpix_base.cc.

template<typename I>
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.

template<typename I>
T_Healpix_Base< I >::T_Healpix_Base ( 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.


Member Function Documentation

template<typename I>
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.

template<typename I>
int T_Healpix_Base< I >::nside2order ( nside  )  [inline, static]

Calculates the map order from its N_side parameter. Returns -1 if nside is not a power of 2.

Parameters:
nside the N_side parameter

Definition at line 38 of file healpix_base.cc.

template<typename I>
I T_Healpix_Base< I >::npix2nside ( npix  )  [inline, static]

Calculates the N_side parameter from the number of pixels.

Parameters:
npix the number of pixels

Definition at line 43 of file healpix_base.cc.

template<typename I>
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.

template<typename I>
void T_Healpix_Base< I >::SetNside ( 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.

template<typename I>
double T_Healpix_Base< I >::ring2z ( 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.

template<typename I>
I T_Healpix_Base< I >::pix2ring ( pix  )  const [inline]

Returns the number of the ring in which pix lies.

Definition at line 736 of file healpix_base.cc.

template<typename I>
I T_Healpix_Base< I >::nest2ring ( pix  )  const [inline]

Translates a pixel number from NEST to RING.

Definition at line 755 of file healpix_base.cc.

template<typename I>
I T_Healpix_Base< I >::ring2nest ( pix  )  const [inline]

Translates a pixel number from RING to NEST.

Definition at line 763 of file healpix_base.cc.

template<typename I>
I T_Healpix_Base< I >::nest2peano ( pix  )  const [inline]

Translates a pixel number from NEST to its Peano index.

Definition at line 792 of file healpix_base.cc.

template<typename I>
I T_Healpix_Base< I >::peano2nest ( pix  )  const [inline]

Translates a pixel number from its Peano index to NEST.

Definition at line 795 of file healpix_base.cc.

template<typename I>
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).

Note:
This method is inaccurate near the poles at high resolutions.

Definition at line 147 of file healpix_base.h.

template<typename I>
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.

template<typename I>
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.

template<typename I>
void T_Healpix_Base< I >::pix2zphi ( pix,
double &  z,
double &  phi 
) const [inline]

Returns the angular coordinates (z:=cos(theta), phi) of the center of the pixel with number pix.

Note:
This method is inaccurate near the poles at high resolutions.

Definition at line 176 of file healpix_base.h.

template<typename I>
pointing T_Healpix_Base< I >::pix2ang ( 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.

template<typename I>
vec3 T_Healpix_Base< I >::pix2vec ( pix  )  const [inline]

Returns the vector to the center of the pixel with number pix.

Definition at line 193 of file healpix_base.h.

template<typename I>
I T_Healpix_Base< I >::pixel_import ( 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.

Note:
b.Nside()%Nside() must be 0.

Definition at line 210 of file healpix_base.h.

template<typename I>
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.

Parameters:
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
Note:
This method is more efficient in the RING scheme.

Definition at line 324 of file healpix_base.cc.

template<typename I>
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.

Parameters:
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.
Note:
This method may return some pixels which don't overlap with the disk at all. The higher fact is chosen, the fewer false positives are returned, at the cost of increased run time.

This method is more efficient in the RING scheme.

Definition at line 330 of file healpix_base.cc.

template<typename I>
void T_Healpix_Base< I >::query_disc ( const pointing dir,
double  radius,
std::vector< I > &  listpix 
) const [inline]

Deprecated:
Please use the version based on rangeset

Definition at line 248 of file healpix_base.h.

template<typename I>
void T_Healpix_Base< I >::query_disc_inclusive ( const pointing dir,
double  radius,
std::vector< I > &  listpix,
int  fact = 1 
) const [inline]

Deprecated:
Please use the version based on rangeset

Definition at line 256 of file healpix_base.h.

template<typename I>
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.

Parameters:
vertex array containing the vertices of the polygon.
pixset a rangeset object containing the indices of all pixels whose centers lie inside the polygon
Note:
This method is more efficient in the RING scheme.

template<typename I>
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.

Parameters:
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.
Note:
This method may return some pixels which don't overlap with the polygon at all. The higher fact is chosen, the fewer false positives are returned, at the cost of increased run time.

This method is more efficient in the RING scheme.

template<typename I>
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.

Parameters:
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.

template<typename I>
void T_Healpix_Base< I >::get_ring_info ( ring,
I &  startpix,
I &  ringpix,
double &  costheta,
double &  sintheta,
bool &  shifted 
) const [inline]

Returns useful information about a given ring of the map.

Parameters:
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.

template<typename I>
void T_Healpix_Base< I >::get_ring_info2 ( ring,
I &  startpix,
I &  ringpix,
double &  theta,
bool &  shifted 
) const [inline]

Returns useful information about a given ring of the map.

Parameters:
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.

template<typename I>
void T_Healpix_Base< I >::get_ring_info_small ( ring,
I &  startpix,
I &  ringpix,
bool &  shifted 
) const [inline]

Returns useful information about a given ring of the map.

Parameters:
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.

template<typename I>
void T_Healpix_Base< I >::neighbors ( 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.

Note:
This method works in both RING and NEST schemes, but is considerably faster in the NEST scheme.

Definition at line 1126 of file healpix_base.cc.

template<typename I>
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.

Note:
This method works in both RING and NEST schemes, but is considerably faster in the RING scheme.

Definition at line 1182 of file healpix_base.cc.

template<typename I>
int T_Healpix_Base< I >::Order (  )  const [inline]

Returns the order parameter of the object.

Definition at line 353 of file healpix_base.h.

template<typename I>
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.

template<typename I>
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.

template<typename I>
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.

template<typename I>
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.

template<typename I>
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.

template<typename I>
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.

template<typename I>
double T_Healpix_Base< I >::max_pixrad ( 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.

template<typename I>
void T_Healpix_Base< I >::boundaries ( 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.

Parameters:
pix pixel index number
step the number of returned points is 4*step.


Member Data Documentation

template<typename I>
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.

template<typename I>
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.

template<typename I>
Healpix_Ordering_Scheme T_Healpix_Base< I >::scheme_ [protected]

The map's ordering scheme.

Definition at line 56 of file healpix_base.h.


The documentation for this class was generated from the following files:

Generated on Thu Oct 8 14:48:52 2015 for Healpix C++