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_Base2 Class Reference

#include <healpix_base2.h>

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Protected Attributes

int order_
int64 nside_
Healpix_Ordering_Scheme scheme_


Detailed Description

Functionality related to the HEALPix pixelisation. Supports resolutions up to N_side = 2^29.

Definition at line 40 of file healpix_base2.h.


Constructor & Destructor Documentation

Healpix_Base2::Healpix_Base2 (  )  [inline]

Constructs an unallocated object.

Definition at line 95 of file healpix_base2.h.

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

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

Definition at line 100 of file healpix_base2.h.

Healpix_Base2::Healpix_Base2 ( int64  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 105 of file healpix_base2.h.


Member Function Documentation

static int Healpix_Base2::nside2order ( int64  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 85 of file healpix_base2.h.

int64 Healpix_Base2::npix2nside ( int64  npix  )  [static]

Calculates the N_side parameter from the number of pixels.

Parameters:
npix the number of pixels

Definition at line 61 of file healpix_base2.cc.

double Healpix_Base2::ring2z ( int64  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 222 of file healpix_base2.cc.

int64 Healpix_Base2::pix2ring ( int64  pix  )  const

Returns the number of the ring in which pix lies.

Definition at line 232 of file healpix_base2.cc.

int64 Healpix_Base2::nest2ring ( int64  pix  )  const

Translates a pixel number from NEST to RING.

Definition at line 257 of file healpix_base2.cc.

int64 Healpix_Base2::ring2nest ( int64  pix  )  const

Translates a pixel number from RING to NEST.

Definition at line 265 of file healpix_base2.cc.

int64 Healpix_Base2::nest2peano ( int64  pix  )  const

Translates a pixel number from NEST to its Peano index.

Definition at line 273 of file healpix_base2.cc.

int64 Healpix_Base2::peano2nest ( int64  pix  )  const

Translates a pixel number from its Peano index to NEST.

Definition at line 301 of file healpix_base2.cc.

int64 Healpix_Base2::ang2pix ( const pointing ang  )  const [inline]

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

Definition at line 156 of file healpix_base2.h.

int64 Healpix_Base2::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 160 of file healpix_base2.h.

pointing Healpix_Base2::pix2ang ( int64  pix  )  const [inline]

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

Definition at line 167 of file healpix_base2.h.

vec3 Healpix_Base2::pix2vec ( int64  pix  )  const [inline]

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

Definition at line 174 of file healpix_base2.h.

void Healpix_Base2::query_disc ( const pointing dir,
double  radius,
std::vector< int64 > &  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_Base2::query_disc_inclusive ( const pointing dir,
double  radius,
std::vector< int64 > &  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 202 of file healpix_base2.h.

void Healpix_Base2::get_ring_info ( int64  ring,
int64 &  startpix,
int64 &  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

void Healpix_Base2::get_ring_info2 ( int64  ring,
int64 &  startpix,
int64 &  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

void Healpix_Base2::neighbors ( int64  pix,
fix_arr< int64, 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 493 of file healpix_base2.cc.

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

int Healpix_Base2::Order (  )  const [inline]

Returns the order parameter of the object.

Definition at line 244 of file healpix_base2.h.

int64 Healpix_Base2::Nside (  )  const [inline]

Returns the N_side parameter of the object.

Definition at line 246 of file healpix_base2.h.

int64 Healpix_Base2::Npix (  )  const [inline]

Returns the number of pixels of the object.

Definition at line 248 of file healpix_base2.h.

Healpix_Ordering_Scheme Healpix_Base2::Scheme (  )  const [inline]

Returns the ordering scheme of the object.

Definition at line 250 of file healpix_base2.h.

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

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

Definition at line 254 of file healpix_base2.h.

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

Swaps the contents of two Healpix_Base objects.

Definition at line 258 of file healpix_base2.h.

double Healpix_Base2::max_pixrad (  )  const

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

Definition at line 562 of file healpix_base2.cc.


Member Data Documentation

int Healpix_Base2::order_ [protected]

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

Definition at line 59 of file healpix_base2.h.

int64 Healpix_Base2::nside_ [protected]

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

Definition at line 61 of file healpix_base2.h.

The map's ordering scheme.

Definition at line 65 of file healpix_base2.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