GammaLib
2.0.0
|
HealPix projection class interface definition. More...
#include <GHealpix.hpp>
Public Member Functions | |
GHealpix (void) | |
Void constructor. More... | |
GHealpix (const int &nside, const std::string &ordering="NESTED", const std::string &coordsys="CEL") | |
Constructor. More... | |
GHealpix (const GFitsHDU &hdu) | |
Constructor from FITS HDU table. More... | |
GHealpix (const GHealpix &wcs) | |
Copy constructor. More... | |
virtual | ~GHealpix (void) |
Destructor. More... | |
GHealpix & | operator= (const GHealpix &wcs) |
Assignment operator. More... | |
virtual void | clear (void) |
Clear object. More... | |
virtual GHealpix * | clone (void) const |
Clone instance. More... | |
virtual std::string | classname (void) const |
Return class name. More... | |
virtual int | size (void) const |
Return dimension of projection. More... | |
virtual std::string | code (void) const |
Return projection code. More... | |
virtual std::string | name (void) const |
Return projection name. More... | |
virtual void | read (const GFitsHDU &hdu) |
Read Healpix definition from FITS header. More... | |
virtual void | write (GFitsHDU &hdu) const |
Write Healpix definition into FITS HDU. More... | |
virtual double | solidangle (const GSkyPixel &pixel) const |
Returns solid angle of pixel. More... | |
virtual GSkyDir | pix2dir (const GSkyPixel &pixel) const |
Returns sky direction of pixel. More... | |
virtual GSkyPixel | dir2pix (const GSkyDir &dir) const |
Returns sky map pixel of sky coordinate. More... | |
virtual GBilinear | interpolator (const GSkyDir &dir) const |
Return interpolator for given sky direction. More... | |
virtual std::string | print (const GChatter &chatter=NORMAL) const |
Print WCS information. More... | |
const int & | npix (void) const |
Returns number of pixels. More... | |
const int & | nside (void) const |
Returns number of divisions of the side of each base pixel. More... | |
std::string | ordering (void) const |
Returns ordering parameter. More... | |
void | ordering (const std::string &ordering) |
Set pixel ordering. More... | |
std::vector< int > | neighbours (const GSkyPixel &pixel) const |
Return neighbouring pixels of a pixel. More... | |
GSkyDirs | boundaries (const GSkyPixel &pixel, const int &step=1) const |
Return pixel boundaries. More... | |
double | max_pixrad (void) const |
Return maximum angular distance between pixel centre and corners. More... | |
Public Member Functions inherited from GSkyProjection | |
GSkyProjection (void) | |
Void constructor. More... | |
GSkyProjection (const GSkyProjection &proj) | |
Copy constructor. More... | |
virtual | ~GSkyProjection (void) |
Destructor. More... | |
virtual GSkyProjection & | operator= (const GSkyProjection &proj) |
Assignment operator. More... | |
virtual std::string | coordsys (void) const |
Returns coordinate system. More... | |
virtual void | coordsys (const std::string &coordsys) |
Set coordinate system. More... | |
Public Member Functions inherited from GBase | |
virtual | ~GBase (void) |
Destructor. More... | |
Private Member Functions | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GHealpix &wcs) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
virtual bool | compare (const GSkyProjection &proj) const |
Returns true if argument is identical. More... | |
int | compress_bits (const int &value) const |
Compress Bits. More... | |
int | spread_bits (const int &value) const |
Spread Bits. More... | |
void | pix2xyf (const int &pix, int *ix, int *iy, int *face) const |
Convert pixel number in to (x,y,face) tuple. More... | |
void | nest2xyf (const int &pix, int *ix, int *iy, int *face) const |
Convert pixel number in nested scheme to (x,y,face) tuple. More... | |
void | ring2xyf (const int &pix, int *ix, int *iy, int *face) const |
Convert pixel number in ring scheme to (x,y,face) tuple. More... | |
int | xyf2nest (const int &ix, const int &iy, const int &face) const |
Convert (x,y,face) tuple to pixel number in nested scheme. More... | |
int | xyf2ring (const int &ix, const int &iy, const int &face) const |
Convert (x,y,face) tuple to pixel number in ring scheme. More... | |
void | xyf2loc (const double &x, const double &y, const int &face, double *z, double *phi) const |
Convert (x,y,f) tuple into local coordinates. More... | |
int | nside2order (const int &nside) const |
Convert nside to order. More... | |
int | nest2ring (const int &pix) const |
Converts pixel number in nested indexing scheme to ring scheme. More... | |
int | ring2nest (const int &pix) const |
Converts pixel number in ring indexing scheme to nested scheme. More... | |
void | pix2xy (const int &ipix, int *x, int *y) const |
Convert pixel index to (x,y) coordinate. More... | |
int | xy2pix (int x, int y) const |
Convert (x,y) coordinate to pixel. More... | |
void | pix2ang_ring (int ipix, double *theta, double *phi) const |
Convert pixel index to (theta,phi) angles for ring ordering. More... | |
void | pix2ang_nest (int ipix, double *theta, double *phi) const |
Convert pixel index to (theta,phi) angles for nested ordering. More... | |
int | ang2pix_z_phi_ring (double z, double phi) const |
Returns pixel which contains angular coordinates (z,phi) More... | |
int | ang2pix_z_phi_nest (double z, double phi) const |
Returns pixel which contains angular coordinates (z,phi) More... | |
int | ring_above (const double &z) const |
Get ring index north of cos(theta) More... | |
void | get_ring_info (const int &ring, int *startpix, int *ringpix, bool *shifted) const |
Returns useful information about a given ring of the projection. More... | |
void | get_ring_info (const int &ring, int *startpix, int *ringpix, double *theta, bool *shifted) const |
Returns useful information about a given ring of the projection. More... | |
GBilinear | interpolator (const double &theta, const double &phi) const |
Return interpolator. More... | |
unsigned int | isqrt (unsigned int arg) const |
Integer n that fulfills n*n <= arg < (n+1)*(n+1) More... | |
GVector | set_z_phi (const double &z, const double &phi) const |
Return 3D vector. More... | |
GSkyDir | loc2dir (const double &z, const double &phi) const |
Convert local coordinate into sky direction. More... | |
Private Attributes | |
int | m_nside |
Number of divisions of each base pixel (1-8192) More... | |
int | m_npface |
int | m_ncap |
Number of pixels in polar cap. More... | |
int | m_order |
Order. More... | |
int | m_ordering |
Pixel ordering (0=ring, 1=nested, -1=?) More... | |
int | m_num_pixels |
Number of pixels in projection. More... | |
double | m_fact1 |
double | m_fact2 |
double | m_solidangle |
Solid angle of pixel. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from GSkyProjection | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GSkyProjection &proj) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Protected Attributes inherited from GSkyProjection | |
int | m_coordsys |
0=CEL, 1=GAL More... | |
HealPix projection class interface definition.
The HealPix projection class has been implemented by adapting code from the HealPix library (version 2.1). For more information about HEALPix, see http://healpix.jpl.nasa.gov
Definition at line 50 of file GHealpix.hpp.
GHealpix::GHealpix | ( | void | ) |
Void constructor.
Definition at line 103 of file GHealpix.cpp.
References init_members().
Referenced by clone().
GHealpix::GHealpix | ( | const int & | nside, |
const std::string & | order = "NESTED" , |
||
const std::string & | coords = "CEL" |
||
) |
Constructor.
[in] | nside | Number of sides. |
[in] | order | Pixel ordering ('RING' or 'NESTED'). |
[in] | coords | Coordinate system ('CEL' or 'GAL'). |
GException::invalid_argument | Invalid nside parameter. |
Definition at line 123 of file GHealpix.cpp.
References GSkyProjection::coordsys(), gammalib::fourpi, G_CONSTRUCT, init_members(), m_fact1, m_fact2, m_ncap, m_npface, m_nside, m_num_pixels, m_order, m_solidangle, nside(), nside2order(), ordering(), and gammalib::str().
|
explicit |
Constructor from FITS HDU table.
[in] | hdu | FITS HDU. |
Definition at line 164 of file GHealpix.cpp.
References init_members(), and read().
GHealpix::GHealpix | ( | const GHealpix & | proj | ) |
Copy constructor.
[in] | proj | Healpix projection. |
Definition at line 182 of file GHealpix.cpp.
References copy_members(), and init_members().
|
virtual |
|
private |
Returns pixel which contains angular coordinates (z,phi)
[in] | z | Cosine of zenith angle - cos(theta). |
[in] | phi | Azimuth angle in radians. |
Definition at line 1568 of file GHealpix.cpp.
References gammalib::inv_pihalf, m_order, gammalib::modulo(), ns_max, order_max, sqrt(), gammalib::twopi, gammalib::twothird, and xy2pix().
Referenced by dir2pix().
|
private |
Returns pixel which contains angular coordinates (z,phi)
[in] | z | Cosine of zenith angle - cos(theta). |
[in] | phi | Azimuth angle in radians. |
Definition at line 1520 of file GHealpix.cpp.
References gammalib::inv_pihalf, m_ncap, m_nside, m_num_pixels, gammalib::modulo(), sqrt(), gammalib::twopi, and gammalib::twothird.
Referenced by dir2pix().
Return pixel boundaries.
[in] | pixel | Sky pixel. |
[in] | step | Number of returned points (4*step, defaults to 4). |
The method returns a container of sky directions along the boundary of a HealPix pixel. By default, the 4 corners of HealPix pixel will be returned. The first point corresponds to the northernmost corner, the subsequent points follow the pixel boundary through west, south and east corners. If step>1 more intermediate points will be added after the 4th corner of the pixel.
This method has been adapted from the boundaries() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 711 of file GHealpix.cpp.
References GSkyDirs::append(), G_BOUNDARIES, GSkyPixel::is_1D(), loc2dir(), m_nside, pix2xyf(), GSkyPixel::print(), and xyf2loc().
Referenced by GSkyMap::flux().
|
inlinevirtual |
Return class name.
Implements GSkyProjection.
Definition at line 144 of file GHealpix.hpp.
|
virtual |
Clear object.
This method properly resets the object to an initial state.
Implements GSkyProjection.
Definition at line 255 of file GHealpix.cpp.
References GSkyProjection::free_members(), free_members(), GSkyProjection::init_members(), and init_members().
Referenced by read().
|
virtual |
Clone instance.
Implements GSkyProjection.
Definition at line 273 of file GHealpix.cpp.
References GHealpix().
|
inlinevirtual |
Return projection code.
Returns the projection code "HPX".
Implements GSkyProjection.
Definition at line 172 of file GHealpix.hpp.
|
privatevirtual |
Returns true if argument is identical.
[in] | proj | Sky projection. |
This method is a helper for the sky projection friends.
Implements GSkyProjection.
Definition at line 914 of file GHealpix.cpp.
References GSkyProjection::m_coordsys, m_ncap, m_npface, m_nside, m_num_pixels, m_order, and m_ordering.
|
private |
Compress Bits.
[in] | value | Value. |
This method has been adapted from the compress_bits() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 952 of file GHealpix.cpp.
References ctab.
Referenced by nest2xyf().
|
private |
Copy class members.
[in] | proj | Healpix projection. |
Definition at line 879 of file GHealpix.cpp.
References m_fact1, m_fact2, m_ncap, m_npface, m_nside, m_num_pixels, m_order, m_ordering, and m_solidangle.
Referenced by GHealpix(), and operator=().
Returns sky map pixel of sky coordinate.
[in] | dir | Sky coordinate. |
Implements GSkyProjection.
Definition at line 433 of file GHealpix.cpp.
References ang2pix_z_phi_nest(), ang2pix_z_phi_ring(), GSkyDir::b(), cos(), GSkyDir::dec(), GSkyDir::l(), GSkyProjection::m_coordsys, m_ordering, gammalib::pihalf, and GSkyDir::ra().
|
private |
Delete class members.
Definition at line 900 of file GHealpix.cpp.
Referenced by clear(), operator=(), and ~GHealpix().
|
private |
Returns useful information about a given ring of the projection.
[in] | ring | The ring number (the number of the first ring is 1) |
[out] | startpix | The number of the first pixel in the ring |
[out] | ringpix | The number of pixels in the ring |
[out] | shifted | If true, the center of the first pixel is not at phi=0 |
This method has been adapted from the get_ring_info_small() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 1674 of file GHealpix.cpp.
References m_ncap, m_nside, and m_num_pixels.
Referenced by interpolator(), and xyf2ring().
|
private |
Returns useful information about a given ring of the projection.
[in] | ring | The ring number (the number of the first ring is 1) |
[out] | startpix | The number of the first pixel in the ring |
[out] | ringpix | The number of pixels in the ring |
[out] | theta | (radians) |
[out] | shifted | If true, the center of the first pixel is not at phi=0 |
This method has been adapted from the get_ring_info2() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 1719 of file GHealpix.cpp.
References gammalib::acos(), gammalib::atan2(), m_fact1, m_fact2, m_ncap, m_nside, m_num_pixels, gammalib::pi, and sqrt().
|
private |
Initialise class members.
Definition at line 846 of file GHealpix.cpp.
References ctab, m_fact1, m_fact2, m_ncap, m_npface, m_nside, m_num_pixels, m_order, m_ordering, m_solidangle, and utab.
Referenced by clear(), GHealpix(), and operator=().
Return interpolator for given sky direction.
[in] | dir | Sky direction |
Definition at line 474 of file GHealpix.cpp.
References GSkyDir::b(), GSkyDir::dec(), GSkyDir::l(), GSkyProjection::m_coordsys, gammalib::modulo(), gammalib::pi, gammalib::pihalf, GSkyDir::ra(), and gammalib::twopi.
Referenced by interpolator().
|
private |
Return interpolator.
[in] | theta | Colatitude of direction (radian, the North pole is at theta=0) |
[in] | phi | Longitude of direction (radians) |
GException::invalid_argument | Invalid theta argument |
Returns a bilinear pixel interpolator for a given sky direction.
This method has been adapted from the get_interpol() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 1770 of file GHealpix.cpp.
References cos(), G_INTERPOLATOR, get_ring_info(), GBilinear::index1(), GBilinear::index2(), GBilinear::index3(), GBilinear::index4(), interpolator(), m_nside, m_num_pixels, m_ordering, gammalib::pi, ring2nest(), ring_above(), gammalib::str(), gammalib::twopi, GBilinear::weight1(), GBilinear::weight2(), GBilinear::weight3(), and GBilinear::weight4().
|
private |
Integer n that fulfills n*n <= arg < (n+1)*(n+1)
[in] | arg | Argument. |
Returns the integer n, which fulfills n*n <= arg < (n+1)*(n+1).
Definition at line 1893 of file GHealpix.cpp.
References sqrt().
Referenced by pix2ang_ring(), and ring2xyf().
|
private |
Convert local coordinate into sky direction.
[in] | z | Z value. |
[in] | phi | Phi value. |
This method has been adapted from the locToVec3() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 1237 of file GHealpix.cpp.
References asin(), gammalib::atan2(), cos(), GSkyDir::lb(), GSkyProjection::m_coordsys, GSkyDir::radec(), sin(), and sqrt().
Referenced by boundaries().
double GHealpix::max_pixrad | ( | void | ) | const |
Return maximum angular distance between pixel centre and corners.
Returns the maximum angular distance (in radians) between any pixel centre and its corners.
This method has been adapted from the max_pixrad() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 778 of file GHealpix.cpp.
References angle(), gammalib::atan2(), cross(), m_nside, norm(), gammalib::pi, and set_z_phi().
|
inlinevirtual |
Return projection name.
Returns the projection name.
Implements GSkyProjection.
Definition at line 186 of file GHealpix.hpp.
std::vector< int > GHealpix::neighbours | ( | const GSkyPixel & | pixel | ) | const |
Return neighbouring pixels of a pixel.
[in] | pixel | Pixel index. |
Returns the 8 neighbours of a given pixel. The method returns a vector with contains the pixel indices of the SW, W, NW, N, NE, E, SE and S neighbours of pix
(in the given order). If a neighbour does not exist (this can only be the case for the W, N, E and S neighbors), its entry is set to -1.
This method has been adapted from the neighbors() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 579 of file GHealpix.cpp.
References G_NEIGHBOURS, GSkyPixel::is_1D(), m_nside, m_order, m_ordering, nb_facearray, nb_swaparray, nb_xoffset, nb_yoffset, pix2xyf(), GSkyPixel::print(), spread_bits(), xyf2nest(), and xyf2ring().
|
private |
Converts pixel number in nested indexing scheme to ring scheme.
[in] | pix | Pixel number in nested indexing scheme. |
GException::invalid_value | Healpix projection does not represent a hiearachical map. |
This method has been adapted from the nest2ring() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 1301 of file GHealpix.cpp.
References G_NEST2RING, m_order, nest2xyf(), and xyf2ring().
|
private |
Convert pixel number in nested scheme to (x,y,face) tuple.
[in] | pix | Pixel number in nested scheme. |
[out] | ix | X index. |
[out] | iy | Y index. |
[out] | face | Face number. |
This method has been adapted from the nest2xyf() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 1021 of file GHealpix.cpp.
References compress_bits(), m_npface, and m_order.
Referenced by nest2ring(), and pix2xyf().
|
inline |
Returns number of pixels.
Definition at line 196 of file GHealpix.hpp.
References m_num_pixels.
Referenced by GSkyMap::GSkyMap(), GSkyMap::is_same(), and write().
|
inline |
Returns number of divisions of the side of each base pixel.
Definition at line 207 of file GHealpix.hpp.
References m_nside.
Referenced by GHealpix(), GSkyMap::is_same(), and write().
|
private |
Convert nside to order.
[in] | nside | Number of sides. |
Definition at line 1268 of file GHealpix.cpp.
References order_max.
Referenced by GHealpix(), and read().
Assignment operator.
[in] | proj | Healpix projection. |
Definition at line 220 of file GHealpix.cpp.
References copy_members(), free_members(), init_members(), and GSkyProjection::operator=().
std::string GHealpix::ordering | ( | void | ) | const |
Returns ordering parameter.
Definition at line 511 of file GHealpix.cpp.
References m_ordering.
Referenced by GHealpix(), GSkyMap::is_same(), print(), read(), and write().
void GHealpix::ordering | ( | const std::string & | ordering | ) |
Set pixel ordering.
[in] | ordering | Pixel ordering (RING or NEST/NESTED). |
GException::invalid_argument | Invalid ordering parameter. |
Definition at line 540 of file GHealpix.cpp.
References G_ORDERING_SET, m_ordering, and gammalib::toupper().
|
private |
Convert pixel index to (theta,phi) angles for nested ordering.
[in] | ipix | Pixel index [0,...,m_num_pixels[. |
[out] | theta | Pointer to result zenith angle in radians. |
[out] | phi | Pointer to result azimuth angle in radians. |
GException::out_of_range | Pixel index is out of range. |
Definition at line 1453 of file GHealpix.cpp.
References gammalib::acos(), G_PIX2ANG_NEST, jpll, jrll, m_fact1, m_fact2, m_npface, m_nside, m_num_pixels, m_order, gammalib::pihalf, and pix2xy().
Referenced by pix2dir().
|
private |
Convert pixel index to (theta,phi) angles for ring ordering.
[in] | ipix | Pixel index [0,...,m_num_pixels[. |
[out] | theta | Pointer to result zenith angle in radians. |
[out] | phi | Pointer to result azimuth angle in radians. |
GException::out_of_range | Pixel index is out of range. |
Definition at line 1402 of file GHealpix.cpp.
References gammalib::acos(), G_PIX2ANG_RING, isqrt(), m_fact1, m_fact2, m_ncap, m_nside, m_num_pixels, and gammalib::pi.
Referenced by pix2dir().
Returns sky direction of pixel.
[in] | pixel | Sky map pixel. |
Implements GSkyProjection.
Definition at line 384 of file GHealpix.cpp.
References G_XY2DIR, GSkyPixel::is_1D(), GSkyDir::lb(), GSkyProjection::m_coordsys, m_ordering, gammalib::pihalf, pix2ang_nest(), pix2ang_ring(), GSkyPixel::print(), and GSkyDir::radec().
Referenced by GSkyMap::flux().
|
private |
Convert pixel index to (x,y) coordinate.
[in] | ipix | Pixel index for which (x,y) are to be computed. |
[out] | x | Pointer to x coordinate. |
[out] | y | Pointer to y coordinate. |
Definition at line 1364 of file GHealpix.cpp.
References ctab.
Referenced by pix2ang_nest().
|
private |
Convert pixel number in to (x,y,face) tuple.
[in] | pix | Pixel number. |
[out] | ix | X index. |
[out] | iy | Y index. |
[out] | face | Face number. |
This method has been adapted from the pix2xyf() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 993 of file GHealpix.cpp.
References m_ordering, nest2xyf(), and ring2xyf().
Referenced by boundaries(), and neighbours().
Print WCS information.
[in] | chatter | Chattiness (defaults to NORMAL). |
Implements GSkyProjection.
Definition at line 802 of file GHealpix.cpp.
References GSkyProjection::coordsys(), m_ncap, m_npface, m_nside, m_num_pixels, m_order, m_solidangle, ordering(), gammalib::parformat(), SILENT, and gammalib::str().
|
virtual |
Read Healpix definition from FITS header.
[in] | hdu | FITS HDU. |
GException::invalid_argument | Unable to load Healpix definition from HDU. |
Implements GSkyProjection.
Definition at line 287 of file GHealpix.cpp.
References clear(), GSkyProjection::coordsys(), gammalib::fourpi, G_READ, GFitsHDU::has_card(), GFitsHDU::integer(), m_fact1, m_fact2, m_ncap, m_npface, m_nside, m_num_pixels, m_order, m_solidangle, nside2order(), ordering(), and GFitsHDU::string().
Referenced by GHealpix().
|
private |
Converts pixel number in ring indexing scheme to nested scheme.
[in] | pix | Pixel number in ring indexing scheme. |
GException::invalid_value | Healpix projection does not represent a hiearachical map. |
This method has been adapted from the ring2nest() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 1335 of file GHealpix.cpp.
References G_RING2NEST, m_order, ring2xyf(), and xyf2nest().
Referenced by interpolator().
|
private |
Convert pixel number in ring scheme to (x,y,face) tuple.
[in] | pix | Pixel number in ring scheme |
[out] | ix | X index. |
[out] | iy | Y index. |
[out] | face | Face number. |
This method has been adapted from the ring2xyf() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 1049 of file GHealpix.cpp.
References isqrt(), jpll, jrll, m_ncap, m_nside, m_num_pixels, and m_order.
Referenced by pix2xyf(), and ring2nest().
|
private |
Get ring index north of cos(theta)
[in] | costheta | Cosine of colatitude theta |
Returns the number of the next ring to the north of cos(theta). It may return 0; in this case costheta lies north of all rings.
This method has been adapted from the ring_above() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 1636 of file GHealpix.cpp.
References abs(), m_nside, sqrt(), and gammalib::twothird.
Referenced by interpolator().
|
private |
Return 3D vector.
[in] | z | Z value. |
[in] | phi | Phi value. |
This method has been adapted from the set_z_phi() function located in the file vec3.h in Healpix version 3.20.
Definition at line 1910 of file GHealpix.cpp.
References cos(), sin(), and sqrt().
Referenced by max_pixrad().
|
inlinevirtual |
Return dimension of projection.
Returns the dimension of the projection.
Implements GSkyProjection.
Definition at line 158 of file GHealpix.hpp.
|
inlinevirtual |
Returns solid angle of pixel.
[in] | pixel | Sky pixel. |
Returns the solid angle of the specified pixel
. Note that HEALPix pixels have all the same solid angle, hence the pixel
argument is in fact not used by the method.
Implements GSkyProjection.
Definition at line 224 of file GHealpix.hpp.
References m_solidangle.
|
private |
Spread Bits.
[in] | value | Compressed value. |
This method has been adapted from the spread_bits() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 972 of file GHealpix.cpp.
References utab.
Referenced by neighbours(), and xyf2nest().
|
virtual |
Write Healpix definition into FITS HDU.
[in] | hdu | FITS HDU. |
Writes the following keywords in the FITS HDU: EXTNAME = HEALPIX PIXTYPE = HEALPIX NSIDE = nside() = m_nside FIRSTPIX = 0 LASTPIX = npix()-1 = m_num_pixels-1 ORDERING = ordering() COORDSYS = coordsys()
Implements GSkyProjection.
Definition at line 356 of file GHealpix.cpp.
References GFitsHDU::card(), GSkyProjection::coordsys(), GFitsHDU::extname(), npix(), nside(), and ordering().
|
private |
Convert (x,y) coordinate to pixel.
[in] | x | x coordinate. |
[in] | y | y coordinate. |
Definition at line 1385 of file GHealpix.cpp.
References utab.
Referenced by ang2pix_z_phi_nest().
|
private |
Convert (x,y,f) tuple into local coordinates.
[in] | x | X value. |
[in] | y | Y value. |
[in] | face | Face number. |
[out] | z | Z value. |
[out] | phi | Phi value. |
This method has been adapted from the xyf2loc() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 1189 of file GHealpix.cpp.
References jpll, jrll, and gammalib::pihalf.
Referenced by boundaries().
|
private |
Convert (x,y,face) tuple to pixel number in nested scheme.
[in] | ix | X index |
[in] | iy | Y index |
[in] | face | Face number |
This method has been adapted from the xyf2nest() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 1126 of file GHealpix.cpp.
References m_order, and spread_bits().
Referenced by neighbours(), and ring2nest().
|
private |
Convert (x,y,face) tuple to pixel number in ring scheme.
[in] | ix | X index |
[in] | iy | Y index |
[in] | face | Face number |
This method has been adapted from the xyf2ring() function located in the file healpix_base.cc in Healpix version 3.20.
Definition at line 1148 of file GHealpix.cpp.
References get_ring_info(), jpll, jrll, and m_nside.
Referenced by neighbours(), and nest2ring().
|
private |
Definition at line 132 of file GHealpix.hpp.
Referenced by copy_members(), get_ring_info(), GHealpix(), init_members(), pix2ang_nest(), pix2ang_ring(), and read().
|
private |
Definition at line 133 of file GHealpix.hpp.
Referenced by copy_members(), get_ring_info(), GHealpix(), init_members(), pix2ang_nest(), pix2ang_ring(), and read().
|
private |
Number of pixels in polar cap.
Definition at line 128 of file GHealpix.hpp.
Referenced by ang2pix_z_phi_ring(), compare(), copy_members(), get_ring_info(), GHealpix(), init_members(), pix2ang_ring(), print(), read(), and ring2xyf().
|
private |
Definition at line 127 of file GHealpix.hpp.
Referenced by compare(), copy_members(), GHealpix(), init_members(), nest2xyf(), pix2ang_nest(), print(), and read().
|
private |
Number of divisions of each base pixel (1-8192)
Definition at line 126 of file GHealpix.hpp.
Referenced by ang2pix_z_phi_ring(), boundaries(), compare(), copy_members(), get_ring_info(), GHealpix(), init_members(), interpolator(), max_pixrad(), neighbours(), nside(), pix2ang_nest(), pix2ang_ring(), print(), read(), ring2xyf(), ring_above(), and xyf2ring().
|
private |
Number of pixels in projection.
Definition at line 131 of file GHealpix.hpp.
Referenced by ang2pix_z_phi_ring(), compare(), copy_members(), get_ring_info(), GHealpix(), init_members(), interpolator(), npix(), pix2ang_nest(), pix2ang_ring(), print(), read(), and ring2xyf().
|
private |
Order.
Definition at line 129 of file GHealpix.hpp.
Referenced by ang2pix_z_phi_nest(), compare(), copy_members(), GHealpix(), init_members(), neighbours(), nest2ring(), nest2xyf(), pix2ang_nest(), print(), read(), ring2nest(), ring2xyf(), and xyf2nest().
|
private |
Pixel ordering (0=ring, 1=nested, -1=?)
Definition at line 130 of file GHealpix.hpp.
Referenced by compare(), copy_members(), dir2pix(), init_members(), interpolator(), neighbours(), ordering(), pix2dir(), and pix2xyf().
|
private |
Solid angle of pixel.
Definition at line 134 of file GHealpix.hpp.
Referenced by copy_members(), GHealpix(), init_members(), print(), read(), and solidangle().