NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links

Healpix_Base Class Reference

#include <healpix_base.h>

Inheritance diagram for Healpix_Base:

List of all members.

Public Member Functions

 Healpix_Base ()
 Healpix_Base (int order, Healpix_Ordering_Scheme scheme)
 Healpix_Base (int nside, Healpix_Ordering_Scheme scheme, const nside_dummy)
double ring2z (int ring) const
int pix2ring (int pix) const
int nest2ring (int pix) const
int ring2nest (int pix) const
int nest2peano (int pix) const
int peano2nest (int pix) const
int ang2pix (const pointing &ang) const
int vec2pix (const vec3 &vec) const
pointing pix2ang (int pix) const
vec3 pix2vec (int pix) const
void query_disc (const pointing &dir, double radius, std::vector< int > &listpix) const
void query_disc_inclusive (const pointing &dir, double radius, std::vector< int > &listpix) const
void get_ring_info (int ring, int &startpix, int &ringpix, double &costheta, double &sintheta, bool &shifted) const
void get_ring_info2 (int ring, int &startpix, int &ringpix, double &theta, bool &shifted) const
void neighbors (int pix, fix_arr< int, 8 > &result) const
void get_interpol (const pointing &ptg, fix_arr< int, 4 > &pix, fix_arr< double, 4 > &wgt) const
int Order () const
int Nside () const
int Npix () const
Healpix_Ordering_Scheme Scheme () const
bool conformable (const Healpix_Base &other) const
void swap (Healpix_Base &other)
double max_pixrad () const

Static Public Member Functions

static int nside2order (int nside)
static int npix2nside (int npix)

Protected Attributes

int order_
int nside_
Healpix_Ordering_Scheme scheme_


Detailed Description

Functionality related to the HEALPix pixelisation.

Definition at line 50 of file healpix_base.h.


Constructor & Destructor Documentation

Healpix_Base::Healpix_Base (  )  [inline]

Constructs an unallocated object.

Definition at line 105 of file healpix_base.h.

Healpix_Base::Healpix_Base ( int  order,
Healpix_Ordering_Scheme  scheme 
) [inline]

Constructs an object with a given order and the ordering scheme scheme.

Definition at line 110 of file healpix_base.h.

Healpix_Base::Healpix_Base ( int  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 115 of file healpix_base.h.


Member Function Documentation

static int Healpix_Base::nside2order ( int  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 95 of file healpix_base.h.

int Healpix_Base::npix2nside ( int  npix  )  [static]

Calculates the N_side parameter from the number of pixels.

Parameters:
npix the number of pixels

Definition at line 63 of file healpix_base.cc.

double Healpix_Base::ring2z ( int  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 261 of file healpix_base.cc.

int Healpix_Base::pix2ring ( int  pix  )  const

Returns the number of the ring in which pix lies.

Definition at line 271 of file healpix_base.cc.

int Healpix_Base::nest2ring ( int  pix  )  const

Translates a pixel number from NEST to RING.

Definition at line 296 of file healpix_base.cc.

int Healpix_Base::ring2nest ( int  pix  )  const

Translates a pixel number from RING to NEST.

Definition at line 304 of file healpix_base.cc.

int Healpix_Base::nest2peano ( int  pix  )  const

Translates a pixel number from NEST to its Peano index.

Definition at line 312 of file healpix_base.cc.

int Healpix_Base::peano2nest ( int  pix  )  const

Translates a pixel number from its Peano index to NEST.

Definition at line 340 of file healpix_base.cc.

int Healpix_Base::ang2pix ( const pointing ang  )  const [inline]

Returns the number of the pixel which contains the angular coordinates ang.

Definition at line 165 of file healpix_base.h.

int Healpix_Base::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 169 of file healpix_base.h.

pointing Healpix_Base::pix2ang ( int  pix  )  const [inline]

Returns the angular coordinates of the center of the pixel with number pix.

Definition at line 176 of file healpix_base.h.

vec3 Healpix_Base::pix2vec ( int  pix  )  const [inline]

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

Definition at line 183 of file healpix_base.h.

void Healpix_Base::query_disc ( const pointing dir,
double  radius,
std::vector< int > &  listpix 
) const

Returns the numbers of all pixels whose centers lie within radius of dir in listpix.

Parameters:
dir the angular coordinates of the disc center
radius the radius (in radians) of the disc
listpix a vector containing the numbers of all pixels within the disc
Note:
This method is more efficient in the RING scheme.

void Healpix_Base::query_disc_inclusive ( const pointing dir,
double  radius,
std::vector< int > &  listpix 
) const [inline]

Returns the numbers of all pixels that lie at least partially within radius of dir in listpix. It may also return a few pixels which do not lie in the disk at all.

Parameters:
dir the angular coordinates of the disc center
radius the radius (in radians) of the disc
listpix a vector containing the numbers of all pixels within the disc
Note:
This method works in both RING and NEST schemes, but is considerably faster in the RING scheme.

Definition at line 210 of file healpix_base.h.

void Healpix_Base::get_ring_info ( int  ring,
int &  startpix,
int &  ringpix,
double &  costheta,
double &  sintheta,
bool &  shifted 
) const

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
ringpix the number of pixels in the ring
costheta the cosine of the colatitude (in radians) of the ring
sintheta the sine of the colatitude (in radians) of the ring
shifted if true, the center of the first pixel is not at phi=0

Definition at line 583 of file healpix_base.cc.

void Healpix_Base::get_ring_info2 ( int  ring,
int &  startpix,
int &  ringpix,
double &  theta,
bool &  shifted 
) const

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
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 681 of file healpix_base.cc.

void Healpix_Base::neighbors ( int  pix,
fix_arr< int, 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.

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

Definition at line 612 of file healpix_base.cc.

void Healpix_Base::get_interpol ( const pointing ptg,
fix_arr< int, 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.

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

Definition at line 709 of file healpix_base.cc.

int Healpix_Base::Order (  )  const [inline]

Returns the order parameter of the object.

Definition at line 252 of file healpix_base.h.

int Healpix_Base::Nside (  )  const [inline]

Returns the N_side parameter of the object.

Definition at line 254 of file healpix_base.h.

int Healpix_Base::Npix (  )  const [inline]

Returns the number of pixels of the object.

Definition at line 256 of file healpix_base.h.

Healpix_Ordering_Scheme Healpix_Base::Scheme (  )  const [inline]

Returns the ordering scheme of the object.

Definition at line 258 of file healpix_base.h.

bool Healpix_Base::conformable ( const Healpix_Base other  )  const [inline]

Returns true, if both objects have the same nside and scheme, else false.

Definition at line 262 of file healpix_base.h.

void Healpix_Base::swap ( Healpix_Base other  )  [inline]

Swaps the contents of two Healpix_Base objects.

Definition at line 266 of file healpix_base.h.

double Healpix_Base::max_pixrad (  )  const

Returns the maximum angular distance (in radian) between any pixel center and its corners.

Definition at line 776 of file healpix_base.cc.


Member Data Documentation

int Healpix_Base::order_ [protected]

The order of the map; -1 for nonhierarchical map.

Definition at line 69 of file healpix_base.h.

int Healpix_Base::nside_ [protected]

The N_side parameter of the map; 0 if not allocated.

Definition at line 71 of file healpix_base.h.

The map's ordering scheme.

Definition at line 75 of file healpix_base.h.


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

Generated on Fri Jun 18 16:12:30 2010 for Healpix C++
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650