GammaLib 2.0.0
Loading...
Searching...
No Matches
GSkyMap.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * GSkyMap.hpp - Sky map class *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2010-2021 by Juergen Knoedlseder *
5 * ----------------------------------------------------------------------- *
6 * *
7 * This program is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * This program is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19 * *
20 ***************************************************************************/
21/**
22 * @file GSkyMap.hpp
23 * @brief Sky map class definition
24 * @author Juergen Knoedlseder
25 */
26
27#ifndef GSKYMAP_HPP
28#define GSKYMAP_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include <string>
32#include <vector>
33#include "GBase.hpp"
34#include "GSkyDir.hpp"
35#include "GSkyPixel.hpp"
36#include "GSkyProjection.hpp"
37#include "GBilinear.hpp"
38#include "GNdarray.hpp"
39
40/* __ Forward declarations _______________________________________________ */
41class GFilename;
42class GFits;
43class GFitsHDU;
44class GFitsTable;
45class GFitsBinTable;
46class GFitsImage;
48class GMatrix;
49class GVector;
50class GSkyRegion;
52class GSkyRegions;
53
54
55/***********************************************************************//**
56 * @class GSkyMap
57 *
58 * @brief Sky map class
59 *
60 * This class implements a sky maps. Sky maps are collections of pixels that
61 * define a quantity as function of pixel location. Typical quantities are
62 * gamma-ray intensities, but may also be the number of measured counts.
63 *
64 * Sky map pixels may be arranged in a 2-dimensional grid or in a linear
65 * 1-dimensional sequence. The link between pixel index and sky direction
66 * on the celestial sphere is established using a projection, implemented
67 * by the GSkyProjection class. 2-dimensional grids are represented by
68 * World Coordinate Systems. All World Coordinate Systems derive from GWcs
69 * and are registered in GWcsRegistry. The Healpix pixelisation, implemented
70 * by the GHealpix class, is the only 1-dimensional grid that is so far
71 * available.
72 *
73 * Sky map pixels may be accessed by their linear index, by pixel or by
74 * sky direction. While the index and pixel access return the sky map value
75 * at the pixel centre, the sky direction access operator performs an
76 * interpolation to the exact sky direction.
77 *
78 * Conversion methods exist to convert between the linear index, the pixel
79 * and the sky direction:
80 *
81 * GSkyPixel pixel = map.inx2pix(index); // Index to pixel
82 * GSkyDir dir = map.inx2dir(index); // Index to sky direction
83 * GSkyDir dir = map.pix2dir(pixel); // Pixel to sky direction
84 * int index = map.pix2inx(pixel); // Pixel to index
85 * int index = map.dir2inx(dir); // Sky direction to index
86 * GSkyPixel pixel = map.dir2pix(dir); // Sky direction to pixel
87 *
88 ***************************************************************************/
89class GSkyMap : public GBase {
90
91 friend GSkyMap sqrt(const GSkyMap& map);
92 friend GSkyMap log(const GSkyMap& map);
93 friend GSkyMap log10(const GSkyMap& map);
94 friend GSkyMap abs(const GSkyMap& map);
95 friend GSkyMap sign(const GSkyMap& map);
96 friend GSkyMap clip(const GSkyMap& map, const double& thresh);
97
98public:
99 // Constructors and destructors
100 GSkyMap(void);
101 explicit GSkyMap(const GFilename& filename);
102 explicit GSkyMap(const GFitsHDU& hdu);
103 GSkyMap(const std::string& coords,
104 const int& nside,
105 const std::string& order,
106 const int& nmaps = 1);
107 GSkyMap(const std::string& wcs,
108 const std::string& coords,
109 const double& x,
110 const double& y,
111 const double& dx,
112 const double& dy,
113 const int& nx,
114 const int& ny,
115 const int& nmaps = 1);
116 GSkyMap(const GSkyMap& map);
117 virtual ~GSkyMap(void);
118
119 // Operators
120 GSkyMap& operator=(const GSkyMap& map);
121 GSkyMap& operator=(const double& value);
122 GSkyMap& operator+=(const GSkyMap& map);
123 GSkyMap& operator+=(const double& value);
124 GSkyMap& operator-=(const GSkyMap& map);
125 GSkyMap& operator-=(const double& value);
126 GSkyMap& operator*=(const GSkyMap& map);
127 GSkyMap& operator*=(const double& factor);
128 GSkyMap& operator/=(const GSkyMap& map);
129 GSkyMap& operator/=(const double& factor);
130 GSkyMap operator+(const GSkyMap& map) const;
131 GSkyMap operator-(const GSkyMap& map) const;
132 GSkyMap operator*(const GSkyMap& map) const;
133 GSkyMap operator/(const GSkyMap& map) const;
134 double& operator()(const int& index, const int& map = 0);
135 const double& operator()(const int& index, const int& map = 0) const;
136 double& operator()(const GSkyPixel& pixel, const int& map = 0);
137 const double& operator()(const GSkyPixel& pixel, const int& map = 0) const;
138 double operator()(const GSkyDir& dir, const int& map = 0) const;
139
140 // Methods
141 void clear(void);
142 GSkyMap* clone(void) const;
143 std::string classname(void) const;
144 bool is_empty(void) const;
145 const int& npix(void) const;
146 const int& nx(void) const;
147 const int& ny(void) const;
148 const int& nmaps(void) const;
149 void nmaps(const int& nmaps);
150 const std::vector<int>& shape(void) const;
151 void shape(const int& s1);
152 void shape(const int& s1, const int& s2);
153 void shape(const int& s1, const int& s2, const int& s3);
154 void shape(const std::vector<int>& shape);
155 int ndim(void) const;
156 GSkyPixel inx2pix(const int& index) const;
157 GSkyDir inx2dir(const int& index) const;
158 GSkyDir pix2dir(const GSkyPixel& pixel) const;
159 int pix2inx(const GSkyPixel& pixel) const;
160 int dir2inx(const GSkyDir& dir) const;
161 GSkyPixel dir2pix(const GSkyDir& dir) const;
162 GNdarray counts(void) const;
163 double flux(const int& index, const int& map = 0) const;
164 double flux(const GSkyPixel& pixel, const int& map = 0) const;
165 double flux(const GSkyRegion& region, const int& map = 0) const;
166 double flux(const GSkyRegions& regions, const int& map = 0) const;
167 GNdarray flux(void) const;
168 double solidangle(const int& index) const;
169 double solidangle(const GSkyPixel& pixel) const;
170 double solidangle(const GSkyRegion& region) const;
171 double solidangle(const GSkyRegions& regions) const;
172 bool contains(const GSkyDir& dir) const;
173 bool contains(const GSkyPixel& pixel) const;
174 bool overlaps(const GSkyRegion& region) const;
175 void smooth(const std::string& kernel,
176 const double& par);
177 void correlate(const std::string& kernel,
178 const double& par);
179 const GSkyProjection* projection(void) const;
180 void projection(const GSkyProjection& proj);
181 const double* pixels(void) const;
182 GSkyMap extract(const int& map, const int& nmaps = 1) const;
183 GSkyMap extract(const int& startx, const int& stopx,
184 const int& starty, const int& stopy) const;
185 GSkyMap extract(const GSkyRegions& inclusions) const;
186 void stack_maps(void);
188 void load(const GFilename& filename);
189 void save(const GFilename& filename,
190 const bool& clobber = false) const;
191 void read(const GFitsHDU& hdu);
192 GFitsHDU* write(GFits& file,
193 const std::string& extname = "") const;
194 void publish(const std::string& name = "") const;
195 std::string print(const GChatter& chatter = NORMAL) const;
196
197private:
198 // Private methods
199 void init_members(void);
200 void copy_members(const GSkyMap& map);
201 void free_members(void);
202 void set_wcs(const std::string& wcs, const std::string& coords,
203 const double& crval1, const double& crval2,
204 const double& crpix1, const double& crpix2,
205 const double& cdelt1, const double& cdelt2);
206 void read_healpix(const GFitsTable& table);
207 void read_wcs(const GFitsImage& image);
208 void alloc_wcs(const GFitsImage& image);
210 GFitsImageDouble* create_wcs_hdu(void) const;
211 double solidangle(const GSkyDir& dir1, const GSkyDir& dir2,
212 const GSkyDir& dir3) const;
213 double solidangle(const GSkyDir& dir1, const GSkyDir& dir2,
214 const GSkyDir& dir3, const GSkyDir& dir4) const;
215 bool overlaps_circle(const GSkyRegionCircle& region) const;
216 bool is_healpix(const GFitsHDU& hdu) const;
217 bool is_wcs(const GFitsHDU& hdu) const;
218 bool is_same(const GSkyMap& map) const;
219 void convolve(const std::string& kernel,
220 const double& par,
221 const bool& normalise);
222 GNdarray convolution_kernel(const std::string& kernel,
223 const double& par,
224 const bool& normalise) const;
225
226 // Private data area
227 int m_num_pixels; //!< Number of pixels (used for pixel allocation)
228 int m_num_maps; //!< Number of maps (used for pixel allocation)
229 int m_num_x; //!< Number of pixels in x direction (only 2D)
230 int m_num_y; //!< Number of pixels in y direction (only 2D)
231 std::vector<int> m_shape; //!< Shape of the maps
232 GSkyProjection* m_proj; //!< Pointer to sky projection
233 GNdarray m_pixels; //!< Skymap pixels
234
235 // Computation cache
236 mutable bool m_hascache; //!< Cache is valid
237 mutable bool m_contained; //!< Sky direction is contained in map
238 mutable GSkyDir m_last_dir; //!< Last sky direction
239 mutable GBilinear m_interpol; //!< Bilinear interpolator
240};
241
242
243/***********************************************************************//**
244 * @brief Binary sky map addition
245 *
246 * @param[in] map Sky map.
247 * @return Sky map to which @p map was added.
248 *
249 * Returns the sum of two sky maps.
250 ***************************************************************************/
251inline
253{
254 GSkyMap result = *this;
255 result += map;
256 return result;
257}
258
259
260/***********************************************************************//**
261 * @brief Binary sky map subtraction
262 *
263 * @param[in] map Sky map.
264 * @return Sky map to which @p map was added.
265 *
266 * Returns the difference of two sky maps.
267 ***************************************************************************/
268inline
270{
271 GSkyMap result = *this;
272 result -= map;
273 return result;
274}
275
276
277/***********************************************************************//**
278 * @brief Binary sky map multiplication
279 *
280 * @param[in] map Sky map.
281 * @return Sky map multiplied by @p map.
282 *
283 * Returns the product of two sky maps.
284 ***************************************************************************/
285inline
287{
288 GSkyMap result = *this;
289 result *= map;
290 return result;
291}
292
293
294/***********************************************************************//**
295 * @brief Binary sky map division
296 *
297 * @param[in] map Sky map.
298 * @return Sky map divided by @p map.
299 *
300 * Returns the ratio of two sky maps.
301 ***************************************************************************/
302inline
304{
305 GSkyMap result = *this;
306 result /= map;
307 return result;
308}
309
310
311/***********************************************************************//**
312 * @brief Return class name
313 *
314 * @return String containing the class name ("GSkyMap").
315 ***************************************************************************/
316inline
317std::string GSkyMap::classname(void) const
318{
319 return ("GSkyMap");
320}
321
322
323/***********************************************************************//**
324 * @brief Signals if sky map is empty
325 *
326 * @return True if sky map is empty, false otherwise.
327 *
328 * Signals if a sky map has no pixels or maps.
329 ***************************************************************************/
330inline
331bool GSkyMap::is_empty(void) const
332{
333 return ((m_num_pixels == 0) || (m_num_maps == 0));
334}
335
336
337/***********************************************************************//**
338 * @brief Returns number of pixels
339 *
340 * @return Number of pixels in one sky map.
341 *
342 * Returns the number of pixels in one sky map.
343 ***************************************************************************/
344inline
345const int& GSkyMap::npix(void) const
346{
347 return m_num_pixels;
348}
349
350
351/***********************************************************************//**
352 * @brief Returns number of pixels in x coordinate
353 *
354 * @return Number of pixels in the X direction.
355 *
356 * Returns the number of pixels in the X direction. If the sky map is a
357 * one dimensional array (which is the case for the Healpix projection),
358 * the method returns 0.
359 ***************************************************************************/
360inline
361const int& GSkyMap::nx(void) const
362{
363 return m_num_x;
364}
365
366
367/***********************************************************************//**
368 * @brief Returns number of pixels in y coordinate
369 *
370 * @return Number of pixels in the Y direction.
371 *
372 * Returns the number of pixels in the Y direction. If the sky map is a
373 * one dimensional array (which is the case for the Healpix projection),
374 * the method returns 0.
375 ***************************************************************************/
376inline
377const int& GSkyMap::ny(void) const
378{
379 return m_num_y;
380}
381
382
383/***********************************************************************//**
384 * @brief Returns number of maps
385 *
386 * @return Number of maps in the sky map object.
387 ***************************************************************************/
388inline
389const int& GSkyMap::nmaps(void) const
390{
391 return m_num_maps;
392}
393
394
395/***********************************************************************//**
396 * @brief Returns shape of maps
397 *
398 * @return Shape of maps in the sky map object.
399 ***************************************************************************/
400inline
401const std::vector<int>& GSkyMap::shape(void) const
402{
403 return m_shape;
404}
405
406
407/***********************************************************************//**
408 * @brief Returns dimension of maps
409 *
410 * @return Number of map dimensions.
411 ***************************************************************************/
412inline
413int GSkyMap::ndim(void) const
414{
415 return (int)m_shape.size();
416}
417
418
419/***********************************************************************//**
420 * @brief Smooth sky map
421 *
422 * @param[in] kernel Smoothing kernel type ("DISK", "GAUSSIAN").
423 * @param[in] par Smoothing parameter.
424 *
425 * Smoothes all sky maps using the specified @p kernel and a smoothing
426 * parameter. For the "DISK" kernel the smoothing parameter is the disk
427 * radius in degrees. For the "GAUSSIAN" kernel the smoothing parameter is
428 * the Gaussian sigma in degrees.
429 ***************************************************************************/
430inline
431void GSkyMap::smooth(const std::string& kernel, const double& par)
432{
433 convolve(kernel, par, true);
434 return;
435}
436
437
438/***********************************************************************//**
439 * @brief Correlates sky map
440 *
441 * @param[in] kernel Correlation kernel type ("DISK", "GAUSSIAN").
442 * @param[in] par Correlation parameter.
443 *
444 * Correlates all sky maps using the specified @p kernel and a correlation
445 * parameter. For the "DISK" kernel the correlation parameter is the disk
446 * radius in degrees. For the "GAUSSIAN" kernel the correlation parameter is
447 * the Gaussian sigma in degrees.
448 ***************************************************************************/
449inline
450void GSkyMap::correlate(const std::string& kernel, const double& par)
451{
452 convolve(kernel, par, false);
453 return;
454}
455
456
457/***********************************************************************//**
458 * @brief Returns pointer to sky projection
459 *
460 * @return Pointer to sky projection (NULL if no projection is defined).
461 ***************************************************************************/
462inline
464{
465 return m_proj;
466}
467
468
469/***********************************************************************//**
470 * @brief Returns pointer to pixel data
471 *
472 * @return Pointer to pixel data.
473 ***************************************************************************/
474inline
475const double* GSkyMap::pixels(void) const
476{
477 return (m_pixels.data());
478}
479
480#endif /* GSKYMAP_HPP */
Definition of interface for all GammaLib classes.
Bilinear interpolator class interface definition.
N-dimensional array class interface definition.
Sky direction class interface definition.
Sky map pixel class definition.
Abstract sky projection base class definition.
GChatter
Definition GTypemaps.hpp:33
@ NORMAL
Definition GTypemaps.hpp:36
Interface class for all GammaLib classes.
Definition GBase.hpp:52
Bilinear interpolator class.
Definition GBilinear.hpp:40
Filename class.
Definition GFilename.hpp:62
FITS binary table class.
Abstract FITS extension base class.
Definition GFitsHDU.hpp:51
Double precision FITS image class.
Abstract FITS image base class.
Abstract interface for FITS table.
FITS file class.
Definition GFits.hpp:63
Generic matrix class definition.
Definition GMatrix.hpp:79
N-dimensional array class.
Definition GNdarray.hpp:44
const double * data(void) const
Data access method (const version)
Definition GNdarray.hpp:388
Sky direction class.
Definition GSkyDir.hpp:62
Sky map class.
Definition GSkyMap.hpp:89
GSkyMap & operator*=(const GSkyMap &map)
Multiplication operator.
Definition GSkyMap.cpp:578
friend GSkyMap sqrt(const GSkyMap &map)
Computes square root of sky map elements.
Definition GSkyMap.cpp:3930
friend GSkyMap clip(const GSkyMap &map, const double &thresh)
Clips map at given value.
Definition GSkyMap.cpp:4128
GSkyMap operator-(const GSkyMap &map) const
Binary sky map subtraction.
Definition GSkyMap.hpp:269
void smooth(const std::string &kernel, const double &par)
Smooth sky map.
Definition GSkyMap.hpp:431
GSkyDir m_last_dir
Last sky direction.
Definition GSkyMap.hpp:238
void set_wcs(const std::string &wcs, const std::string &coords, const double &crval1, const double &crval2, const double &crpix1, const double &crpix2, const double &cdelt1, const double &cdelt2)
Set World Coordinate System.
Definition GSkyMap.cpp:2946
double solidangle(const int &index) const
Returns solid angle of pixel.
Definition GSkyMap.cpp:1858
int ndim(void) const
Returns dimension of maps.
Definition GSkyMap.hpp:413
const int & nmaps(void) const
Returns number of maps.
Definition GSkyMap.hpp:389
void read_healpix(const GFitsTable &table)
Read Healpix data from FITS table.
Definition GSkyMap.cpp:3008
GSkyMap & operator+=(const GSkyMap &map)
Map addition operator.
Definition GSkyMap.cpp:398
int m_num_maps
Number of maps (used for pixel allocation)
Definition GSkyMap.hpp:228
void clear(void)
Clear instance.
Definition GSkyMap.cpp:1100
void stack_maps(void)
Stack all maps into a single map.
Definition GSkyMap.cpp:2341
bool is_same(const GSkyMap &map) const
Check if map is the same.
Definition GSkyMap.cpp:3675
GBilinear m_interpol
Bilinear interpolator.
Definition GSkyMap.hpp:239
GSkyRegionCircle region_circle(void) const
Return sky region circle that encloses the sky map.
Definition GSkyMap.cpp:2401
GSkyDir inx2dir(const int &index) const
Returns sky direction of pixel.
Definition GSkyMap.cpp:1331
void alloc_wcs(const GFitsImage &image)
Allocate WCS class.
Definition GSkyMap.cpp:3228
GSkyMap operator+(const GSkyMap &map) const
Binary sky map addition.
Definition GSkyMap.hpp:252
GSkyProjection * m_proj
Pointer to sky projection.
Definition GSkyMap.hpp:232
GNdarray convolution_kernel(const std::string &kernel, const double &par, const bool &normalise) const
Return convolution kernel.
Definition GSkyMap.cpp:3813
bool is_empty(void) const
Signals if sky map is empty.
Definition GSkyMap.hpp:331
void read_wcs(const GFitsImage &image)
Read WCS image from FITS HDU.
Definition GSkyMap.cpp:3140
int m_num_y
Number of pixels in y direction (only 2D)
Definition GSkyMap.hpp:230
double & operator()(const int &index, const int &map=0)
Pixel index access operator.
Definition GSkyMap.cpp:789
void save(const GFilename &filename, const bool &clobber=false) const
Save sky map into FITS file.
Definition GSkyMap.cpp:2611
void correlate(const std::string &kernel, const double &par)
Correlates sky map.
Definition GSkyMap.hpp:450
int dir2inx(const GSkyDir &dir) const
Returns pixel index for a given sky direction.
Definition GSkyMap.cpp:1445
GSkyMap extract(const int &map, const int &nmaps=1) const
Extract maps into a new sky map object.
Definition GSkyMap.cpp:2139
bool is_healpix(const GFitsHDU &hdu) const
Check if HDU contains HEALPix data.
Definition GSkyMap.cpp:3624
const int & nx(void) const
Returns number of pixels in x coordinate.
Definition GSkyMap.hpp:361
void read(const GFitsHDU &hdu)
Read skymap from FITS HDU.
Definition GSkyMap.cpp:2664
void copy_members(const GSkyMap &map)
Copy class members.
Definition GSkyMap.cpp:2884
void convolve(const std::string &kernel, const double &par, const bool &normalise)
Convolve sky map.
Definition GSkyMap.cpp:3756
friend GSkyMap log(const GSkyMap &map)
Computes the natural logarithm of sky map elements.
Definition GSkyMap.cpp:3970
const int & npix(void) const
Returns number of pixels.
Definition GSkyMap.hpp:345
GSkyMap & operator/=(const GSkyMap &map)
Division operator.
Definition GSkyMap.cpp:672
friend GSkyMap log10(const GSkyMap &map)
Computes the base 10 logarithm of sky map elements.
Definition GSkyMap.cpp:4010
GNdarray counts(void) const
Returns array with total number of counts for count maps.
Definition GSkyMap.cpp:1496
GSkyMap * clone(void) const
Clone sky map.
Definition GSkyMap.cpp:1118
GNdarray flux(void) const
Returns array with total flux for sky maps.
Definition GSkyMap.cpp:1820
const int & ny(void) const
Returns number of pixels in y coordinate.
Definition GSkyMap.hpp:377
GSkyMap operator/(const GSkyMap &map) const
Binary sky map division.
Definition GSkyMap.hpp:303
int m_num_x
Number of pixels in x direction (only 2D)
Definition GSkyMap.hpp:229
const GSkyProjection * projection(void) const
Returns pointer to sky projection.
Definition GSkyMap.hpp:463
GFitsHDU * write(GFits &file, const std::string &extname="") const
Write sky map into FITS file.
Definition GSkyMap.cpp:2697
int m_num_pixels
Number of pixels (used for pixel allocation)
Definition GSkyMap.hpp:227
bool m_contained
Sky direction is contained in map.
Definition GSkyMap.hpp:237
GSkyDir pix2dir(const GSkyPixel &pixel) const
Returns sky direction of pixel.
Definition GSkyMap.cpp:1360
friend GSkyMap sign(const GSkyMap &map)
Computes the sign value of sky map elements.
Definition GSkyMap.cpp:4086
GSkyMap(void)
Void constructor.
Definition GSkyMap.cpp:116
const std::vector< int > & shape(void) const
Returns shape of maps.
Definition GSkyMap.hpp:401
void free_members(void)
Delete class members.
Definition GSkyMap.cpp:2911
GSkyMap & operator-=(const GSkyMap &map)
Map subtraction operator.
Definition GSkyMap.cpp:488
bool is_wcs(const GFitsHDU &hdu) const
Check if HDU contains WCS data.
Definition GSkyMap.cpp:3650
GSkyMap & operator=(const GSkyMap &map)
Assignment operator.
Definition GSkyMap.cpp:337
void publish(const std::string &name="") const
Publish sky map.
Definition GSkyMap.cpp:2750
std::string classname(void) const
Return class name.
Definition GSkyMap.hpp:317
GSkyMap operator*(const GSkyMap &map) const
Binary sky map multiplication.
Definition GSkyMap.hpp:286
virtual ~GSkyMap(void)
Destructor.
Definition GSkyMap.cpp:313
void load(const GFilename &filename)
Load skymap from FITS file.
Definition GSkyMap.cpp:2511
friend GSkyMap abs(const GSkyMap &map)
Computes the absolute value of sky map elements.
Definition GSkyMap.cpp:4050
GFitsImageDouble * create_wcs_hdu(void) const
Create FITS HDU containing WCS image.
Definition GSkyMap.cpp:3332
bool overlaps_circle(const GSkyRegionCircle &region) const
Checks whether a circular region overlaps with this map.
Definition GSkyMap.cpp:3561
std::vector< int > m_shape
Shape of the maps.
Definition GSkyMap.hpp:231
bool contains(const GSkyDir &dir) const
Checks if sky direction falls in map.
Definition GSkyMap.cpp:2023
bool m_hascache
Cache is valid.
Definition GSkyMap.hpp:236
GFitsBinTable * create_healpix_hdu(void) const
Create FITS HDU containing Healpix data.
Definition GSkyMap.cpp:3271
const double * pixels(void) const
Returns pointer to pixel data.
Definition GSkyMap.hpp:475
GSkyPixel inx2pix(const int &index) const
Converts pixel index into sky map pixel.
Definition GSkyMap.cpp:1301
int pix2inx(const GSkyPixel &pixel) const
Converts sky map pixel into pixel index.
Definition GSkyMap.cpp:1407
GNdarray m_pixels
Skymap pixels.
Definition GSkyMap.hpp:233
void init_members(void)
Initialise class members.
Definition GSkyMap.cpp:2857
GSkyPixel dir2pix(const GSkyDir &dir) const
Returns sky map pixel for a given sky direction.
Definition GSkyMap.cpp:1472
bool overlaps(const GSkyRegion &region) const
Checks whether a region overlaps with this map.
Definition GSkyMap.cpp:2102
std::string print(const GChatter &chatter=NORMAL) const
Print sky map.
Definition GSkyMap.cpp:2787
Sky map pixel class.
Definition GSkyPixel.hpp:74
Abstract sky projection base class.
Interface for the circular sky region class.
Abstract interface for the sky region class.
Sky region container class.
Vector class.
Definition GVector.hpp:46