Commit a475372f70f45695568af6a7531b3fef46cbf24d

Authored by Jürgen Knödlseder
1 parent fc2d5163

Rename GSkymap to GSkyMap.

Showing 64 changed files with 428 additions and 422 deletions
ChangeLog
... ... @@ -3,6 +3,8 @@
3 3 * Version 0.11.0 released
4 4 =========================
5 5  
  6 + Rename GSkymap to GSkyMap
  7 + Add binary operators to GSkymap class
6 8 GSkymap::operator/=(GSkymap) operator now ignores division by zero
7 9 Remove deadtime correction from GCTAModelCubeBackground (#1503)
8 10 Add GCTAObservation::object() method
... ...
... ... @@ -17,6 +17,9 @@ The GOptimizerLM logger constructor now takes a pointer to a logger instead of
17 17 a reference. This allows setting of a NULL pointer, disabling the logging of the
18 18 optimizer.
19 19  
  20 +The GSkymap class has been renamed to GSkyMap to be consistent with the other
  21 +classes in the sky module.
  22 +
20 23  
21 24 3. Configuration
22 25 -----------------
... ... @@ -100,6 +103,8 @@ This quite severe bug was now corrected.
100 103 The GSkymap::operator/=(GSkymap) operator now sets all pixels to zero for which the
101 104 nominator is zero. No exception is thrown any longer.
102 105  
  106 +Add +, -, * and / binary operators to the GSkymap class.
  107 +
103 108  
104 109 13. Support module
105 110 ------------------
... ...
doc/dev/inst/gammalib_inst.tex
... ... @@ -546,7 +546,7 @@ T_{\rm disp}(t' | \vec{d}, \vec{p}, E, t)
546 546  
547 547 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
548 548 \subsubsection{Sky maps}
549   -\label{sec:GSkymap}
  549 +\label{sec:GSkyMap}
550 550  
551 551  
552 552 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
... ...
doc/dev/sdd/gammalib_sdd.tex
... ... @@ -85,16 +85,16 @@ A Python interface allows scripting of library components.
85 85 \subsection{Skymaps}
86 86  
87 87 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
88   -\subsubsection{{\tt GSkymap}}
  88 +\subsubsection{{\tt GSkyMap}}
89 89  
90   -The {\tt GSkymap} class holds a single skymap (or a set of skymaps with identical coordinates)
  90 +The {\tt GSkyMap} class holds a single skymap (or a set of skymaps with identical coordinates)
91 91 in a specific world coordinate projection (see {\tt GWcs}).
92 92 Three different constructors exist:
93 93 \begin{verbatim}
94   - GSkymap(void);
95   - GSkymap(std::string wcs, std::string coordsys, int nside, std::string ordering,
  94 + GSkyMap(void);
  95 + GSkyMap(std::string wcs, std::string coordsys, int nside, std::string ordering,
96 96 int nmaps = 1);
97   - GSkymap(std::string wcs, std::string coordsys, GSkyDir dir, int nlon, int nlat,
  97 + GSkyMap(std::string wcs, std::string coordsys, GSkyDir dir, int nlon, int nlat,
98 98 double dlon, double dlat, int nmaps = 1);
99 99 \end{verbatim}
100 100 The first one creates an instance of an empty skymap.
... ... @@ -124,7 +124,7 @@ Two coordinate systems are implemented ({\tt coordsys}):
124 124 {\tt GAL} indicates the galactic system (galactic longitude and latitude), and
125 125 {\tt CEL} indicates equatorial or celestial system (Right Ascension and declination).
126 126  
127   -The following methods are defined for {\tt GSkymap}:
  127 +The following methods are defined for {\tt GSkyMap}:
128 128 \begin{verbatim}
129 129 void read(std::string filename); //!< Read skymap from FITS file
130 130 void read(const GFitsHDU* hdu); //!< Read skymap from FITS HDU
... ... @@ -146,7 +146,7 @@ The following methods are defined for {\tt GSkymap}:
146 146 void smooth_gaussian(double sigma); //!< Smooth skymap using Gaussian kernel
147 147 \end{verbatim}
148 148  
149   -The {\tt GSkymap} class contains:
  149 +The {\tt GSkyMap} class contains:
150 150 \begin{verbatim}
151 151 GWcs* m_wcs; //!< Pointer to World Coordinate System projection
152 152 double* m_pixels; //!< Pointer to sky map pixels
... ...
doc/source/howto/sky.rst
... ... @@ -14,8 +14,8 @@ Python:
14 14 .. code-block:: python
15 15  
16 16 >>> import gammalib
17   - >>> healpix = gammalib.GSkymap("healpix.fits")
18   - >>> map = gammalib.GSkymap("CAR","GAL",0.0,0.0,0.5,0.5,100,100)
  17 + >>> healpix = gammalib.GSkyMap("healpix.fits")
  18 + >>> map = gammalib.GSkyMap("CAR","GAL",0.0,0.0,0.5,0.5,100,100)
19 19 >>> map += healpix
20 20 >>> map.save("carmap.fits")
21 21  
... ... @@ -24,8 +24,8 @@ C++:
24 24 .. code-block:: cpp
25 25  
26 26 #include "GammaLib.hpp"
27   - GSkymap healpix("healpix.fits");
28   - GSkymap map("CAR","GAL",0.0,0.0,0.5,0.5,100,100);
  27 + GSkyMap healpix("healpix.fits");
  28 + GSkyMap map("CAR","GAL",0.0,0.0,0.5,0.5,100,100);
29 29 map += healpix;
30 30 map.save("carmap.fits");
31 31  
32 32 \ No newline at end of file
... ...
doc/source/user_manual/modules/cta_overview.rst
... ... @@ -37,7 +37,7 @@ collected by the :doxy:`GObservations` container class).
37 37 The data of binned observations are stored by the
38 38 :doxy:`GCTAEventCube` class. The :doxy:`GCTAEventCube` class holds the
39 39 binned event data in form of a sky map, implemented by the
40   -:doxy:`GSkymap` class. The sky coordinates of all sky map pixels
  40 +:doxy:`GSkyMap` class. The sky coordinates of all sky map pixels
41 41 are stored in an array of CTA instrument directions, implemented
42 42 by the :doxy:`GCTAInstDir` class which holds a single :doxy:`GSkyDir`
43 43 object. The mean energies of the event cube
... ...
doc/source/user_manual/modules/sky.rst
... ... @@ -19,9 +19,9 @@ module and their relations.
19 19  
20 20 The sky module provides classes to handle sky maps, sky coordinates
21 21 and sky regions.
22   -Sky maps are implemented by the :doxy:`GSkymap` class which stores
  22 +Sky maps are implemented by the :doxy:`GSkyMap` class which stores
23 23 intensities for a defined grid of sky coordinates.
24   -A :doxy:`GSkymap` object may hold several sky maps with identical
  24 +A :doxy:`GSkyMap` object may hold several sky maps with identical
25 25 pixelisation, for example to represent the energy-dependence of the
26 26 sky intensities.
27 27 The relation between sky coordinates and pixel coordinates is
... ...
doc/source/user_manual/modules/uml_sky.png

75.8 KB | W: | H:

273 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
examples/cpp/createskymap/createskymap.cpp
1 1 /***************************************************************************
2 2 * createskymap.cpp - Create sky map *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2013-2015 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -49,7 +49,7 @@ int main(void) {
49 49 double dec(0.0);
50 50 double binsz(0.01);
51 51 int npix(300);
52   - GSkymap image("CAR", "CEL", ra, dec, -binsz, binsz, npix, npix, 1);
  52 + GSkyMap image("CAR", "CEL", ra, dec, -binsz, binsz, npix, npix, 1);
53 53  
54 54 // Fill the sky map with the model image
55 55 GEnergy energy; // Dummy (not relevant as model is not energy dependent)
... ...
examples/python/example_radial_models.py
... ... @@ -3,7 +3,7 @@
3 3 # This script makes an image from a radial model and verifies that the
4 4 # model is correctly normalized.
5 5 #
6   -# Copyright (C) 2011-2013 Juergen Knoedlseder
  6 +# Copyright (C) 2011-2015 Juergen Knoedlseder
7 7 #
8 8 # This program is free software: you can redistribute it and/or modify
9 9 # it under the terms of the GNU General Public License as published by
... ... @@ -30,7 +30,7 @@ def test_radial_model(name, model, clobber=True):
30 30 """
31 31 # Make a 2D FITS image (cartesian projection, celestial coordinates)
32 32 ra, dec, binsz, npix = 0, 0, 0.01, 300
33   - image = gammalib.GSkymap("CAR", "CEL", ra, dec, -binsz, binsz, npix, npix, 1)
  33 + image = gammalib.GSkyMap("CAR", "CEL", ra, dec, -binsz, binsz, npix, npix, 1)
34 34  
35 35 # Fill the image
36 36 energy = gammalib.GEnergy()
... ...
include/GException.hpp
... ... @@ -398,7 +398,7 @@ public:
398 398 };
399 399  
400 400  
401   - // GSkymap exceptions
  401 + // GSkyMap exceptions
402 402 class skymap : public GExceptionHandler {
403 403 public:
404 404 skymap(std::string origin, std::string message = "");
... ...
include/GModelSpatialDiffuseCube.hpp
... ... @@ -34,7 +34,7 @@
34 34 #include "GModelSpectralNodes.hpp"
35 35 #include "GModelPar.hpp"
36 36 #include "GSkyDir.hpp"
37   -#include "GSkymap.hpp"
  37 +#include "GSkyMap.hpp"
38 38 #include "GNodeArray.hpp"
39 39 #include "GXmlElement.hpp"
40 40 #include "GEbounds.hpp"
... ... @@ -59,7 +59,7 @@ public:
59 59 explicit GModelSpatialDiffuseCube(const GXmlElement& xml);
60 60 GModelSpatialDiffuseCube(const std::string& filename,
61 61 const double& value = 1.0);
62   - GModelSpatialDiffuseCube(const GSkymap& cube,
  62 + GModelSpatialDiffuseCube(const GSkyMap& cube,
63 63 const GEnergies& energies,
64 64 const double& value = 1.0);
65 65 GModelSpatialDiffuseCube(const GModelSpatialDiffuseCube& model);
... ... @@ -94,8 +94,8 @@ public:
94 94 void value(const double& value);
95 95 const std::string& filename(void) const;
96 96 void filename(const std::string& filename);
97   - const GSkymap& cube(void) const;
98   - void cube(const GSkymap& cube);
  97 + const GSkyMap& cube(void) const;
  98 + void cube(const GSkyMap& cube);
99 99 GEnergies energies(void);
100 100 void energies(const GEnergies& energies);
101 101 const GModelSpectralNodes& spectrum(void) const;
... ... @@ -116,7 +116,7 @@ protected:
116 116 GModelPar m_value; //!< Value
117 117 std::string m_filename; //!< Name of map cube
118 118 bool m_loaded; //!< Signals if map cube has been loaded
119   - GSkymap m_cube; //!< Map cube
  119 + GSkyMap m_cube; //!< Map cube
120 120 GNodeArray m_logE; //!< Log10(energy) values of the maps
121 121 GEbounds m_ebounds; //!< Energy bounds of the maps
122 122 std::vector<double> m_mc_cache; //!< Monte Carlo cache
... ... @@ -247,7 +247,7 @@ void GModelSpatialDiffuseCube::filename(const std::string&amp; filename)
247 247 * Returns the map cube.
248 248 ***************************************************************************/
249 249 inline
250   -const GSkymap& GModelSpatialDiffuseCube::cube(void) const
  250 +const GSkyMap& GModelSpatialDiffuseCube::cube(void) const
251 251 {
252 252 return (m_cube);
253 253 }
... ... @@ -261,7 +261,7 @@ const GSkymap&amp; GModelSpatialDiffuseCube::cube(void) const
261 261 * Set the map cube of the spatial map cube model.
262 262 ***************************************************************************/
263 263 inline
264   -void GModelSpatialDiffuseCube::cube(const GSkymap& cube)
  264 +void GModelSpatialDiffuseCube::cube(const GSkyMap& cube)
265 265 {
266 266 m_filename.clear();
267 267 m_loaded = false;
... ...
include/GModelSpatialDiffuseMap.hpp
... ... @@ -33,7 +33,7 @@
33 33 #include "GModelSpatialDiffuse.hpp"
34 34 #include "GModelPar.hpp"
35 35 #include "GSkyDir.hpp"
36   -#include "GSkymap.hpp"
  36 +#include "GSkyMap.hpp"
37 37 #include "GXmlElement.hpp"
38 38  
39 39  
... ... @@ -54,7 +54,7 @@ public:
54 54 GModelSpatialDiffuseMap(const std::string& filename,
55 55 const double& value = 1.0,
56 56 const bool& normalize = true);
57   - GModelSpatialDiffuseMap(const GSkymap& map,
  57 + GModelSpatialDiffuseMap(const GSkyMap& map,
58 58 const double& value = 1.0,
59 59 const bool& normalize = true);
60 60 GModelSpatialDiffuseMap(const GModelSpatialDiffuseMap& model);
... ... @@ -86,8 +86,8 @@ public:
86 86 void value(const double& value);
87 87 const std::string& filename(void) const;
88 88 void load(const std::string& filename);
89   - const GSkymap& map(void) const;
90   - void map(const GSkymap& map);
  89 + const GSkyMap& map(void) const;
  90 + void map(const GSkyMap& map);
91 91 bool normalize(void) const;
92 92  
93 93 protected:
... ... @@ -99,7 +99,7 @@ protected:
99 99  
100 100 // Protected members
101 101 GModelPar m_value; //!< Value
102   - GSkymap m_map; //!< Skymap
  102 + GSkyMap m_map; //!< Skymap
103 103 std::string m_filename; //!< Name of skymap
104 104 std::vector<double> m_mc_cache; //!< Monte Carlo cache
105 105 std::vector<double> m_mc_max; //!< Monte Carlo maximum
... ... @@ -188,7 +188,7 @@ const std::string&amp; GModelSpatialDiffuseMap::filename(void) const
188 188 * Returns the sky map.
189 189 ***************************************************************************/
190 190 inline
191   -const GSkymap& GModelSpatialDiffuseMap::map(void) const
  191 +const GSkyMap& GModelSpatialDiffuseMap::map(void) const
192 192 {
193 193 return (m_map);
194 194 }
... ... @@ -202,7 +202,7 @@ const GSkymap&amp; GModelSpatialDiffuseMap::map(void) const
202 202 * Set the sky map.
203 203 ***************************************************************************/
204 204 inline
205   -void GModelSpatialDiffuseMap::map(const GSkymap& map)
  205 +void GModelSpatialDiffuseMap::map(const GSkyMap& map)
206 206 {
207 207 m_map = map;
208 208 prepare_map();
... ...
include/GSkymap.hpp renamed to include/GSkyMap.hpp
1 1 /***************************************************************************
2   - * GSkymap.hpp - Sky map class *
  2 + * GSkyMap.hpp - Sky map class *
3 3 * ----------------------------------------------------------------------- *
4 4 * copyright (C) 2010-2015 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
... ... @@ -19,7 +19,7 @@
19 19 * *
20 20 ***************************************************************************/
21 21 /**
22   - * @file GSkymap.hpp
  22 + * @file GSkyMap.hpp
23 23 * @brief Sky map class definition
24 24 * @author Juergen Knoedlseder
25 25 */
... ... @@ -44,7 +44,7 @@
44 44  
45 45  
46 46 /***********************************************************************//**
47   - * @class GSkymap
  47 + * @class GSkyMap
48 48 *
49 49 * @brief Sky map class
50 50 *
... ... @@ -77,19 +77,19 @@
77 77 * GSkyPixel pixel = map.dir2pix(dir); // Sky direction to pixel
78 78 *
79 79 ***************************************************************************/
80   -class GSkymap : public GBase {
  80 +class GSkyMap : public GBase {
81 81  
82   - friend GSkymap sqrt(const GSkymap& map);
  82 + friend GSkyMap sqrt(const GSkyMap& map);
83 83  
84 84 public:
85 85 // Constructors and destructors
86   - GSkymap(void);
87   - explicit GSkymap(const std::string& filename);
88   - explicit GSkymap(const std::string& coords,
  86 + GSkyMap(void);
  87 + explicit GSkyMap(const std::string& filename);
  88 + explicit GSkyMap(const std::string& coords,
89 89 const int& nside,
90 90 const std::string& order,
91 91 const int& nmaps = 1);
92   - explicit GSkymap(const std::string& wcs,
  92 + explicit GSkyMap(const std::string& wcs,
93 93 const std::string& coords,
94 94 const double& x,
95 95 const double& y,
... ... @@ -98,24 +98,24 @@ public:
98 98 const int& nx,
99 99 const int& ny,
100 100 const int& nmaps = 1);
101   - GSkymap(const GSkymap& map);
102   - virtual ~GSkymap(void);
  101 + GSkyMap(const GSkyMap& map);
  102 + virtual ~GSkyMap(void);
103 103  
104 104 // Operators
105   - GSkymap& operator=(const GSkymap& map);
106   - GSkymap& operator=(const double& value);
107   - GSkymap& operator+=(const GSkymap& map);
108   - GSkymap& operator+=(const double& value);
109   - GSkymap& operator-=(const GSkymap& map);
110   - GSkymap& operator-=(const double& value);
111   - GSkymap& operator*=(const GSkymap& map);
112   - GSkymap& operator*=(const double& factor);
113   - GSkymap& operator/=(const GSkymap& map);
114   - GSkymap& operator/=(const double& factor);
115   - GSkymap operator+(const GSkymap& map) const;
116   - GSkymap operator-(const GSkymap& map) const;
117   - GSkymap operator*(const GSkymap& map) const;
118   - GSkymap operator/(const GSkymap& map) const;
  105 + GSkyMap& operator=(const GSkyMap& map);
  106 + GSkyMap& operator=(const double& value);
  107 + GSkyMap& operator+=(const GSkyMap& map);
  108 + GSkyMap& operator+=(const double& value);
  109 + GSkyMap& operator-=(const GSkyMap& map);
  110 + GSkyMap& operator-=(const double& value);
  111 + GSkyMap& operator*=(const GSkyMap& map);
  112 + GSkyMap& operator*=(const double& factor);
  113 + GSkyMap& operator/=(const GSkyMap& map);
  114 + GSkyMap& operator/=(const double& factor);
  115 + GSkyMap operator+(const GSkyMap& map) const;
  116 + GSkyMap operator-(const GSkyMap& map) const;
  117 + GSkyMap operator*(const GSkyMap& map) const;
  118 + GSkyMap operator/(const GSkyMap& map) const;
119 119 double& operator()(const int& index, const int& map = 0);
120 120 const double& operator()(const int& index, const int& map = 0) const;
121 121 double& operator()(const GSkyPixel& pixel, const int& map = 0);
... ... @@ -124,7 +124,7 @@ public:
124 124  
125 125 // Methods
126 126 void clear(void);
127   - GSkymap* clone(void) const;
  127 + GSkyMap* clone(void) const;
128 128 std::string classname(void) const;
129 129 const int& npix(void) const;
130 130 const int& nx(void) const;
... ... @@ -146,7 +146,7 @@ public:
146 146 const GSkyProjection* projection(void) const;
147 147 void projection(const GSkyProjection& proj);
148 148 const double* pixels(void) const;
149   - GSkymap extract(const int& map, const int& nmaps = 1) const;
  149 + GSkyMap extract(const int& map, const int& nmaps = 1) const;
150 150 void stack_maps(void);
151 151 void load(const std::string& filename);
152 152 void save(const std::string& filename, bool clobber = false) const;
... ... @@ -158,7 +158,7 @@ private:
158 158 // Private methods
159 159 void init_members(void);
160 160 void alloc_pixels(void);
161   - void copy_members(const GSkymap& map);
  161 + void copy_members(const GSkyMap& map);
162 162 void free_members(void);
163 163 void set_wcs(const std::string& wcs, const std::string& coords,
164 164 const double& crval1, const double& crval2,
... ... @@ -200,9 +200,9 @@ private:
200 200 * Returns the sum of two sky maps.
201 201 ***************************************************************************/
202 202 inline
203   -GSkymap GSkymap::operator+(const GSkymap& map) const
  203 +GSkyMap GSkyMap::operator+(const GSkyMap& map) const
204 204 {
205   - GSkymap result = *this;
  205 + GSkyMap result = *this;
206 206 result += map;
207 207 return result;
208 208 }
... ... @@ -217,9 +217,9 @@ GSkymap GSkymap::operator+(const GSkymap&amp; map) const
217 217 * Returns the difference of two sky maps.
218 218 ***************************************************************************/
219 219 inline
220   -GSkymap GSkymap::operator-(const GSkymap& map) const
  220 +GSkyMap GSkyMap::operator-(const GSkyMap& map) const
221 221 {
222   - GSkymap result = *this;
  222 + GSkyMap result = *this;
223 223 result -= map;
224 224 return result;
225 225 }
... ... @@ -234,9 +234,9 @@ GSkymap GSkymap::operator-(const GSkymap&amp; map) const
234 234 * Returns the product of two sky maps.
235 235 ***************************************************************************/
236 236 inline
237   -GSkymap GSkymap::operator*(const GSkymap& map) const
  237 +GSkyMap GSkyMap::operator*(const GSkyMap& map) const
238 238 {
239   - GSkymap result = *this;
  239 + GSkyMap result = *this;
240 240 result *= map;
241 241 return result;
242 242 }
... ... @@ -251,9 +251,9 @@ GSkymap GSkymap::operator*(const GSkymap&amp; map) const
251 251 * Returns the ratio of two sky maps.
252 252 ***************************************************************************/
253 253 inline
254   -GSkymap GSkymap::operator/(const GSkymap& map) const
  254 +GSkyMap GSkyMap::operator/(const GSkyMap& map) const
255 255 {
256   - GSkymap result = *this;
  256 + GSkyMap result = *this;
257 257 result /= map;
258 258 return result;
259 259 }
... ... @@ -262,12 +262,12 @@ GSkymap GSkymap::operator/(const GSkymap&amp; map) const
262 262 /***********************************************************************//**
263 263 * @brief Return class name
264 264 *
265   - * @return String containing the class name ("GSkymap").
  265 + * @return String containing the class name ("GSkyMap").
266 266 ***************************************************************************/
267 267 inline
268   -std::string GSkymap::classname(void) const
  268 +std::string GSkyMap::classname(void) const
269 269 {
270   - return ("GSkymap");
  270 + return ("GSkyMap");
271 271 }
272 272  
273 273  
... ... @@ -279,7 +279,7 @@ std::string GSkymap::classname(void) const
279 279 * Returns the number of pixels in one sky map.
280 280 ***************************************************************************/
281 281 inline
282   -const int& GSkymap::npix(void) const
  282 +const int& GSkyMap::npix(void) const
283 283 {
284 284 return m_num_pixels;
285 285 }
... ... @@ -295,7 +295,7 @@ const int&amp; GSkymap::npix(void) const
295 295 * the method returns 0.
296 296 ***************************************************************************/
297 297 inline
298   -const int& GSkymap::nx(void) const
  298 +const int& GSkyMap::nx(void) const
299 299 {
300 300 return m_num_x;
301 301 }
... ... @@ -311,7 +311,7 @@ const int&amp; GSkymap::nx(void) const
311 311 * the method returns 0.
312 312 ***************************************************************************/
313 313 inline
314   -const int& GSkymap::ny(void) const
  314 +const int& GSkyMap::ny(void) const
315 315 {
316 316 return m_num_y;
317 317 }
... ... @@ -323,7 +323,7 @@ const int&amp; GSkymap::ny(void) const
323 323 * @return Number of maps in the sky map object.
324 324 ***************************************************************************/
325 325 inline
326   -const int& GSkymap::nmaps(void) const
  326 +const int& GSkyMap::nmaps(void) const
327 327 {
328 328 return m_num_maps;
329 329 }
... ... @@ -335,7 +335,7 @@ const int&amp; GSkymap::nmaps(void) const
335 335 * @return Pointer to sky projection (NULL if no projection is defined).
336 336 ***************************************************************************/
337 337 inline
338   -const GSkyProjection* GSkymap::projection(void) const
  338 +const GSkyProjection* GSkyMap::projection(void) const
339 339 {
340 340 return m_proj;
341 341 }
... ... @@ -347,7 +347,7 @@ const GSkyProjection* GSkymap::projection(void) const
347 347 * @return Pointer to pixel data.
348 348 ***************************************************************************/
349 349 inline
350   -const double* GSkymap::pixels(void) const
  350 +const double* GSkyMap::pixels(void) const
351 351 {
352 352 return m_pixels;
353 353 }
... ...
include/GammaLib.hpp
... ... @@ -140,7 +140,7 @@
140 140 #include "GSkyDir.hpp"
141 141 #include "GHorizDir.hpp"
142 142 #include "GSkyPixel.hpp"
143   -#include "GSkymap.hpp"
  143 +#include "GSkyMap.hpp"
144 144 #include "GSkyRegions.hpp"
145 145 #include "GSkyRegion.hpp"
146 146 #include "GSkyRegionCircle.hpp"
... ...
include/Makefile.am
... ... @@ -81,7 +81,7 @@ pkginclude_HEADERS = GammaLib.hpp \
81 81 GSkyDir.hpp \
82 82 GHorizDir.hpp \
83 83 GSkyPixel.hpp \
84   - GSkymap.hpp \
  84 + GSkyMap.hpp \
85 85 GSkyRegion.hpp \
86 86 GSkyRegions.hpp \
87 87 GSkyRegionCircle.hpp \
... ...
inst/com/include/GCOMEventCube.hpp
1 1 /***************************************************************************
2 2 * GCOMEventCube.hpp - COMPTEL event bin container class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012-2014 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2015 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -34,7 +34,7 @@
34 34 #include "GCOMEventBin.hpp"
35 35 #include "GCOMInstDir.hpp"
36 36 #include "GSkyDir.hpp"
37   -#include "GSkymap.hpp"
  37 +#include "GSkyMap.hpp"
38 38 #include "GEbounds.hpp"
39 39 #include "GGti.hpp"
40 40 #include "GEnergy.hpp"
... ... @@ -54,7 +54,7 @@ public:
54 54 // Constructors and destructors
55 55 GCOMEventCube(void);
56 56 explicit GCOMEventCube(const std::string& filename);
57   - explicit GCOMEventCube(const GSkymap& map, const GEbounds& ebds,
  57 + explicit GCOMEventCube(const GSkyMap& map, const GEbounds& ebds,
58 58 const GGti& gti, const double& phimin,
59 59 const double& dphi);
60 60 GCOMEventCube(const GCOMEventCube& cube);
... ... @@ -81,9 +81,9 @@ public:
81 81 virtual std::string print(const GChatter& chatter = NORMAL) const;
82 82  
83 83 // Other methods
84   - void map(const GSkymap& map, const double& phimin,
  84 + void map(const GSkyMap& map, const double& phimin,
85 85 const double& dphi);
86   - const GSkymap& map(void) const { return m_map; }
  86 + const GSkyMap& map(void) const { return m_map; }
87 87 int nchi(void) const { return m_map.nx(); }
88 88 int npsi(void) const { return m_map.ny(); }
89 89 int nphi(void) const { return m_map.nmaps(); }
... ... @@ -104,7 +104,7 @@ protected:
104 104 // Protected members
105 105 GCOMEventBin m_bin; //!< Actual event bin
106 106 GCOMInstDir m_dir; //!< Actual event direction
107   - GSkymap m_map; //!< Counts map stored as sky map
  107 + GSkyMap m_map; //!< Counts map stored as sky map
108 108 GTime m_time; //!< Event cube mean time
109 109 double m_ontime; //!< Event cube ontime (sec)
110 110 GEnergy m_energy; //!< Event cube mean energy
... ...
inst/com/include/GCOMObservation.hpp
1 1 /***************************************************************************
2 2 * GCOMObservation.hpp - COMPTEL observation class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012-2014 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2015 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -31,7 +31,7 @@
31 31 #include "GObservation.hpp"
32 32 #include "GTime.hpp"
33 33 #include "GModel.hpp"
34   -#include "GSkymap.hpp"
  34 +#include "GSkyMap.hpp"
35 35 #include "GCOMResponse.hpp"
36 36 #include "GCaldb.hpp"
37 37  
... ... @@ -87,9 +87,9 @@ public:
87 87 void ewidth(const double& ewidth) { m_ewidth=ewidth; }
88 88 const double& obs_id(void) const { return m_obs_id; }
89 89 const double& ewidth(void) const { return m_ewidth; }
90   - const GSkymap& drb(void) const { return m_drb; }
91   - const GSkymap& drg(void) const { return m_drg; }
92   - const GSkymap& drx(void) const { return m_drx; }
  90 + const GSkyMap& drb(void) const { return m_drb; }
  91 + const GSkyMap& drg(void) const { return m_drg; }
  92 + const GSkyMap& drx(void) const { return m_drx; }
93 93  
94 94 protected:
95 95 // Protected methods
... ... @@ -100,7 +100,7 @@ protected:
100 100 void load_drb(const std::string& drbname);
101 101 void load_drg(const std::string& drgname);
102 102 void load_drx(const std::string& drxname);
103   - bool check_map(const GSkymap& map) const;
  103 + bool check_map(const GSkyMap& map) const;
104 104 void read_attributes(const GFitsHDU* hdu);
105 105 void write_attributes(GFitsHDU* hdu) const;
106 106  
... ... @@ -110,9 +110,9 @@ protected:
110 110 std::string m_drbname; //!< DRB filename
111 111 std::string m_drgname; //!< DRG filename
112 112 std::string m_drxname; //!< DRX filename
113   - GSkymap m_drb; //!< Background model
114   - GSkymap m_drg; //!< Geometry factors
115   - GSkymap m_drx; //!< Exposure map
  113 + GSkyMap m_drb; //!< Background model
  114 + GSkyMap m_drg; //!< Geometry factors
  115 + GSkyMap m_drx; //!< Exposure map
116 116 GSkyDir m_pointing; //!< Pointing direction
117 117 GCOMResponse m_response; //!< Response functions
118 118 double m_obs_id; //!< Observation ID
... ...
inst/com/pyext/GCOMEventCube.i
... ... @@ -39,7 +39,7 @@ public:
39 39 // Constructors and destructors
40 40 GCOMEventCube(void);
41 41 explicit GCOMEventCube(const std::string& filename);
42   - explicit GCOMEventCube(const GSkymap& map, const GEbounds& ebds,
  42 + explicit GCOMEventCube(const GSkyMap& map, const GEbounds& ebds,
43 43 const GGti& gti, const double& phimin,
44 44 const double& dphi);
45 45 GCOMEventCube(const GCOMEventCube& cube);
... ... @@ -60,9 +60,9 @@ public:
60 60 virtual int number(void) const;
61 61  
62 62 // Other methods
63   - void map(const GSkymap& map, const double& phimin,
  63 + void map(const GSkyMap& map, const double& phimin,
64 64 const double& dphi);
65   - const GSkymap& map(void) const;
  65 + const GSkyMap& map(void) const;
66 66 int nchi(void) const;
67 67 int npsi(void) const;
68 68 int nphi(void) const;
... ...
inst/com/pyext/GCOMObservation.i
1 1 /***************************************************************************
2 2 * GCOMObservation.i - COMPTEL observation class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012-2014 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2015 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -71,9 +71,9 @@ public:
71 71 void ewidth(const double& ewidth);
72 72 const double& obs_id(void) const;
73 73 const double& ewidth(void) const;
74   - const GSkymap& drb(void) const;
75   - const GSkymap& drg(void) const;
76   - const GSkymap& drx(void) const;
  74 + const GSkyMap& drb(void) const;
  75 + const GSkyMap& drg(void) const;
  76 + const GSkyMap& drx(void) const;
77 77 };
78 78  
79 79  
... ...
inst/com/src/GCOMEventCube.cpp
1 1 /***************************************************************************
2 2 * GCOMEventCube.cpp - COMPTEL event bin container class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2015 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -102,7 +102,7 @@ GCOMEventCube::GCOMEventCube(const std::string&amp; filename) : GEventCube()
102 102 * Construct an event cube from sky map, energy boundaries, Good Time
103 103 * Intervals and the scatter angle minimum value and step size.
104 104 ***************************************************************************/
105   -GCOMEventCube::GCOMEventCube(const GSkymap& map, const GEbounds& ebds,
  105 +GCOMEventCube::GCOMEventCube(const GSkyMap& map, const GEbounds& ebds,
106 106 const GGti& gti, const double& phimin,
107 107 const double& dphi) : GEventCube()
108 108 {
... ... @@ -530,7 +530,7 @@ int GCOMEventCube::number(void) const
530 530 *
531 531 * @todo Check if we really need this method.
532 532 ***************************************************************************/
533   -void GCOMEventCube::map(const GSkymap& map, const double& phimin,
  533 +void GCOMEventCube::map(const GSkyMap& map, const double& phimin,
534 534 const double& dphi)
535 535 {
536 536 // Store sky map
... ...
inst/com/src/GCOMObservation.cpp
... ... @@ -790,10 +790,10 @@ void GCOMObservation::load_drx(const std::string&amp; drxname)
790 790 * Compares the dimension and the WCS definition of a sky map to that of the
791 791 * event cube. If both are identical, true is returned, false otherwise.
792 792 ***************************************************************************/
793   -bool GCOMObservation::check_map(const GSkymap& map) const
  793 +bool GCOMObservation::check_map(const GSkyMap& map) const
794 794 {
795 795 // Get reference to event cube map
796   - const GSkymap& ref = dynamic_cast<GCOMEventCube*>(m_events)->map();
  796 + const GSkyMap& ref = dynamic_cast<GCOMEventCube*>(m_events)->map();
797 797  
798 798 // Compare dimensions
799 799 bool same_dimension = ((map.nx() == ref.nx()) &&
... ...
inst/com/src/GCOMSupport.cpp
1 1 /***************************************************************************
2 2 * GCOMSupport.cpp - COMPTEL support functions *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2015 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -51,7 +51,7 @@
51 51 * Nothing is done for all other sky map. This method can thus be
52 52 * transparently be applied to the sky maps read from COMPTEL data files.
53 53 ***************************************************************************/
54   -void com_wcs_mer2car(GSkymap& map)
  54 +void com_wcs_mer2car(GSkyMap& map)
55 55 {
56 56 // Get WCS poiunter
57 57 const GWcs* wcs = dynamic_cast<const GWcs*>(map.projection());
... ...
inst/com/src/GCOMSupport.hpp
1 1 /***************************************************************************
2 2 * GCOMSupport.hpp - COMPTEL support functions *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2015 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -28,13 +28,13 @@
28 28 #define GCOMSUPPORT_HPP
29 29  
30 30 /* __ Includes ___________________________________________________________ */
31   -#include "GSkymap.hpp"
  31 +#include "GSkyMap.hpp"
32 32  
33 33 /* __ Namespaces _________________________________________________________ */
34 34  
35 35 /* __ Constants __________________________________________________________ */
36 36  
37 37 /* __ Prototypes _________________________________________________________ */
38   -void com_wcs_mer2car(GSkymap& map);
  38 +void com_wcs_mer2car(GSkyMap& map);
39 39  
40 40 #endif /* GCOMSUPPORT_HPP */
... ...
inst/cta/include/GCTACubeBackground.hpp
... ... @@ -29,7 +29,7 @@
29 29  
30 30 /* __ Includes ___________________________________________________________ */
31 31 #include <string>
32   -#include "GSkymap.hpp"
  32 +#include "GSkyMap.hpp"
33 33 #include "GNodeArray.hpp"
34 34 #include "GEbounds.hpp"
35 35  
... ... @@ -72,7 +72,7 @@ public:
72 72 void load(const std::string& filename);
73 73 void save(const std::string& filename,
74 74 const bool& clobber = false) const;
75   - const GSkymap& cube(void) const;
  75 + const GSkyMap& cube(void) const;
76 76 const GEbounds& ebounds(void) const;
77 77 const GNodeArray& elogmeans(void) const;
78 78 const std::string& filename(void) const;
... ... @@ -88,7 +88,7 @@ private:
88 88  
89 89 // Members
90 90 mutable std::string m_filename; //!< Name of background response file
91   - GSkymap m_cube; //!< Background cube
  91 + GSkyMap m_cube; //!< Background cube
92 92 GEbounds m_ebounds; //!< Energy bounds for the background cube
93 93 GNodeArray m_elogmeans; //!< Mean energy for the background cube
94 94  
... ... @@ -118,11 +118,11 @@ std::string GCTACubeBackground::classname(void) const
118 118 *
119 119 * @return Sky map holding the background cube.
120 120 *
121   - * Returns the GSkymap object that is used to store the background cube
  121 + * Returns the GSkyMap object that is used to store the background cube
122 122 * information.
123 123 ***************************************************************************/
124 124 inline
125   -const GSkymap& GCTACubeBackground::cube(void) const
  125 +const GSkyMap& GCTACubeBackground::cube(void) const
126 126 {
127 127 return (m_cube);
128 128 }
... ...
inst/cta/include/GCTACubeExposure.hpp
... ... @@ -31,7 +31,7 @@
31 31 #include <string>
32 32 #include "GBase.hpp"
33 33 #include "GFits.hpp"
34   -#include "GSkymap.hpp"
  34 +#include "GSkyMap.hpp"
35 35 #include "GObservations.hpp"
36 36 #include "GCTAObservation.hpp"
37 37 #include "GCTAEventCube.hpp"
... ... @@ -75,7 +75,7 @@ public:
75 75 std::string classname(void) const;
76 76 void set(const GCTAObservation& obs);
77 77 void fill(const GObservations& obs, GLog* log = NULL);
78   - const GSkymap& cube(void) const;
  78 + const GSkyMap& cube(void) const;
79 79 const GEbounds& ebounds(void) const;
80 80 const GGti& gti(void) const;
81 81 const GNodeArray& elogmeans(void) const;
... ... @@ -102,7 +102,7 @@ protected:
102 102  
103 103 // Members
104 104 mutable std::string m_filename; //!< Filename
105   - GSkymap m_cube; //!< Average Exposure cube
  105 + GSkyMap m_cube; //!< Average Exposure cube
106 106 GEbounds m_ebounds; //!< Energy bounds for the Exposure cube
107 107 GNodeArray m_elogmeans; //!< Mean energy for the Exposure cube
108 108 GGti m_gti; //!< Good time interval for the Exposure cube
... ... @@ -136,11 +136,11 @@ std::string GCTACubeExposure::classname(void) const
136 136 *
137 137 * @return Exposure cube.
138 138 *
139   - * Returns the GSkymap object that is used to store the exposure cube
  139 + * Returns the GSkyMap object that is used to store the exposure cube
140 140 * information.
141 141 ***************************************************************************/
142 142 inline
143   -const GSkymap& GCTACubeExposure::cube(void) const
  143 +const GSkyMap& GCTACubeExposure::cube(void) const
144 144 {
145 145 return (m_cube);
146 146 }
... ...
inst/cta/include/GCTACubePsf.hpp
... ... @@ -31,7 +31,7 @@
31 31 #include <string>
32 32 #include "GBase.hpp"
33 33 #include "GFits.hpp"
34   -#include "GSkymap.hpp"
  34 +#include "GSkyMap.hpp"
35 35 #include "GObservations.hpp"
36 36 #include "GCTAObservation.hpp"
37 37 #include "GNodeArray.hpp"
... ... @@ -83,7 +83,7 @@ public:
83 83 std::string classname(void) const;
84 84 void set(const GCTAObservation& obs);
85 85 void fill(const GObservations& obs, GLog* log = NULL);
86   - const GSkymap& map(void) const;
  86 + const GSkyMap& map(void) const;
87 87 const GEbounds& ebounds(void) const;
88 88 const GNodeArray& deltas(void) const;
89 89 const GNodeArray& elogmeans(void) const;
... ... @@ -109,7 +109,7 @@ protected:
109 109  
110 110 // Data
111 111 mutable std::string m_filename; //!< Filename
112   - GSkymap m_cube; //!< PSF cube
  112 + GSkyMap m_cube; //!< PSF cube
113 113 GEbounds m_ebounds; //!< Energy bounds for the PSF cube
114 114 GNodeArray m_elogmeans; //!< Mean log10TeV energy for the PSF cube
115 115 GNodeArray m_deltas; //!< Delta bins (deg) for the PSF cube
... ... @@ -151,7 +151,7 @@ std::string GCTACubePsf::classname(void) const
151 151 * cube.
152 152 ***************************************************************************/
153 153 inline
154   -const GSkymap& GCTACubePsf::map(void) const
  154 +const GSkyMap& GCTACubePsf::map(void) const
155 155 {
156 156 return (m_cube);
157 157 }
... ...
inst/cta/include/GCTACubeSourceDiffuse.hpp
... ... @@ -31,7 +31,7 @@
31 31 #include <string>
32 32 #include <vector>
33 33 #include "GCTACubeSource.hpp"
34   -#include "GSkymap.hpp"
  34 +#include "GSkyMap.hpp"
35 35 #include "GFunction.hpp"
36 36 #include "GCTAResponseCube.hpp"
37 37  
... ... @@ -92,7 +92,7 @@ protected:
92 92 void free_members(void);
93 93  
94 94 // Data members
95   - GSkymap m_cube; //!< Diffuse map convolved with IRF
  95 + GSkyMap m_cube; //!< Diffuse map convolved with IRF
96 96 };
97 97  
98 98  
... ...
inst/cta/include/GCTAEventCube.hpp
... ... @@ -32,7 +32,7 @@
32 32 #include <vector>
33 33 #include "GEventCube.hpp"
34 34 #include "GCTAEventBin.hpp"
35   -#include "GSkymap.hpp"
  35 +#include "GSkyMap.hpp"
36 36 #include "GEbounds.hpp"
37 37 #include "GGti.hpp"
38 38 #include "GEnergy.hpp"
... ... @@ -55,7 +55,7 @@ public:
55 55 // Constructors and destructors
56 56 GCTAEventCube(void);
57 57 explicit GCTAEventCube(const std::string& filename);
58   - GCTAEventCube(const GSkymap& map, const GEbounds& ebds, const GGti& gti);
  58 + GCTAEventCube(const GSkyMap& map, const GEbounds& ebds, const GGti& gti);
59 59 GCTAEventCube(const GCTAEventCube& cube);
60 60 virtual ~GCTAEventCube(void);
61 61  
... ... @@ -82,8 +82,8 @@ public:
82 82 // Other methods
83 83 const GTime& time(void) const;
84 84 const GEnergy& energy(const int& index) const;
85   - void map(const GSkymap& map);
86   - const GSkymap& map(void) const;
  85 + void map(const GSkyMap& map);
  86 + const GSkyMap& map(void) const;
87 87 int nx(void) const;
88 88 int ny(void) const;
89 89 int npix(void) const;
... ... @@ -103,7 +103,7 @@ protected:
103 103 void set_bin(const int& index);
104 104  
105 105 // Protected members
106   - GSkymap m_map; //!< Counts map stored as sky map
  106 + GSkyMap m_map; //!< Counts map stored as sky map
107 107 GCTAEventBin m_bin; //!< Actual event bin
108 108 GTime m_time; //!< Event cube mean time
109 109 std::vector<GCTAInstDir> m_dirs; //!< Array of event directions
... ... @@ -149,7 +149,7 @@ int GCTAEventCube::dim(void) const
149 149 * cube.
150 150 ***************************************************************************/
151 151 inline
152   -const GSkymap& GCTAEventCube::map(void) const
  152 +const GSkyMap& GCTAEventCube::map(void) const
153 153 {
154 154 return (m_map);
155 155 }
... ...
inst/cta/pyext/GCTACubeBackground.i
... ... @@ -59,7 +59,7 @@ public:
59 59 void load(const std::string& filename);
60 60 void save(const std::string& filename,
61 61 const bool& clobber = false) const;
62   - const GSkymap& cube(void) const;
  62 + const GSkyMap& cube(void) const;
63 63 const GEbounds& ebounds(void) const;
64 64 const GNodeArray& elogmeans(void) const;
65 65 const std::string& filename(void) const;
... ...
inst/cta/pyext/GCTACubeExposure.i
... ... @@ -66,7 +66,7 @@ public:
66 66 std::string classname(void) const;
67 67 void set(const GCTAObservation& obs);
68 68 void fill(const GObservations& obs, GLog* log = NULL);
69   - const GSkymap& cube(void) const;
  69 + const GSkyMap& cube(void) const;
70 70 const GEbounds& ebounds(void) const;
71 71 const GGti& gti(void) const;
72 72 const GNodeArray& elogmeans(void) const;
... ...
inst/cta/pyext/GCTACubePsf.i
... ... @@ -75,7 +75,7 @@ public:
75 75 std::string classname(void) const;
76 76 void set(const GCTAObservation& obs);
77 77 void fill(const GObservations& obs, GLog* log = NULL);
78   - const GSkymap& map(void) const;
  78 + const GSkyMap& map(void) const;
79 79 const GEbounds& ebounds(void) const;
80 80 const GNodeArray& deltas(void) const;
81 81 const GNodeArray& elogmeans(void) const;
... ...
inst/cta/pyext/GCTAEventCube.i
... ... @@ -39,7 +39,7 @@ public:
39 39 // Constructors and destructors
40 40 GCTAEventCube(void);
41 41 explicit GCTAEventCube(const std::string& filename);
42   - GCTAEventCube(const GSkymap& map, const GEbounds& ebds, const GGti& gti);
  42 + GCTAEventCube(const GSkyMap& map, const GEbounds& ebds, const GGti& gti);
43 43 GCTAEventCube(const GCTAEventCube& cube);
44 44 virtual ~GCTAEventCube(void);
45 45  
... ... @@ -58,8 +58,8 @@ public:
58 58 virtual int number(void) const;
59 59  
60 60 // Other methods
61   - void map(const GSkymap& map);
62   - const GSkymap& map(void) const;
  61 + void map(const GSkyMap& map);
  62 + const GSkyMap& map(void) const;
63 63 int nx(void) const;
64 64 int ny(void) const;
65 65 int npix(void) const;
... ...
inst/cta/src/GCTACubeExposure.cpp
... ... @@ -175,7 +175,7 @@ GCTACubeExposure::GCTACubeExposure(const std::string&amp; wcs,
175 175 set_eng_axis();
176 176  
177 177 // Create sky map
178   - m_cube = GSkymap(wcs, coords, x, y, dx, dy, nx, ny, m_ebounds.size());
  178 + m_cube = GSkyMap(wcs, coords, x, y, dx, dy, nx, ny, m_ebounds.size());
179 179  
180 180 // Return
181 181 return;
... ...
inst/cta/src/GCTACubePsf.cpp
... ... @@ -226,7 +226,7 @@ GCTACubePsf::GCTACubePsf(const std::string&amp; wcs,
226 226 int nmaps = m_ebounds.size() * m_deltas.size();
227 227  
228 228 // Create sky map
229   - m_cube = GSkymap(wcs, coords, x, y, dx, dy, nx, ny, nmaps);
  229 + m_cube = GSkyMap(wcs, coords, x, y, dx, dy, nx, ny, nmaps);
230 230  
231 231 // Return
232 232 return;
... ... @@ -452,7 +452,7 @@ void GCTACubePsf::fill(const GObservations&amp; obs, GLog* log)
452 452 clear_cube();
453 453  
454 454 // Initialise skymap for exposure weight accumulation
455   - GSkymap exposure(m_cube);
  455 + GSkyMap exposure(m_cube);
456 456  
457 457 // Loop over all observations in container
458 458 for (int i = 0; i < obs.size(); ++i) {
... ...
inst/cta/src/GCTAEventCube.cpp
... ... @@ -98,7 +98,7 @@ GCTAEventCube::GCTAEventCube(const std::string&amp; filename) : GEventCube()
98 98 * Construct instance of events cube from sky map, energy boundaries and
99 99 * Good Time Intervals.
100 100 ***************************************************************************/
101   -GCTAEventCube::GCTAEventCube(const GSkymap& map, const GEbounds& ebds,
  101 +GCTAEventCube::GCTAEventCube(const GSkyMap& map, const GEbounds& ebds,
102 102 const GGti& gti) : GEventCube()
103 103 {
104 104 // Initialise members
... ... @@ -448,7 +448,7 @@ int GCTAEventCube::number(void) const
448 448 /***********************************************************************//**
449 449 * @brief Set event cube from sky map
450 450 ***************************************************************************/
451   -void GCTAEventCube::map(const GSkymap& map)
  451 +void GCTAEventCube::map(const GSkyMap& map)
452 452 {
453 453 // Store sky map
454 454 m_map = map;
... ... @@ -610,7 +610,7 @@ void GCTAEventCube::free_members(void)
610 610 * @param[in] hdu Image HDU.
611 611 *
612 612 * This method reads a CTA counts map from a FITS HDU. The counts map is
613   - * stored in a GSkymap object.
  613 + * stored in a GSkyMap object.
614 614 ***************************************************************************/
615 615 void GCTAEventCube::read_cntmap(const GFitsImage& hdu)
616 616 {
... ...
inst/cta/test/test_CTA.cpp
... ... @@ -692,7 +692,7 @@ void TestGCTAResponse::test_response_irf_diffuse(void)
692 692 pnt.dir(skyDir);
693 693  
694 694 // Setup skymap (10 energy layers)
695   - GSkymap map("CAR", "CEL", src_ra, src_dec, 0.5, 0.5, 10, 10, nebins);
  695 + GSkyMap map("CAR", "CEL", src_ra, src_dec, 0.5, 0.5, 10, 10, nebins);
696 696  
697 697 // Setup time interval
698 698 GGti gti;
... ...
inst/cta/test/test_irf_offset.py
... ... @@ -6,7 +6,7 @@
6 6 # It creates a set of models for different offset angles and evaluates the
7 7 # counts map for this set of models.
8 8 #
9   -# Copyright (C) 2012 Juergen Knoedlseder
  9 +# Copyright (C) 2012-2015 Juergen Knoedlseder
10 10 #
11 11 # This program is free software: you can redistribute it and/or modify
12 12 # it under the terms of the GNU General Public License as published by
... ... @@ -152,7 +152,7 @@ def observation(ra=0.0, dec=0.0, binsz=0.05, npix=200, ebins=10):
152 152 tmin = GTime(0.0)
153 153 tmax = GTime(1800.0)
154 154 gti.append(tmin, tmax)
155   - map = GSkymap("CAR", "CEL", ra, dec, -binsz, binsz, npix, npix, ebins)
  155 + map = GSkyMap("CAR", "CEL", ra, dec, -binsz, binsz, npix, npix, ebins)
156 156 cube = GCTAEventCube(map, ebounds, gti)
157 157 obs.events(cube)
158 158 obs.ontime(1800.0)
... ...
inst/cta/test/test_model.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # This script tests the model computations using the CTA response function.
4 4 #
5   -# Copyright (C) 2011-2014 Jurgen Knodlseder
  5 +# Copyright (C) 2011-2015 Jurgen Knodlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -192,7 +192,7 @@ def observation(ra=83.6331, dec=22.0145, emin=0.1, emax=100.0,
192 192 tmin = gammalib.GTime(0.0)
193 193 tmax = gammalib.GTime(duration)
194 194 gti.append(tmin, tmax)
195   - map = gammalib.GSkymap("CAR", "CEL", ra, dec, -binsz, binsz, npix, npix, ebins)
  195 + map = gammalib.GSkyMap("CAR", "CEL", ra, dec, -binsz, binsz, npix, npix, ebins)
196 196 cube = gammalib.GCTAEventCube(map, ebounds, gti)
197 197 obs.events(cube)
198 198  
... ...
inst/lat/include/GLATEventCube.hpp
... ... @@ -38,7 +38,7 @@
38 38 #include "GFits.hpp"
39 39 #include "GFitsImage.hpp"
40 40 #include "GFitsTable.hpp"
41   -#include "GSkymap.hpp"
  41 +#include "GSkyMap.hpp"
42 42 #include "GNodeArray.hpp"
43 43  
44 44  
... ... @@ -78,11 +78,11 @@ public:
78 78  
79 79 // Other methods
80 80 void time(const GTime& time);
81   - void map(const GSkymap& map);
  81 + void map(const GSkyMap& map);
82 82 void enodes(const GNodeArray& enodes);
83 83 void ontime(const double& ontime);
84 84 const GTime& time(void) const;
85   - const GSkymap& map(void) const;
  85 + const GSkyMap& map(void) const;
86 86 const GNodeArray& enodes(void) const;
87 87 const double& ontime(void) const;
88 88 int nx(void) const;
... ... @@ -91,7 +91,7 @@ public:
91 91 int ebins(void) const;
92 92 int ndiffrsp(void) const;
93 93 std::string diffname(const int& index) const;
94   - GSkymap* diffrsp(const int& index) const;
  94 + GSkyMap* diffrsp(const int& index) const;
95 95 double maxrad(const GSkyDir& dir) const;
96 96  
97 97 protected:
... ... @@ -110,14 +110,14 @@ protected:
110 110  
111 111 // Protected data area
112 112 GLATEventBin m_bin; //!< Actual energy bin
113   - GSkymap m_map; //!< Counts map stored as sky map
  113 + GSkyMap m_map; //!< Counts map stored as sky map
114 114 GTime m_time; //!< Event cube mean time
115 115 double m_ontime; //!< Event cube ontime (sec)
116 116 std::vector<GLATInstDir> m_dirs; //!< Array of event directions
117 117 std::vector<double> m_solidangle; //!< Array of solid angles (sr)
118 118 std::vector<GEnergy> m_energies; //!< Array of log mean energies
119 119 std::vector<GEnergy> m_ewidth; //!< Array of energy bin widths
120   - std::vector<GSkymap*> m_srcmap; //!< Pointers to source maps
  120 + std::vector<GSkyMap*> m_srcmap; //!< Pointers to source maps
121 121 std::vector<std::string> m_srcmap_names; //!< Source map names
122 122 GNodeArray m_enodes; //!< Energy nodes
123 123 };
... ... @@ -192,7 +192,7 @@ const GTime&amp; GLATEventCube::time(void) const
192 192 * @return Sky map.
193 193 ***************************************************************************/
194 194 inline
195   -const GSkymap& GLATEventCube::map(void) const
  195 +const GSkyMap& GLATEventCube::map(void) const
196 196 {
197 197 return m_map;
198 198 }
... ...
inst/lat/include/GLATLtCubeMap.hpp
1 1 /***************************************************************************
2 2 * GLATLtCubeMap.hpp - Fermi LAT livetime cube map class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2015 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -31,7 +31,7 @@
31 31 #include <string>
32 32 #include "GBase.hpp"
33 33 #include "GFitsTable.hpp"
34   -#include "GSkymap.hpp"
  34 +#include "GSkyMap.hpp"
35 35 #include "GSkyDir.hpp"
36 36 #include "GLATAeff.hpp"
37 37 #include "GLATPsf.hpp"
... ... @@ -89,7 +89,7 @@ private:
89 89 void free_members(void);
90 90  
91 91 // Protected members
92   - GSkymap m_map; //!< Lifetime cube map
  92 + GSkyMap m_map; //!< Lifetime cube map
93 93 int m_num_ctheta; //!< Number of bins in cos theta
94 94 int m_num_phi; //!< Number of bins in phi
95 95 double m_min_ctheta; //!< Minimum cos theta value
... ...
inst/lat/pyext/GLATEventCube.i
... ... @@ -59,11 +59,11 @@ public:
59 59  
60 60 // Other methods
61 61 void time(const GTime& time);
62   - void map(const GSkymap& map);
  62 + void map(const GSkyMap& map);
63 63 void enodes(const GNodeArray& enodes);
64 64 void ontime(const double& ontime);
65 65 const GTime& time(void) const;
66   - const GSkymap& map(void) const;
  66 + const GSkyMap& map(void) const;
67 67 const GNodeArray& enodes(void);
68 68 const double& ontime(void) const;
69 69 int nx(void) const;
... ... @@ -72,7 +72,7 @@ public:
72 72 int ebins(void) const;
73 73 int ndiffrsp(void) const;
74 74 std::string diffname(const int& index) const;
75   - GSkymap* diffrsp(const int& index) const;
  75 + GSkyMap* diffrsp(const int& index) const;
76 76 double maxrad(const GSkyDir& dir) const;
77 77 };
78 78  
... ...
inst/lat/src/GLATEventCube.cpp
... ... @@ -447,7 +447,7 @@ int GLATEventCube::number(void) const
447 447 /***********************************************************************//**
448 448 * @brief Set event cube from sky map
449 449 ***************************************************************************/
450   -void GLATEventCube::map(const GSkymap& map)
  450 +void GLATEventCube::map(const GSkyMap& map)
451 451 {
452 452 // Store sky map
453 453 m_map = map;
... ... @@ -575,7 +575,7 @@ std::string GLATEventCube::diffname(const int&amp; index) const
575 575 *
576 576 * Returns pointer to diffuse model sky map.
577 577 ***************************************************************************/
578   -GSkymap* GLATEventCube::diffrsp(const int& index) const
  578 +GSkyMap* GLATEventCube::diffrsp(const int& index) const
579 579 {
580 580 // Optionally check if the index is valid
581 581 #if defined(G_RANGE_CHECK)
... ... @@ -741,7 +741,7 @@ void GLATEventCube::free_members(void)
741 741 * @param[in] hdu Image HDU.
742 742 *
743 743 * This method reads a Fermi/LAT counts map from a FITS image. The counts map
744   - * is stored in a GSkymap object, and a pointer is set up to access the
  744 + * is stored in a GSkyMap object, and a pointer is set up to access the
745 745 * pixels individually. Recall that skymap pixels are stored in the order
746 746 * (ix,iy,ebin).
747 747 ***************************************************************************/
... ... @@ -767,12 +767,12 @@ void GLATEventCube::read_cntmap(const GFitsImage&amp; hdu)
767 767 * Source map not compatible with sky map
768 768 *
769 769 * This method reads a LAT source map from a FITS image. The source map is
770   - * stored in a GSkymap object and is given in units of counts/pixel/MeV.
  770 + * stored in a GSkyMap object and is given in units of counts/pixel/MeV.
771 771 ***************************************************************************/
772 772 void GLATEventCube::read_srcmap(const GFitsImage& hdu)
773 773 {
774 774 // Allocate skymap
775   - GSkymap* map = new GSkymap;
  775 + GSkyMap* map = new GSkyMap;
776 776  
777 777 // Read skymap
778 778 map->read(hdu);
... ...
inst/lat/src/GLATResponse.cpp
... ... @@ -405,7 +405,7 @@ double GLATResponse::irf(const GLATEventBin&amp; event,
405 405 nodes.set_value(srcEng.log10MeV());
406 406  
407 407 // Compute diffuse response
408   - GSkymap* map = cube->diffrsp(idiff);
  408 + GSkyMap* map = cube->diffrsp(idiff);
409 409 const double* pixels = map->pixels() + event.ipix();
410 410 rsp = nodes.wgt_left() * pixels[nodes.inx_left() * map->npix()] +
411 411 nodes.wgt_right() * pixels[nodes.inx_right() * map->npix()];
... ...
inst/lat/test/test_LAT.cpp
1 1 /***************************************************************************
2 2 * test_LAT.cpp - test LAT classes *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2014 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2015 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -331,7 +331,7 @@ void TestGLATLtCube::test_one_ltcube(const std::string&amp; datadir, const double&amp; r
331 331 // Create livetime skymap (no phi dependence)
332 332 test_try("Create livetime skymap (no phi dependence)");
333 333 try {
334   - GSkymap map("GAL", 64, "RING", 1);
  334 + GSkyMap map("GAL", 64, "RING", 1);
335 335 GLATLtCube ltcube(lat_ltcube);
336 336 GEnergy energy;
337 337 for (int i = 0; i < map.npix(); ++i) {
... ... @@ -348,7 +348,7 @@ void TestGLATLtCube::test_one_ltcube(const std::string&amp; datadir, const double&amp; r
348 348 // Create livetime skymap (phi dependence)
349 349 test_try("Create livetime skymap (phi dependence)");
350 350 try {
351   - GSkymap map("GAL", 64, "RING", 1);
  351 + GSkyMap map("GAL", 64, "RING", 1);
352 352 GLATLtCube ltcube(lat_ltcube);
353 353 GEnergy energy;
354 354 for (int i = 0; i < map.npix(); ++i) {
... ...
pyext/GModelSpatialDiffuseCube.i
... ... @@ -41,7 +41,7 @@ public:
41 41 explicit GModelSpatialDiffuseCube(const GXmlElement& xml);
42 42 GModelSpatialDiffuseCube(const std::string& filename,
43 43 const double& value = 1.0);
44   - GModelSpatialDiffuseCube(const GSkymap& map,
  44 + GModelSpatialDiffuseCube(const GSkyMap& map,
45 45 const GEnergies& energies,
46 46 const double& value = 1.0);
47 47 GModelSpatialDiffuseCube(const GModelSpatialDiffuseCube& model);
... ... @@ -72,8 +72,8 @@ public:
72 72 void value(const double& value);
73 73 const std::string& filename(void) const;
74 74 void filename(const std::string& filename);
75   - const GSkymap& cube(void) const;
76   - void cube(const GSkymap& cube);
  75 + const GSkyMap& cube(void) const;
  76 + void cube(const GSkyMap& cube);
77 77 GEnergies energies(void);
78 78 void energies(const GEnergies& energies);
79 79 const GModelSpectralNodes& spectrum(void) const;
... ...
pyext/GModelSpatialDiffuseMap.i
... ... @@ -42,7 +42,7 @@ public:
42 42 GModelSpatialDiffuseMap(const std::string& filename,
43 43 const double& value = 1.0,
44 44 const bool& normalize = true);
45   - GModelSpatialDiffuseMap(const GSkymap& map,
  45 + GModelSpatialDiffuseMap(const GSkyMap& map,
46 46 const double& value = 1.0,
47 47 const bool& normalize = true);
48 48 GModelSpatialDiffuseMap(const GModelSpatialDiffuseMap& model);
... ... @@ -70,8 +70,8 @@ public:
70 70 void value(const double& value);
71 71 const std::string& filename(void) const;
72 72 void load(const std::string& filename);
73   - const GSkymap& map(void) const;
74   - void map(const GSkymap& map);
  73 + const GSkyMap& map(void) const;
  74 + void map(const GSkyMap& map);
75 75 bool normalize(void) const;
76 76 };
77 77  
... ...
pyext/GSkymap.i renamed to pyext/GSkyMap.i
1 1 /***************************************************************************
2   - * GSkymap.i - Sky map class *
  2 + * GSkyMap.i - Sky map class *
3 3 * ----------------------------------------------------------------------- *
4 4 * copyright (C) 2010-2015 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
... ... @@ -19,13 +19,13 @@
19 19 * *
20 20 ***************************************************************************/
21 21 /**
22   - * @file GSkymap.i
  22 + * @file GSkyMap.i
23 23 * @brief Sky map class SWIG file.
24 24 * @author Juergen Knoedlseder
25 25 */
26 26 %{
27 27 /* Put headers and other declarations here that are needed for compilation */
28   -#include "GSkymap.hpp"
  28 +#include "GSkyMap.hpp"
29 29 #include "GTools.hpp"
30 30 %}
31 31  
... ... @@ -71,7 +71,7 @@ static int skymap_tuple(PyObject *input, int *ptr) {
71 71 %}
72 72  
73 73 // This is the typemap that makes use of the function defined above
74   -%typemap(in) int GSkymapInx[ANY](int temp[3]) {
  74 +%typemap(in) int GSkyMapInx[ANY](int temp[3]) {
75 75 if (!skymap_tuple($input,temp)) {
76 76 return NULL;
77 77 }
... ... @@ -79,8 +79,8 @@ static int skymap_tuple(PyObject *input, int *ptr) {
79 79 }
80 80  
81 81 // This typecheck verifies that all arguments are integers. The typecheck
82   -// is needed for using "int GSkymapInx" in overloaded methods.
83   -%typemap(typecheck) int GSkymapInx[ANY] {
  82 +// is needed for using "int GSkyMapInx" in overloaded methods.
  83 +%typemap(typecheck) int GSkyMapInx[ANY] {
84 84 $1 = 1;
85 85 if (PySequence_Check($input)) {
86 86 int size = PyObject_Length($input);
... ... @@ -101,21 +101,21 @@ static int skymap_tuple(PyObject *input, int *ptr) {
101 101  
102 102  
103 103 /***********************************************************************//**
104   - * @class GSkymap
  104 + * @class GSkyMap
105 105 *
106   - * @brief GSkymap class interface definition
  106 + * @brief GSkyMap class interface definition
107 107 ***************************************************************************/
108   -class GSkymap : public GBase {
  108 +class GSkyMap : public GBase {
109 109  
110 110 public:
111 111 // Constructors and destructors
112   - GSkymap(void);
113   - explicit GSkymap(const std::string& filename);
114   - explicit GSkymap(const std::string& coords,
  112 + GSkyMap(void);
  113 + explicit GSkyMap(const std::string& filename);
  114 + explicit GSkyMap(const std::string& coords,
115 115 const int& nside,
116 116 const std::string& order,
117 117 const int& nmaps = 1);
118   - explicit GSkymap(const std::string& wcs,
  118 + explicit GSkyMap(const std::string& wcs,
119 119 const std::string& coords,
120 120 const double& x,
121 121 const double& y,
... ... @@ -124,27 +124,27 @@ public:
124 124 const int& nx,
125 125 const int& ny,
126 126 const int& nmaps = 1);
127   - GSkymap(const GSkymap& map);
128   - virtual ~GSkymap(void);
  127 + GSkyMap(const GSkyMap& map);
  128 + virtual ~GSkyMap(void);
129 129  
130 130 // Operators
131   - GSkymap& operator+=(const GSkymap& map);
132   - GSkymap& operator+=(const double& value);
133   - GSkymap& operator-=(const GSkymap& map);
134   - GSkymap& operator-=(const double& value);
135   - GSkymap& operator*=(const GSkymap& map);
136   - GSkymap& operator*=(const double& factor);
137   - GSkymap operator+(const GSkymap& map) const;
138   - GSkymap operator-(const GSkymap& map) const;
139   - GSkymap operator*(const GSkymap& map) const;
140   - GSkymap operator/(const GSkymap& map) const;
  131 + GSkyMap& operator+=(const GSkyMap& map);
  132 + GSkyMap& operator+=(const double& value);
  133 + GSkyMap& operator-=(const GSkyMap& map);
  134 + GSkyMap& operator-=(const double& value);
  135 + GSkyMap& operator*=(const GSkyMap& map);
  136 + GSkyMap& operator*=(const double& factor);
  137 + GSkyMap operator+(const GSkyMap& map) const;
  138 + GSkyMap operator-(const GSkyMap& map) const;
  139 + GSkyMap operator*(const GSkyMap& map) const;
  140 + GSkyMap operator/(const GSkyMap& map) const;
141 141 double& operator()(const int& index, const int& map = 0);
142 142 double& operator()(const GSkyPixel& pixel, const int& map = 0);
143 143 double operator()(const GSkyDir& dir, const int& map = 0) const;
144 144  
145 145 // Methods
146 146 void clear(void);
147   - GSkymap* clone(void) const;
  147 + GSkyMap* clone(void) const;
148 148 std::string classname(void) const;
149 149 const int& npix(void) const;
150 150 const int& nx(void) const;
... ... @@ -166,7 +166,7 @@ public:
166 166 const GSkyProjection* projection(void) const;
167 167 void projection(const GSkyProjection& proj);
168 168 const double* pixels(void) const;
169   - GSkymap extract(const int& map, const int& nmaps = 1) const;
  169 + GSkyMap extract(const int& map, const int& nmaps = 1) const;
170 170 void stack_maps(void);
171 171 void load(const std::string& filename);
172 172 void save(const std::string& filename, bool clobber = false) const;
... ... @@ -176,18 +176,18 @@ public:
176 176  
177 177  
178 178 /***********************************************************************//**
179   - * @brief GSkymap class extension
  179 + * @brief GSkyMap class extension
180 180 *
181 181 * @todo Implement __getitem__ and __setitem__ methods for GSkyPixel and
182 182 * GSkyDir
183 183 ***************************************************************************/
184   -%extend GSkymap {
185   - double __getitem__(int GSkymapInx[]) {
186   - if (GSkymapInx[0] == 1) {
187   - return (*self)(GSkymapInx[1]);
  184 +%extend GSkyMap {
  185 + double __getitem__(int GSkyMapInx[]) {
  186 + if (GSkyMapInx[0] == 1) {
  187 + return (*self)(GSkyMapInx[1]);
188 188 }
189 189 else {
190   - return (*self)(GSkymapInx[1], GSkymapInx[2]);
  190 + return (*self)(GSkyMapInx[1], GSkyMapInx[2]);
191 191 }
192 192 }
193 193 /*
... ... @@ -195,12 +195,12 @@ public:
195 195 return (*self)(pixel);
196 196 }
197 197 */
198   - void __setitem__(int GSkymapInx[], double value) {
199   - if (GSkymapInx[0] == 1) {
200   - (*self)(GSkymapInx[1]) = value;
  198 + void __setitem__(int GSkyMapInx[], double value) {
  199 + if (GSkyMapInx[0] == 1) {
  200 + (*self)(GSkyMapInx[1]) = value;
201 201 }
202 202 else {
203   - (*self)(GSkymapInx[1], GSkymapInx[2]) = value;
  203 + (*self)(GSkyMapInx[1], GSkyMapInx[2]) = value;
204 204 }
205 205 }
206 206 /*
... ... @@ -208,29 +208,29 @@ public:
208 208 (*self)(pixel) = value;
209 209 }
210 210 */
211   - GSkymap copy() {
  211 + GSkyMap copy() {
212 212 return (*self);
213 213 }
214   - GSkymap sqrt() {
  214 + GSkyMap sqrt() {
215 215 return sqrt(*self);
216 216 }
217 217 // Python 2.x operator/=
218   - GSkymap __idiv__(const GSkymap& map) {
  218 + GSkyMap __idiv__(const GSkyMap& map) {
219 219 self->operator/=(map);
220 220 return (*self);
221 221 }
222 222 // Python 3.x operator/=
223   - GSkymap __itruediv__(const GSkymap& map) {
  223 + GSkyMap __itruediv__(const GSkyMap& map) {
224 224 self->operator/=(map);
225 225 return (*self);
226 226 }
227 227 // Python 2.x operator/=
228   - GSkymap __idiv__(const double& factor) {
  228 + GSkyMap __idiv__(const double& factor) {
229 229 self->operator/=(factor);
230 230 return (*self);
231 231 }
232 232 // Python 3.x operator/=
233   - GSkymap __itruediv__(const double& factor) {
  233 + GSkyMap __itruediv__(const double& factor) {
234 234 self->operator/=(factor);
235 235 return (*self);
236 236 }
... ...
pyext/gammalib/sky.i
... ... @@ -101,7 +101,7 @@
101 101 %include "GSkyDir.i"
102 102 %include "GHorizDir.i"
103 103 %include "GSkyPixel.i"
104   -%include "GSkymap.i"
  104 +%include "GSkyMap.i"
105 105 %include "GSkyRegions.i"
106 106 %include "GSkyRegion.i"
107 107 %include "GSkyRegionCircle.i"
... ...
src/model/GModelSpatialDiffuseCube.cpp
... ... @@ -144,7 +144,7 @@ GModelSpatialDiffuseCube::GModelSpatialDiffuseCube(const std::string&amp; filename,
144 144 * constructor also assigns the energy values for all maps and sets the
145 145 * scaling @p value. The filename will remain blank.
146 146 ***************************************************************************/
147   -GModelSpatialDiffuseCube::GModelSpatialDiffuseCube(const GSkymap& cube,
  147 +GModelSpatialDiffuseCube::GModelSpatialDiffuseCube(const GSkyMap& cube,
148 148 const GEnergies& energies,
149 149 const double& value) :
150 150 GModelSpatialDiffuse()
... ...
src/model/GModelSpatialDiffuseMap.cpp
... ... @@ -139,7 +139,7 @@ GModelSpatialDiffuseMap::GModelSpatialDiffuseMap(const std::string&amp; filename,
139 139 * Constructs spatial map model by setting the sky @p map and by setting the
140 140 * normalization @p value.
141 141 ***************************************************************************/
142   -GModelSpatialDiffuseMap::GModelSpatialDiffuseMap(const GSkymap& map,
  142 +GModelSpatialDiffuseMap::GModelSpatialDiffuseMap(const GSkyMap& map,
143 143 const double& value,
144 144 const bool& normalize) :
145 145 GModelSpatialDiffuse()
... ... @@ -771,7 +771,7 @@ void GModelSpatialDiffuseMap::free_members(void)
771 771 * maximum expected value for each pixel which is also used in Monte Carlo
772 772 * sampling.
773 773 *
774   - * Note that if the GSkymap object contains multiple maps, only the first
  774 + * Note that if the GSkyMap object contains multiple maps, only the first
775 775 * map is used.
776 776 ***************************************************************************/
777 777 void GModelSpatialDiffuseMap::prepare_map(void)
... ...
src/sky/GException_sky.cpp
1 1 /***************************************************************************
2 2 * GException_sky.cpp - sky exception handlers *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2011 by Jurgen Knodlseder *
  4 + * copyright (C) 2010-2015 by Jurgen Knodlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -33,7 +33,7 @@
33 33  
34 34  
35 35 /***********************************************************************//**
36   - * @brief General GSkymap error
  36 + * @brief General GSkyMap error
37 37 *
38 38 * @param[in] origin Method that throws the error.
39 39 * @param[in] message Error message.
... ...
src/sky/GSkymap.cpp renamed to src/sky/GSkyMap.cpp
1 1 /***************************************************************************
2   - * GSkymap.cpp - Sky map class *
  2 + * GSkyMap.cpp - Sky map class *
3 3 * ----------------------------------------------------------------------- *
4 4 * copyright (C) 2010-2015 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
... ... @@ -19,7 +19,7 @@
19 19 * *
20 20 ***************************************************************************/
21 21 /**
22   - * @file GSkymap.cpp
  22 + * @file GSkyMap.cpp
23 23 * @brief Sky map class implementation
24 24 * @author Juergen Knoedlseder
25 25 */
... ... @@ -31,7 +31,7 @@
31 31 #include "GException.hpp"
32 32 #include "GMath.hpp"
33 33 #include "GTools.hpp"
34   -#include "GSkymap.hpp"
  34 +#include "GSkyMap.hpp"
35 35 #include "GHealpix.hpp"
36 36 #include "GWcsRegistry.hpp"
37 37 #include "GWcs.hpp"
... ... @@ -40,35 +40,35 @@
40 40 #include "GFitsImageDouble.hpp"
41 41  
42 42 /* __ Method name definitions ____________________________________________ */
43   -#define G_CONSTRUCT_HPX "GSkymap::GSkymap(std::string&, int&,"\
  43 +#define G_CONSTRUCT_HPX "GSkyMap::GSkyMap(std::string&, int&,"\
44 44 " std::string&, int&)"
45   -#define G_CONSTRUCT_MAP "GSkymap::GSkymap(std::string&, std::string&,"\
  45 +#define G_CONSTRUCT_MAP "GSkyMap::GSkyMap(std::string&, std::string&,"\
46 46 " double&, double&, double& double&, int&, int&, int&)"
47   -#define G_NMAPS "GSkymap::nmaps(int&)"
48   -#define G_OP_UNARY_ADD "GSkymap::operator+=(GSkymap&)"
49   -#define G_OP_UNARY_SUB "GSkymap::operator-=(GSkymap&)"
50   -#define G_OP_UNARY_MUL "GSkymap::operator-=(GSkymap&)"
51   -#define G_OP_UNARY_DIV "GSkymap::operator/=(GSkymap&)"
52   -#define G_OP_UNARY_DIV2 "GSkymap::operator/=(double&)"
53   -#define G_OP_ACCESS_1D "GSkymap::operator(int&, int&)"
54   -#define G_OP_ACCESS_2D "GSkymap::operator(GSkyPixel&, int&)"
55   -#define G_OP_VALUE "GSkymap::operator(GSkyDir&, int&)"
56   -#define G_INX2DIR "GSkymap::inx2dir(int&)"
57   -#define G_PIX2DIR "GSkymap::pix2dir(GSkyPixel&)"
58   -#define G_DIR2INX "GSkymap::dir2inx(GSkyDir&)"
59   -#define G_DIR2PIX "GSkymap::dir2pix(GSkyDir&)"
60   -#define G_FLUX1 "GSkymap::flux(int&)"
61   -#define G_FLUX2 "GSkymap::flux(GSkyPixel&)"
62   -#define G_SOLIDANGLE1 "GSkymap::solidangle(int&)"
63   -#define G_SOLIDANGLE2 "GSkymap::solidangle(GSkyPixel&)"
64   -#define G_EXTRACT "GSkymap::extract(int&, int&)"
65   -#define G_READ "GSkymap::read(GFitsHDU&)"
66   -#define G_SET_WCS "GSkymap::set_wcs(std::string&, std::string&, double&,"\
  47 +#define G_NMAPS "GSkyMap::nmaps(int&)"
  48 +#define G_OP_UNARY_ADD "GSkyMap::operator+=(GSkyMap&)"
  49 +#define G_OP_UNARY_SUB "GSkyMap::operator-=(GSkyMap&)"
  50 +#define G_OP_UNARY_MUL "GSkyMap::operator-=(GSkyMap&)"
  51 +#define G_OP_UNARY_DIV "GSkyMap::operator/=(GSkyMap&)"
  52 +#define G_OP_UNARY_DIV2 "GSkyMap::operator/=(double&)"
  53 +#define G_OP_ACCESS_1D "GSkyMap::operator(int&, int&)"
  54 +#define G_OP_ACCESS_2D "GSkyMap::operator(GSkyPixel&, int&)"
  55 +#define G_OP_VALUE "GSkyMap::operator(GSkyDir&, int&)"
  56 +#define G_INX2DIR "GSkyMap::inx2dir(int&)"
  57 +#define G_PIX2DIR "GSkyMap::pix2dir(GSkyPixel&)"
  58 +#define G_DIR2INX "GSkyMap::dir2inx(GSkyDir&)"
  59 +#define G_DIR2PIX "GSkyMap::dir2pix(GSkyDir&)"
  60 +#define G_FLUX1 "GSkyMap::flux(int&)"
  61 +#define G_FLUX2 "GSkyMap::flux(GSkyPixel&)"
  62 +#define G_SOLIDANGLE1 "GSkyMap::solidangle(int&)"
  63 +#define G_SOLIDANGLE2 "GSkyMap::solidangle(GSkyPixel&)"
  64 +#define G_EXTRACT "GSkyMap::extract(int&, int&)"
  65 +#define G_READ "GSkyMap::read(GFitsHDU&)"
  66 +#define G_SET_WCS "GSkyMap::set_wcs(std::string&, std::string&, double&,"\
67 67 " double&, double&, double&, double&, double&,"\
68 68 " GMatrix&, GVector&)"
69   -#define G_READ_HEALPIX "GSkymap::read_healpix(GFitsTable*)"
70   -#define G_READ_WCS "GSkymap::read_wcs(GFitsImage*)"
71   -#define G_ALLOC_WCS "GSkymap::alloc_wcs(GFitsImage*)"
  69 +#define G_READ_HEALPIX "GSkyMap::read_healpix(GFitsTable*)"
  70 +#define G_READ_WCS "GSkyMap::read_wcs(GFitsImage*)"
  71 +#define G_ALLOC_WCS "GSkyMap::alloc_wcs(GFitsImage*)"
72 72  
73 73 /* __ Macros _____________________________________________________________ */
74 74  
... ... @@ -90,7 +90,7 @@
90 90 /***********************************************************************//**
91 91 * @brief Void constructor
92 92 ***************************************************************************/
93   -GSkymap::GSkymap(void)
  93 +GSkyMap::GSkyMap(void)
94 94 {
95 95 // Initialise class members for clean destruction
96 96 init_members();
... ... @@ -105,7 +105,7 @@ GSkymap::GSkymap(void)
105 105 *
106 106 * @param[in] filename FITS file name.
107 107 ***************************************************************************/
108   -GSkymap::GSkymap(const std::string& filename)
  108 +GSkyMap::GSkyMap(const std::string& filename)
109 109 {
110 110 // Initialise class members for clean destruction
111 111 init_members();
... ... @@ -131,7 +131,7 @@ GSkymap::GSkymap(const std::string&amp; filename)
131 131 *
132 132 * Constructs sky map in Healpix pixelisation.
133 133 ***************************************************************************/
134   -GSkymap::GSkymap(const std::string& coords,
  134 +GSkyMap::GSkyMap(const std::string& coords,
135 135 const int& nside,
136 136 const std::string& order,
137 137 const int& nmaps)
... ... @@ -179,7 +179,7 @@ GSkymap::GSkymap(const std::string&amp; coords,
179 179 *
180 180 * Constructs sky map in World Coordinate System projection.
181 181 ***************************************************************************/
182   -GSkymap::GSkymap(const std::string& wcs,
  182 +GSkyMap::GSkyMap(const std::string& wcs,
183 183 const std::string& coords,
184 184 const double& x,
185 185 const double& y,
... ... @@ -237,7 +237,7 @@ GSkymap::GSkymap(const std::string&amp; wcs,
237 237 *
238 238 * @param[in] map Sky map.
239 239 ***************************************************************************/
240   -GSkymap::GSkymap(const GSkymap& map)
  240 +GSkyMap::GSkyMap(const GSkyMap& map)
241 241 {
242 242 // Initialise class members for clean destruction
243 243 init_members();
... ... @@ -253,7 +253,7 @@ GSkymap::GSkymap(const GSkymap&amp; map)
253 253 /***********************************************************************//**
254 254 * @brief Destructor
255 255 ***************************************************************************/
256   -GSkymap::~GSkymap(void)
  256 +GSkyMap::~GSkyMap(void)
257 257 {
258 258 // Free members
259 259 free_members();
... ... @@ -275,7 +275,7 @@ GSkymap::~GSkymap(void)
275 275 * @param[in] map Sky map.
276 276 * @return Sky map.
277 277 ***************************************************************************/
278   -GSkymap& GSkymap::operator=(const GSkymap& map)
  278 +GSkyMap& GSkyMap::operator=(const GSkyMap& map)
279 279 {
280 280 // Execute only if object is not identical
281 281 if (this != &map) {
... ... @@ -304,7 +304,7 @@ GSkymap&amp; GSkymap::operator=(const GSkymap&amp; map)
304 304 *
305 305 * Sets all pixels to the specified @p value.
306 306 ***************************************************************************/
307   -GSkymap& GSkymap::operator=(const double& value)
  307 +GSkyMap& GSkyMap::operator=(const double& value)
308 308 {
309 309 // Get number of pixels
310 310 int num = m_num_pixels * m_num_maps;
... ... @@ -338,7 +338,7 @@ GSkymap&amp; GSkymap::operator=(const double&amp; value)
338 338 * does the transformation, allowing the to loop more effectively over the
339 339 * layers.
340 340 ***************************************************************************/
341   -GSkymap& GSkymap::operator+=(const GSkymap& map)
  341 +GSkyMap& GSkyMap::operator+=(const GSkyMap& map)
342 342 {
343 343 // Check if number of layers are identical
344 344 if (map.nmaps() != nmaps()) {
... ... @@ -378,7 +378,7 @@ GSkymap&amp; GSkymap::operator+=(const GSkymap&amp; map)
378 378 *
379 379 * Add @p value to all sky map pixels.
380 380 ***************************************************************************/
381   -GSkymap& GSkymap::operator+=(const double& value)
  381 +GSkyMap& GSkyMap::operator+=(const double& value)
382 382 {
383 383 // Set total number of sky map pixels
384 384 int num = m_num_pixels * m_num_maps;
... ... @@ -412,7 +412,7 @@ GSkymap&amp; GSkymap::operator+=(const double&amp; value)
412 412 * does the transformation, allowing the to loop more effectively over the
413 413 * layers.
414 414 ***************************************************************************/
415   -GSkymap& GSkymap::operator-=(const GSkymap& map)
  415 +GSkyMap& GSkyMap::operator-=(const GSkyMap& map)
416 416 {
417 417 // Check if number of layers are identical
418 418 if (map.nmaps() != nmaps()) {
... ... @@ -452,7 +452,7 @@ GSkymap&amp; GSkymap::operator-=(const GSkymap&amp; map)
452 452 *
453 453 * Subtracts @p value from all sky map pixels.
454 454 ***************************************************************************/
455   -GSkymap& GSkymap::operator-=(const double& value)
  455 +GSkyMap& GSkyMap::operator-=(const double& value)
456 456 {
457 457 // Set total number of sky map pixels
458 458 int num = m_num_pixels * m_num_maps;
... ... @@ -486,7 +486,7 @@ GSkymap&amp; GSkymap::operator-=(const double&amp; value)
486 486 * does the transformation, allowing to loop more effectively over the
487 487 * layers.
488 488 ***************************************************************************/
489   -GSkymap& GSkymap::operator*=(const GSkymap& map)
  489 +GSkyMap& GSkyMap::operator*=(const GSkyMap& map)
490 490 {
491 491 // Check if number of layers are identical
492 492 if (map.nmaps() != nmaps()) {
... ... @@ -526,7 +526,7 @@ GSkymap&amp; GSkymap::operator*=(const GSkymap&amp; map)
526 526 *
527 527 * Multiplies all pixels of the sky map by the given scale @p factor.
528 528 ***************************************************************************/
529   -GSkymap& GSkymap::operator*=(const double& factor)
  529 +GSkyMap& GSkyMap::operator*=(const double& factor)
530 530 {
531 531 // Compute total number of pixels
532 532 int n = npix() * nmaps();
... ... @@ -559,7 +559,7 @@ GSkymap&amp; GSkymap::operator*=(const double&amp; factor)
559 559 * On return, all pixels in @p map that are zero are silently set to zero in
560 560 * the skymap.
561 561 ***************************************************************************/
562   -GSkymap& GSkymap::operator/=(const GSkymap& map)
  562 +GSkyMap& GSkyMap::operator/=(const GSkyMap& map)
563 563 {
564 564 // Check if number of layers are identical
565 565 if (map.nmaps() != nmaps()) {
... ... @@ -614,7 +614,7 @@ GSkymap&amp; GSkymap::operator/=(const GSkymap&amp; map)
614 614 *
615 615 * Divides all pixels of the sky map by the given @p factor.
616 616 ***************************************************************************/
617   -GSkymap& GSkymap::operator/=(const double& factor)
  617 +GSkyMap& GSkyMap::operator/=(const double& factor)
618 618 {
619 619 // Check for division by zero
620 620 if (factor == 0.0) {
... ... @@ -649,7 +649,7 @@ GSkymap&amp; GSkymap::operator/=(const double&amp; factor)
649 649 * Access sky map pixel by its index, where the most quickly varying axis is
650 650 * the x axis of the map.
651 651 ***************************************************************************/
652   -double& GSkymap::operator()(const int& index, const int& map)
  652 +double& GSkyMap::operator()(const int& index, const int& map)
653 653 {
654 654 // Throw an error if pixel index or map index is not in valid range
655 655 #if defined(G_RANGE_CHECK)
... ... @@ -682,7 +682,7 @@ double&amp; GSkymap::operator()(const int&amp; index, const int&amp; map)
682 682 * Access sky map pixel by its index, where the most quickly varying axis is
683 683 * the x axis of the map.
684 684 ***************************************************************************/
685   -const double& GSkymap::operator()(const int& index, const int& map) const
  685 +const double& GSkyMap::operator()(const int& index, const int& map) const
686 686 {
687 687 // Throw an error if pixel index or map index is not in valid range
688 688 #if defined(G_RANGE_CHECK)
... ... @@ -717,7 +717,7 @@ const double&amp; GSkymap::operator()(const int&amp; index, const int&amp; map) const
717 717 *
718 718 * @todo Implement proper skymap exception (actual is for matrix elements)
719 719 ***************************************************************************/
720   -double& GSkymap::operator()(const GSkyPixel& pixel, const int& map)
  720 +double& GSkyMap::operator()(const GSkyPixel& pixel, const int& map)
721 721 {
722 722 // Throw an error if pixel index or map index is not in valid range
723 723 #if defined(G_RANGE_CHECK)
... ... @@ -755,7 +755,7 @@ double&amp; GSkymap::operator()(const GSkyPixel&amp; pixel, const int&amp; map)
755 755 *
756 756 * @todo Implement proper skymap exception (actual is for matrix elements)
757 757 ***************************************************************************/
758   -const double& GSkymap::operator()(const GSkyPixel& pixel, const int& map) const
  758 +const double& GSkyMap::operator()(const GSkyPixel& pixel, const int& map) const
759 759 {
760 760 // Throw an error if pixel index or map index is not in valid range
761 761 #if defined(G_RANGE_CHECK)
... ... @@ -798,7 +798,7 @@ const double&amp; GSkymap::operator()(const GSkyPixel&amp; pixel, const int&amp; map) const
798 798 * is requested several times. This speeds up use cases where skymap values
799 799 * for various map indices have to be returned for the same sky direction.
800 800 ***************************************************************************/
801   -double GSkymap::operator()(const GSkyDir& dir, const int& map) const
  801 +double GSkyMap::operator()(const GSkyDir& dir, const int& map) const
802 802 {
803 803 // Throw an error if the map index is not in valid range
804 804 #if defined(G_RANGE_CHECK)
... ... @@ -956,7 +956,7 @@ double GSkymap::operator()(const GSkyDir&amp; dir, const int&amp; map) const
956 956 *
957 957 * Resets the sky map to the initial state.
958 958 ***************************************************************************/
959   -void GSkymap::clear(void)
  959 +void GSkyMap::clear(void)
960 960 {
961 961 // Free class members
962 962 free_members();
... ... @@ -974,9 +974,9 @@ void GSkymap::clear(void)
974 974 *
975 975 * @return Pointer to deep copy of sky map.
976 976 ***************************************************************************/
977   -GSkymap* GSkymap::clone(void) const
  977 +GSkyMap* GSkyMap::clone(void) const
978 978 {
979   - return new GSkymap(*this);
  979 + return new GSkyMap(*this);
980 980 }
981 981  
982 982  
... ... @@ -988,18 +988,18 @@ GSkymap* GSkymap::clone(void) const
988 988 * @exception GException::invalid_argument
989 989 * Invalid number of maps specified.
990 990 *
991   - * Redefines the number of maps in an GSkymap object. If the number of maps
  991 + * Redefines the number of maps in an GSkyMap object. If the number of maps
992 992 * is increased with respect to the existing number, additional maps with
993 993 * pixel values of zero are append to the object. Existing map pixel values
994 994 * are kept. If the number of maps is decreased with respect to the existing
995 995 * number, the excedent maps are dropped. The remaining map pixel values are
996 996 * kept.
997 997 ***************************************************************************/
998   -void GSkymap::nmaps(const int& nmaps)
  998 +void GSkyMap::nmaps(const int& nmaps)
999 999 {
1000 1000 // Throw an exception if less than 1 map is required
1001 1001 if (nmaps < 1) {
1002   - std::string msg = "At least one map is required in an GSkymap object."
  1002 + std::string msg = "At least one map is required in an GSkyMap object."
1003 1003 " Please specify an argument >=1.";
1004 1004 throw GException::invalid_argument(G_NMAPS, msg);
1005 1005 }
... ... @@ -1055,7 +1055,7 @@ void GSkymap::nmaps(const int&amp; nmaps)
1055 1055 * sky map leads to a 1D GSkyPixel object, a 2D sky map leads to a 2D
1056 1056 * GSkyPixel object.
1057 1057 ***************************************************************************/
1058   -GSkyPixel GSkymap::inx2pix(const int& index) const
  1058 +GSkyPixel GSkyMap::inx2pix(const int& index) const
1059 1059 {
1060 1060 // Initialise sky map pixel
1061 1061 GSkyPixel pixel;
... ... @@ -1085,7 +1085,7 @@ GSkyPixel GSkymap::inx2pix(const int&amp; index) const
1085 1085 *
1086 1086 * Returns sky direction for a given pixel index.
1087 1087 ***************************************************************************/
1088   -GSkyDir GSkymap::inx2dir(const int& index) const
  1088 +GSkyDir GSkyMap::inx2dir(const int& index) const
1089 1089 {
1090 1090 // Throw error if sky projection is not valid
1091 1091 if (m_proj == NULL) {
... ... @@ -1114,7 +1114,7 @@ GSkyDir GSkymap::inx2dir(const int&amp; index) const
1114 1114 *
1115 1115 * Returns sky direction for a given sky map @p pixel.
1116 1116 ***************************************************************************/
1117   -GSkyDir GSkymap::pix2dir(const GSkyPixel& pixel) const
  1117 +GSkyDir GSkyMap::pix2dir(const GSkyPixel& pixel) const
1118 1118 {
1119 1119 // Throw error if WCS is not valid
1120 1120 if (m_proj == NULL) {
... ... @@ -1161,7 +1161,7 @@ GSkyDir GSkymap::pix2dir(const GSkyPixel&amp; pixel) const
1161 1161 *
1162 1162 * Converts a sky map @p pixel into the pixel index.
1163 1163 ***************************************************************************/
1164   -int GSkymap::pix2inx(const GSkyPixel& pixel) const
  1164 +int GSkyMap::pix2inx(const GSkyPixel& pixel) const
1165 1165 {
1166 1166 // Initialise pixel index
1167 1167 int index = 0;
... ... @@ -1199,7 +1199,7 @@ int GSkymap::pix2inx(const GSkyPixel&amp; pixel) const
1199 1199 *
1200 1200 * Returns sky map pixel index for a given sky direction.
1201 1201 ***************************************************************************/
1202   -int GSkymap::dir2inx(const GSkyDir& dir) const
  1202 +int GSkyMap::dir2inx(const GSkyDir& dir) const
1203 1203 {
1204 1204 // Throw error if WCS is not valid
1205 1205 if (m_proj == NULL) {
... ... @@ -1226,7 +1226,7 @@ int GSkymap::dir2inx(const GSkyDir&amp; dir) const
1226 1226 *
1227 1227 * Returns sky map pixel for a given sky direction.
1228 1228 ***************************************************************************/
1229   -GSkyPixel GSkymap::dir2pix(const GSkyDir& dir) const
  1229 +GSkyPixel GSkyMap::dir2pix(const GSkyDir& dir) const
1230 1230 {
1231 1231 // Throw error if WCS is not valid
1232 1232 if (m_proj == NULL) {
... ... @@ -1254,7 +1254,7 @@ GSkyPixel GSkymap::dir2pix(const GSkyDir&amp; dir) const
1254 1254 *
1255 1255 * Returns the flux in the pixel with the specified @p index.
1256 1256 ***************************************************************************/
1257   -double GSkymap::flux(const int& index, const int& map) const
  1257 +double GSkyMap::flux(const int& index, const int& map) const
1258 1258 {
1259 1259 // Throw error if WCS is not valid
1260 1260 if (m_proj == NULL) {
... ... @@ -1291,7 +1291,7 @@ double GSkymap::flux(const int&amp; index, const int&amp; map) const
1291 1291 * For a HealPix pixelisation, the pixel is divided into 12 wedges. For a
1292 1292 * WCS pixelisation, the pixel is divided into 8 wedges.
1293 1293 ***************************************************************************/
1294   -double GSkymap::flux(const GSkyPixel& pixel, const int& map) const
  1294 +double GSkyMap::flux(const GSkyPixel& pixel, const int& map) const
1295 1295 {
1296 1296 // Throw error if WCS is not valid
1297 1297 if (m_proj == NULL) {
... ... @@ -1437,7 +1437,7 @@ double GSkymap::flux(const GSkyPixel&amp; pixel, const int&amp; map) const
1437 1437 *
1438 1438 * Returns the solid angle of the pixel with the specified @p index.
1439 1439 ***************************************************************************/
1440   -double GSkymap::solidangle(const int& index) const
  1440 +double GSkyMap::solidangle(const int& index) const
1441 1441 {
1442 1442 // Throw error if WCS is not valid
1443 1443 if (m_proj == NULL) {
... ... @@ -1464,7 +1464,7 @@ double GSkymap::solidangle(const int&amp; index) const
1464 1464 *
1465 1465 * Returns the solid angle of the specified sky map @p pixel.
1466 1466 ***************************************************************************/
1467   -double GSkymap::solidangle(const GSkyPixel& pixel) const
  1467 +double GSkyMap::solidangle(const GSkyPixel& pixel) const
1468 1468 {
1469 1469 // Throw error if WCS is not valid
1470 1470 if (m_proj == NULL) {
... ... @@ -1512,14 +1512,14 @@ double GSkymap::solidangle(const GSkyPixel&amp; pixel) const
1512 1512 * performs a deep copy of @p proj, allowing to destroy the argument after
1513 1513 * using the method.
1514 1514 *
1515   - * Warning: this method may corrupt the GSkymap object as it allows assigning
  1515 + * Warning: this method may corrupt the GSkyMap object as it allows assigning
1516 1516 * for example a 1D projection to a 2D skymap. Please use this method only
1517 1517 * when you know what you're doing.
1518 1518 *
1519 1519 * @todo We may restrict this method to not allow changing the projection
1520 1520 * dimension.
1521 1521 ***************************************************************************/
1522   -void GSkymap::projection(const GSkyProjection& proj)
  1522 +void GSkyMap::projection(const GSkyProjection& proj)
1523 1523 {
1524 1524 // Free any existing WCS
1525 1525 if (m_proj != NULL) delete m_proj;
... ... @@ -1542,7 +1542,7 @@ void GSkymap::projection(const GSkyProjection&amp; proj)
1542 1542 * sky direction into 2D pixel indices, and then checks whether the pixel
1543 1543 * indices fall in the skymap.
1544 1544 ***************************************************************************/
1545   -bool GSkymap::contains(const GSkyDir& dir) const
  1545 +bool GSkyMap::contains(const GSkyDir& dir) const
1546 1546 {
1547 1547 // Convert sky direction into sky pixel
1548 1548 GSkyPixel pixel = dir2pix(dir);
... ... @@ -1561,7 +1561,7 @@ bool GSkymap::contains(const GSkyDir&amp; dir) const
1561 1561 * Checks whether the specified sky map @p pixel falls within the skymap
1562 1562 * or not.
1563 1563 ***************************************************************************/
1564   -bool GSkymap::contains(const GSkyPixel& pixel) const
  1564 +bool GSkyMap::contains(const GSkyPixel& pixel) const
1565 1565 {
1566 1566 // Initialise containment flag
1567 1567 bool inmap = false;
... ... @@ -1604,7 +1604,7 @@ bool GSkymap::contains(const GSkyPixel&amp; pixel) const
1604 1604 *
1605 1605 * Extracts @p nmaps sky maps starting from @p map from the sky map.
1606 1606 ***************************************************************************/
1607   -GSkymap GSkymap::extract(const int& map, const int& nmaps) const
  1607 +GSkyMap GSkyMap::extract(const int& map, const int& nmaps) const
1608 1608 {
1609 1609 // Throw an exception if the first map index is invalid
1610 1610 if (map < 0 || map >= m_num_maps) {
... ... @@ -1644,7 +1644,7 @@ GSkymap GSkymap::extract(const int&amp; map, const int&amp; nmaps) const
1644 1644 }
1645 1645  
1646 1646 // Create a copy of the map
1647   - GSkymap result = *this;
  1647 + GSkyMap result = *this;
1648 1648  
1649 1649 // Delete pixels from that map
1650 1650 if (result.m_pixels != NULL) delete [] result.m_pixels;
... ... @@ -1670,7 +1670,7 @@ GSkymap GSkymap::extract(const int&amp; map, const int&amp; nmaps) const
1670 1670 * pixels or there is only a single map in the object, the method does
1671 1671 * nothing.
1672 1672 ***************************************************************************/
1673   -void GSkymap::stack_maps(void)
  1673 +void GSkyMap::stack_maps(void)
1674 1674 {
1675 1675 // Continue only if the map has pixels and if there is more than 1 map
1676 1676 if (m_num_pixels > 0 && m_num_maps > 1) {
... ... @@ -1715,7 +1715,7 @@ void GSkymap::stack_maps(void)
1715 1715 * @todo Do we have to restrict a HEALPix map to a BinTable and a WCS map
1716 1716 * to a Double precision image???
1717 1717 ***************************************************************************/
1718   -void GSkymap::load(const std::string& filename)
  1718 +void GSkyMap::load(const std::string& filename)
1719 1719 {
1720 1720 // Free memory and initialise members
1721 1721 free_members();
... ... @@ -1784,7 +1784,7 @@ void GSkymap::load(const std::string&amp; filename)
1784 1784 *
1785 1785 * The method does nothing if the skymap holds no valid WCS.
1786 1786 ***************************************************************************/
1787   -void GSkymap::save(const std::string& filename, bool clobber) const
  1787 +void GSkyMap::save(const std::string& filename, bool clobber) const
1788 1788 {
1789 1789 // Continue only if we have data to save
1790 1790 if (m_proj != NULL) {
... ... @@ -1824,7 +1824,7 @@ void GSkymap::save(const std::string&amp; filename, bool clobber) const
1824 1824 *
1825 1825 * @param[in] hdu FITS HDU.
1826 1826 ***************************************************************************/
1827   -void GSkymap::read(const GFitsHDU& hdu)
  1827 +void GSkyMap::read(const GFitsHDU& hdu)
1828 1828 {
1829 1829 // Free memory and initialise members
1830 1830 free_members();
... ... @@ -1860,7 +1860,7 @@ void GSkymap::read(const GFitsHDU&amp; hdu)
1860 1860 *
1861 1861 * @param[in] file FITS file pointer.
1862 1862 ***************************************************************************/
1863   -void GSkymap::write(GFits& file) const
  1863 +void GSkyMap::write(GFits& file) const
1864 1864 {
1865 1865 // Continue only if we have data to save
1866 1866 if (m_proj != NULL) {
... ... @@ -1899,7 +1899,7 @@ void GSkymap::write(GFits&amp; file) const
1899 1899 * @param[in] chatter Chattiness (defaults to NORMAL).
1900 1900 * @return String containing sky map information.
1901 1901 ***************************************************************************/
1902   -std::string GSkymap::print(const GChatter& chatter) const
  1902 +std::string GSkyMap::print(const GChatter& chatter) const
1903 1903 {
1904 1904 // Initialise result string
1905 1905 std::string result;
... ... @@ -1908,7 +1908,7 @@ std::string GSkymap::print(const GChatter&amp; chatter) const
1908 1908 if (chatter != SILENT) {
1909 1909  
1910 1910 // Append header
1911   - result.append("=== GSkymap ===");
  1911 + result.append("=== GSkyMap ===");
1912 1912  
1913 1913 // Append information
1914 1914 result.append("\n"+gammalib::parformat("Number of pixels"));
... ... @@ -1948,7 +1948,7 @@ std::string GSkymap::print(const GChatter&amp; chatter) const
1948 1948 /***********************************************************************//**
1949 1949 * @brief Initialise class members
1950 1950 ***************************************************************************/
1951   -void GSkymap::init_members(void)
  1951 +void GSkyMap::init_members(void)
1952 1952 {
1953 1953 // Initialise members
1954 1954 m_num_pixels = 0;
... ... @@ -1972,7 +1972,7 @@ void GSkymap::init_members(void)
1972 1972 /***********************************************************************//**
1973 1973 * @brief Allocate skymap pixels
1974 1974 ***************************************************************************/
1975   -void GSkymap::alloc_pixels(void)
  1975 +void GSkyMap::alloc_pixels(void)
1976 1976 {
1977 1977 // Compute data size
1978 1978 int size = m_num_pixels * m_num_maps;
... ... @@ -1998,7 +1998,7 @@ void GSkymap::alloc_pixels(void)
1998 1998 *
1999 1999 * @param[in] map Sky map.
2000 2000 ***************************************************************************/
2001   -void GSkymap::copy_members(const GSkymap& map)
  2001 +void GSkyMap::copy_members(const GSkyMap& map)
2002 2002 {
2003 2003 // Copy attributes
2004 2004 m_num_pixels = map.m_num_pixels;
... ... @@ -2034,7 +2034,7 @@ void GSkymap::copy_members(const GSkymap&amp; map)
2034 2034 /***********************************************************************//**
2035 2035 * @brief Delete class members
2036 2036 ***************************************************************************/
2037   -void GSkymap::free_members(void)
  2037 +void GSkyMap::free_members(void)
2038 2038 {
2039 2039 // Free memory
2040 2040 if (m_proj != NULL) delete m_proj;
... ... @@ -2079,7 +2079,7 @@ void GSkymap::free_members(void)
2079 2079 *
2080 2080 * @todo Remove cd and pv2 parameters.
2081 2081 ***************************************************************************/
2082   -void GSkymap::set_wcs(const std::string& wcs, const std::string& coords,
  2082 +void GSkyMap::set_wcs(const std::string& wcs, const std::string& coords,
2083 2083 const double& crval1, const double& crval2,
2084 2084 const double& crpix1, const double& crpix2,
2085 2085 const double& cdelt1, const double& cdelt2,
... ... @@ -2133,7 +2133,7 @@ void GSkymap::set_wcs(const std::string&amp; wcs, const std::string&amp; coords,
2133 2133 * several HEALPix maps into a single column. Alternatively, multiple maps
2134 2134 * may be stored in multiple columns.
2135 2135 ***************************************************************************/
2136   -void GSkymap::read_healpix(const GFitsTable& table)
  2136 +void GSkyMap::read_healpix(const GFitsTable& table)
2137 2137 {
2138 2138 // Determine number of rows and columns in table
2139 2139 int nrows = table.nrows();
... ... @@ -2251,7 +2251,7 @@ void GSkymap::read_healpix(const GFitsTable&amp; table)
2251 2251 * WCS image has an invalid dimension or covers a too large
2252 2252 * range.
2253 2253 ***************************************************************************/
2254   -void GSkymap::read_wcs(const GFitsImage& image)
  2254 +void GSkyMap::read_wcs(const GFitsImage& image)
2255 2255 {
2256 2256 // Allocate WCS
2257 2257 alloc_wcs(image);
... ... @@ -2346,7 +2346,7 @@ void GSkymap::read_wcs(const GFitsImage&amp; image)
2346 2346 * @exception GException::wcs_invalid
2347 2347 * WCS projection of FITS file not supported by GammaLib.
2348 2348 ***************************************************************************/
2349   -void GSkymap::alloc_wcs(const GFitsImage& image)
  2349 +void GSkyMap::alloc_wcs(const GFitsImage& image)
2350 2350 {
2351 2351 // Get standard keywords
2352 2352 std::string ctype1 = image.string("CTYPE1");
... ... @@ -2386,7 +2386,7 @@ void GSkymap::alloc_wcs(const GFitsImage&amp; image)
2386 2386 * This method allocates a binary table HDU that contains the Healpix data.
2387 2387 * Deallocation of the table has to be done by the client.
2388 2388 ***************************************************************************/
2389   -GFitsBinTable* GSkymap::create_healpix_hdu(void) const
  2389 +GFitsBinTable* GSkyMap::create_healpix_hdu(void) const
2390 2390 {
2391 2391 // Initialise result to NULL pointer
2392 2392 GFitsBinTable* hdu = NULL;
... ... @@ -2445,7 +2445,7 @@ GFitsBinTable* GSkymap::create_healpix_hdu(void) const
2445 2445 *
2446 2446 * @todo Set additional keywords.
2447 2447 ***************************************************************************/
2448   -GFitsImageDouble* GSkymap::create_wcs_hdu(void) const
  2448 +GFitsImageDouble* GSkyMap::create_wcs_hdu(void) const
2449 2449 {
2450 2450 // Initialise result to NULL pointer
2451 2451 GFitsImageDouble* hdu = NULL;
... ... @@ -2534,7 +2534,7 @@ GFitsImageDouble* GSkymap::create_wcs_hdu(void) const
2534 2534 * a34
2535 2535 *
2536 2536 ***************************************************************************/
2537   -double GSkymap::solidangle(const GSkyDir& dir1, const GSkyDir& dir2,
  2537 +double GSkyMap::solidangle(const GSkyDir& dir1, const GSkyDir& dir2,
2538 2538 const GSkyDir& dir3, const GSkyDir& dir4) const
2539 2539 {
2540 2540 // Initialise solid angle
... ... @@ -2622,7 +2622,7 @@ double GSkymap::solidangle(const GSkyDir&amp; dir1, const GSkyDir&amp; dir2,
2622 2622 * 3
2623 2623 *
2624 2624 ***************************************************************************/
2625   -double GSkymap::solidangle(const GSkyDir& dir1, const GSkyDir& dir2,
  2625 +double GSkyMap::solidangle(const GSkyDir& dir1, const GSkyDir& dir2,
2626 2626 const GSkyDir& dir3) const
2627 2627 {
2628 2628 // Initialise solid angle
... ... @@ -2657,10 +2657,10 @@ double GSkymap::solidangle(const GSkyDir&amp; dir1, const GSkyDir&amp; dir2,
2657 2657 * @param[in] map Skymap.
2658 2658 * @return Skymap containing the square root of every element.
2659 2659 ***************************************************************************/
2660   -GSkymap sqrt(const GSkymap& map)
  2660 +GSkyMap sqrt(const GSkyMap& map)
2661 2661 {
2662 2662 // Initialise result vector
2663   - GSkymap result(map);
  2663 + GSkyMap result(map);
2664 2664  
2665 2665 // Loop over all maps
2666 2666 for (int i = 0; i < map.nmaps(); ++i) {
... ...
src/sky/Makefile.am
... ... @@ -9,7 +9,7 @@ INCLUDES = -I$(top_srcdir)/include \
9 9 sources = GSkyDir.cpp \
10 10 GHorizDir.cpp \
11 11 GSkyPixel.cpp \
12   - GSkymap.cpp \
  12 + GSkyMap.cpp \
13 13 GSkyRegions.cpp \
14 14 GSkyRegion.cpp \
15 15 GSkyRegionCircle.cpp \
... ...
test/test_GModel.cpp
... ... @@ -606,7 +606,7 @@ void TestGModel::test_diffuse_cube(void)
606 606 // Test skymap value constructor
607 607 test_try("Test skymap value constructor");
608 608 try {
609   - GSkymap map("GAL", 16, "RING", 10);
  609 + GSkyMap map("GAL", 16, "RING", 10);
610 610 GEnergies energies;
611 611 for (int i = 0; i < 10; ++i) {
612 612 energies.append(GEnergy(double(i+1.0), "MeV"));
... ... @@ -644,7 +644,7 @@ void TestGModel::test_diffuse_cube(void)
644 644 "Model filename \"Help me!\" expected.");
645 645  
646 646 // Test cube method
647   - model.cube(GSkymap("GAL", 16, "RING", 10));
  647 + model.cube(GSkyMap("GAL", 16, "RING", 10));
648 648 test_value(model.cube().npix(), 3072);
649 649  
650 650 // Test operator access
... ... @@ -703,7 +703,7 @@ void TestGModel::test_diffuse_map(void)
703 703 // Test skymap value constructor
704 704 test_try("Test skymap value constructor");
705 705 try {
706   - GSkymap map("GAL", 16, "RING", 10);
  706 + GSkyMap map("GAL", 16, "RING", 10);
707 707 GModelSpatialDiffuseMap model(map, 3.0);
708 708 test_value(model.value(), 3.0);
709 709 test_assert(model.filename() == "", "Expected \"\"");
... ... @@ -736,7 +736,7 @@ void TestGModel::test_diffuse_map(void)
736 736 "Model filename \""+m_map_file+"\" expected.");
737 737  
738 738 // Test map method
739   - model.map(GSkymap("GAL", 16, "RING", 10));
  739 + model.map(GSkyMap("GAL", 16, "RING", 10));
740 740 test_value(model.map().npix(), 3072);
741 741  
742 742 // Test operator access
... ...
test/test_GSky.cpp
... ... @@ -55,11 +55,11 @@ void TestGSky::set(void){
55 55 // Append tests
56 56 append(static_cast<pfunction>(&TestGSky::test_GWcs),"Test GWcs");
57 57 append(static_cast<pfunction>(&TestGSky::test_GSkyPixel),"Test GSkyPixel");
58   - append(static_cast<pfunction>(&TestGSky::test_GSkymap_healpix_construct),"Test Healpix GSkymap constructors");
59   - append(static_cast<pfunction>(&TestGSky::test_GSkymap_healpix_io),"Test Healpix GSkymap I/O");
60   - append(static_cast<pfunction>(&TestGSky::test_GSkymap_wcs_construct),"Test WCS GSkymap constructors");
61   - append(static_cast<pfunction>(&TestGSky::test_GSkymap_wcs_io),"Test WCS GSkymap I/O");
62   - append(static_cast<pfunction>(&TestGSky::test_GSkymap),"Test GSkymap");
  58 + append(static_cast<pfunction>(&TestGSky::test_GSkyMap_healpix_construct),"Test Healpix GSkyMap constructors");
  59 + append(static_cast<pfunction>(&TestGSky::test_GSkyMap_healpix_io),"Test Healpix GSkyMap I/O");
  60 + append(static_cast<pfunction>(&TestGSky::test_GSkyMap_wcs_construct),"Test WCS GSkyMap constructors");
  61 + append(static_cast<pfunction>(&TestGSky::test_GSkyMap_wcs_io),"Test WCS GSkyMap I/O");
  62 + append(static_cast<pfunction>(&TestGSky::test_GSkyMap),"Test GSkyMap");
63 63 append(static_cast<pfunction>(&TestGSky::test_GSkyRegions_io),"Test GSkyRegions");
64 64 append(static_cast<pfunction>(&TestGSky::test_GSkyRegionCircle_construct),"Test GSkyRegionCircle constructors");
65 65 append(static_cast<pfunction>(&TestGSky::test_GSkyRegionCircle_logic),"Test GSkyRegionCircle logic");
... ... @@ -511,15 +511,15 @@ void TestGSky::test_GWcs(void)
511 511  
512 512  
513 513 /***************************************************************************
514   - * @brief GSkymap_healpix_construct
  514 + * @brief GSkyMap_healpix_construct
515 515 ***************************************************************************/
516   -void TestGSky::test_GSkymap_healpix_construct(void)
  516 +void TestGSky::test_GSkyMap_healpix_construct(void)
517 517 {
518 518  
519 519 // Test void constructor
520 520 test_try("Test void constructor");
521 521 try {
522   - GSkymap map;
  522 + GSkyMap map;
523 523 test_try_success();
524 524 }
525 525 catch (std::exception &e) {
... ... @@ -529,30 +529,30 @@ void TestGSky::test_GSkymap_healpix_construct(void)
529 529 // Test correct Healpix constructors
530 530 test_try("Test correct Healpix constructors");
531 531 try {
532   - GSkymap ring1("GAL", 1, "RING", 1);
533   - GSkymap ring2("GAL", 2, "RING", 1);
534   - GSkymap ring4("GAL", 4, "RING", 1);
535   - GSkymap ring8("GAL", 8, "RING", 1);
536   - GSkymap ring16("GAL", 16, "RING", 1);
537   - GSkymap ring32("GAL", 32, "RING", 1);
538   - GSkymap ring64("GAL", 64, "RING", 1);
539   - GSkymap ring128("GAL", 128, "RING", 1);
540   - GSkymap ring256("GAL", 256, "RING", 1);
541   - GSkymap ring512("GAL", 512, "RING", 1);
542   - GSkymap nest1("GAL", 1, "NEST", 1);
543   - GSkymap nest2("GAL", 2, "NEST", 1);
544   - GSkymap nest4("GAL", 4, "NEST", 1);
545   - GSkymap nest8("GAL", 8, "NEST", 1);
546   - GSkymap nest16("GAL", 16, "NEST", 1);
547   - GSkymap nest32("GAL", 32, "NEST", 1);
548   - GSkymap nest64("GAL", 64, "NEST", 1);
549   - GSkymap nest128("GAL", 128, "NEST", 1);
550   - GSkymap nest256("GAL", 256, "NEST", 1);
551   - GSkymap nest512("GAL", 512, "NEST", 1);
552   - GSkymap map1("CEL", 1, "RING", 1);
553   - GSkymap map2("CEL", 1, "RING", 2);
554   - GSkymap map3("EQU", 1, "RING", 1);
555   - GSkymap map4("EQU", 1, "NESTED", 1);
  532 + GSkyMap ring1("GAL", 1, "RING", 1);
  533 + GSkyMap ring2("GAL", 2, "RING", 1);
  534 + GSkyMap ring4("GAL", 4, "RING", 1);
  535 + GSkyMap ring8("GAL", 8, "RING", 1);
  536 + GSkyMap ring16("GAL", 16, "RING", 1);
  537 + GSkyMap ring32("GAL", 32, "RING", 1);
  538 + GSkyMap ring64("GAL", 64, "RING", 1);
  539 + GSkyMap ring128("GAL", 128, "RING", 1);
  540 + GSkyMap ring256("GAL", 256, "RING", 1);
  541 + GSkyMap ring512("GAL", 512, "RING", 1);
  542 + GSkyMap nest1("GAL", 1, "NEST", 1);
  543 + GSkyMap nest2("GAL", 2, "NEST", 1);
  544 + GSkyMap nest4("GAL", 4, "NEST", 1);
  545 + GSkyMap nest8("GAL", 8, "NEST", 1);
  546 + GSkyMap nest16("GAL", 16, "NEST", 1);
  547 + GSkyMap nest32("GAL", 32, "NEST", 1);
  548 + GSkyMap nest64("GAL", 64, "NEST", 1);
  549 + GSkyMap nest128("GAL", 128, "NEST", 1);
  550 + GSkyMap nest256("GAL", 256, "NEST", 1);
  551 + GSkyMap nest512("GAL", 512, "NEST", 1);
  552 + GSkyMap map1("CEL", 1, "RING", 1);
  553 + GSkyMap map2("CEL", 1, "RING", 2);
  554 + GSkyMap map3("EQU", 1, "RING", 1);
  555 + GSkyMap map4("EQU", 1, "NESTED", 1);
556 556  
557 557 test_try_success();
558 558 }
... ... @@ -563,8 +563,8 @@ void TestGSky::test_GSkymap_healpix_construct(void)
563 563 // Test Healpix copy constructor
564 564 test_try("Test Healpix copy constructor");
565 565 try {
566   - GSkymap ring1("GAL", 1, "RING", 1);
567   - GSkymap ring2 = ring1;
  566 + GSkyMap ring1("GAL", 1, "RING", 1);
  567 + GSkyMap ring2 = ring1;
568 568  
569 569 test_try_success();
570 570 }
... ... @@ -575,7 +575,7 @@ void TestGSky::test_GSkymap_healpix_construct(void)
575 575 // Test invalid coordsys in constructor
576 576 test_try("Test invalid coordsys in constructor");
577 577 try {
578   - GSkymap map("HOR", 1, "RING", 1);
  578 + GSkyMap map("HOR", 1, "RING", 1);
579 579 test_try_failure();
580 580 }
581 581 catch (GException::wcs_bad_coords &e) {
... ... @@ -588,7 +588,7 @@ void TestGSky::test_GSkymap_healpix_construct(void)
588 588 // Test invalid nside in constructor
589 589 test_try("Test invalid nside in constructor");
590 590 try {
591   - GSkymap map("GAL", 3, "RING", 1);
  591 + GSkyMap map("GAL", 3, "RING", 1);
592 592 test_try_failure();
593 593 }
594 594 catch (GException::wcs_hpx_bad_nside &e) {
... ... @@ -601,7 +601,7 @@ void TestGSky::test_GSkymap_healpix_construct(void)
601 601 // Test invalid ordering in constructor
602 602 test_try("Test invalid ordering in constructor");
603 603 try {
604   - GSkymap map("GAL", 2, "SPHERICAL", 1);
  604 + GSkyMap map("GAL", 2, "SPHERICAL", 1);
605 605 test_try_failure();
606 606 }
607 607 catch (GException::wcs_hpx_bad_ordering &e) {
... ... @@ -615,7 +615,7 @@ void TestGSky::test_GSkymap_healpix_construct(void)
615 615 // Test invalid nmaps in constructor
616 616 test_try("Test invalid nmaps in constructor");
617 617 try {
618   - GSkymap map("GAL", 2, "NEST", 0);
  618 + GSkyMap map("GAL", 2, "NEST", 0);
619 619 test_try_failure();
620 620 }
621 621 catch (GException::skymap_bad_par &e) {
... ... @@ -632,15 +632,15 @@ void TestGSky::test_GSkymap_healpix_construct(void)
632 632  
633 633  
634 634 /***************************************************************************
635   - * @brief GSkymap_healpix_io
  635 + * @brief GSkyMap_healpix_io
636 636 ***************************************************************************/
637   -void TestGSky::test_GSkymap_healpix_io(void)
  637 +void TestGSky::test_GSkyMap_healpix_io(void)
638 638 {
639 639 // Set filenames
640 640 const std::string file1 = "test_skymap_hpx_1.fits";
641 641  
642 642 // Define Healpix map for comparison
643   - GSkymap refmap("GAL", 4, "RING", 1);
  643 + GSkyMap refmap("GAL", 4, "RING", 1);
644 644  
645 645 // Test Healpix map saving
646 646 test_try("Test Healpix map saving");
... ... @@ -658,7 +658,7 @@ void TestGSky::test_GSkymap_healpix_io(void)
658 658 // Test Healpix map loading
659 659 test_try("Test Healpix map loading");
660 660 try {
661   - GSkymap map;
  661 + GSkyMap map;
662 662 map.load(file1);
663 663 int diff = 0;
664 664 for (int pix = 0; pix < refmap.npix(); ++pix) {
... ... @@ -678,7 +678,7 @@ void TestGSky::test_GSkymap_healpix_io(void)
678 678 // Test Healpix map instantiation
679 679 test_try("Test Healpix map instantiation");
680 680 try {
681   - GSkymap map(file1);
  681 + GSkyMap map(file1);
682 682 int diff = 0;
683 683 for (int pix = 0; pix < refmap.npix(); ++pix) {
684 684 if (map(pix) != refmap(pix))
... ... @@ -699,9 +699,9 @@ void TestGSky::test_GSkymap_healpix_io(void)
699 699  
700 700  
701 701 /***************************************************************************
702   - * @brief GSkymap_wcs_construct
  702 + * @brief GSkyMap_wcs_construct
703 703 ***************************************************************************/
704   -void TestGSky::test_GSkymap_wcs_construct(void)
  704 +void TestGSky::test_GSkyMap_wcs_construct(void)
705 705 {
706 706 // Set precision
707 707 double eps = 1.0e-5;
... ... @@ -709,7 +709,7 @@ void TestGSky::test_GSkymap_wcs_construct(void)
709 709 // Test void constructor
710 710 test_try("Test void constructor");
711 711 try {
712   - GSkymap map;
  712 + GSkyMap map;
713 713 test_try_success();
714 714 }
715 715 catch (std::exception &e) {
... ... @@ -719,7 +719,7 @@ void TestGSky::test_GSkymap_wcs_construct(void)
719 719 // Test non-Healpix constructors
720 720 test_try("Test non-Healpix constructors");
721 721 try {
722   - GSkymap map1("CAR", "GAL", 0.0, 0.0, 1.0, 1.0, 100, 100);
  722 + GSkyMap map1("CAR", "GAL", 0.0, 0.0, 1.0, 1.0, 100, 100);
723 723 test_try_success();
724 724 }
725 725 catch (std::exception &e) {
... ... @@ -729,7 +729,7 @@ void TestGSky::test_GSkymap_wcs_construct(void)
729 729 // Test CAR projection
730 730 test_try("Test CAR projection");
731 731 try {
732   - GSkymap map1("CAR", "GAL", 138.817, 37.293, 0.521, 0.931, 100, 100);
  732 + GSkyMap map1("CAR", "GAL", 138.817, 37.293, 0.521, 0.931, 100, 100);
733 733 GSkyDir dir;
734 734 for (int l = -180; l < 180; ++l) {
735 735 for (int b = -90; b < 90; ++b) {
... ... @@ -755,17 +755,17 @@ void TestGSky::test_GSkymap_wcs_construct(void)
755 755  
756 756  
757 757 /***************************************************************************
758   - * @brief GSkymap_wcs_io
  758 + * @brief GSkyMap_wcs_io
759 759 ***************************************************************************/
760   -void TestGSky::test_GSkymap_wcs_io(void)
  760 +void TestGSky::test_GSkyMap_wcs_io(void)
761 761 {
762 762 // Set filenames
763 763 const std::string file1 = "test_skymap_wcs_1.fits";
764 764 const std::string file2 = "test_skymap_wcs_2.fits";
765 765  
766 766 // Define WCS map for comparison
767   - GSkymap refmap1("CAR", "GAL", 0.0, 0.0, -1.0, 1.0, 100, 100);
768   - GSkymap refmap2("CAR", "CEL", 0.0, 0.0, -0.3, 0.3, 200, 200);
  767 + GSkyMap refmap1("CAR", "GAL", 0.0, 0.0, -1.0, 1.0, 100, 100);
  768 + GSkyMap refmap2("CAR", "CEL", 0.0, 0.0, -0.3, 0.3, 200, 200);
769 769  
770 770 // Test WCS map saving
771 771 test_try("Test WCS map saving");
... ... @@ -787,7 +787,7 @@ void TestGSky::test_GSkymap_wcs_io(void)
787 787 // Test WCS map loading (1)
788 788 test_try("Test WCS map loading (1)");
789 789 try {
790   - GSkymap map;
  790 + GSkyMap map;
791 791 map.load(file1);
792 792 int diff = 0;
793 793 for (int pix = 0; pix < refmap1.npix(); ++pix) {
... ... @@ -807,7 +807,7 @@ void TestGSky::test_GSkymap_wcs_io(void)
807 807 // Test WCS map loading (2)
808 808 test_try("Test WCS map loading (2)");
809 809 try {
810   - GSkymap map;
  810 + GSkyMap map;
811 811 map.load(file2);
812 812 int diff = 0;
813 813 for (int pix = 0; pix < refmap2.npix(); ++pix) {
... ... @@ -830,16 +830,16 @@ void TestGSky::test_GSkymap_wcs_io(void)
830 830  
831 831  
832 832 /***************************************************************************
833   - * @brief GSkymap
  833 + * @brief GSkyMap
834 834 *
835   - * This method tests the GSkymap class.
  835 + * This method tests the GSkyMap class.
836 836 ***************************************************************************/
837   -void TestGSky::test_GSkymap(void)
  837 +void TestGSky::test_GSkyMap(void)
838 838 {
839 839 // Define several maps for comparison
840   - GSkymap map_src("CAR", "GAL", 0.0, 0.0, -1.0, 1.0, 10, 10, 2);
841   - GSkymap map_dst("CAR", "GAL", 0.0, 0.0, -0.1, 0.1, 100, 100, 2);
842   - GSkymap map_new("CAR", "GAL", 0.0, 0.0, -0.1, 0.1, 100, 100, 2);
  840 + GSkyMap map_src("CAR", "GAL", 0.0, 0.0, -1.0, 1.0, 10, 10, 2);
  841 + GSkyMap map_dst("CAR", "GAL", 0.0, 0.0, -0.1, 0.1, 100, 100, 2);
  842 + GSkyMap map_new("CAR", "GAL", 0.0, 0.0, -0.1, 0.1, 100, 100, 2);
843 843  
844 844 // Fill map pixels
845 845 double total_src = 0.0;
... ... @@ -870,8 +870,8 @@ void TestGSky::test_GSkymap(void)
870 870 total_dst /= 100.0;
871 871 total_new /= 100.0;
872 872 total_ref /= 100.0;
873   - test_value(total_dst, total_ref, 1.0e-3, "Test operator+=(GSkymap)");
874   - test_value(total_new, total_ref, 1.0e-3, "Test operator+(GSkymap)");
  873 + test_value(total_dst, total_ref, 1.0e-3, "Test operator+=(GSkyMap)");
  874 + test_value(total_new, total_ref, 1.0e-3, "Test operator+(GSkyMap)");
875 875  
876 876 // Subtract pixels from destination map
877 877 map_new = map_dst - map_src;
... ... @@ -887,11 +887,11 @@ void TestGSky::test_GSkymap(void)
887 887 total_new += map_dst(pix,k);
888 888 }
889 889 }
890   - test_value(total_dst, 0.0, 1.0e-3, "Test operator-=(GSkymap)");
891   - test_value(total_new, 0.0, 1.0e-3, "Test operator-(GSkymap)");
  890 + test_value(total_dst, 0.0, 1.0e-3, "Test operator-=(GSkyMap)");
  891 + test_value(total_new, 0.0, 1.0e-3, "Test operator-(GSkyMap)");
892 892  
893 893 // Check map multiplication
894   - GSkymap test_map = map_src;
  894 + GSkyMap test_map = map_src;
895 895 test_map *= map_src;
896 896 map_new = map_src * map_src;
897 897 double total_test = 0.0;
... ... @@ -904,8 +904,8 @@ void TestGSky::test_GSkymap(void)
904 904 total_ref += map_src(pix,k) * map_src(pix,k);
905 905 }
906 906 }
907   - test_value(total_test, total_ref, 1.0e-3, "Test operator*=(GSkymap)");
908   - test_value(total_new, total_ref, 1.0e-3, "Test operator*(GSkymap)");
  907 + test_value(total_test, total_ref, 1.0e-3, "Test operator*=(GSkyMap)");
  908 + test_value(total_new, total_ref, 1.0e-3, "Test operator*(GSkyMap)");
909 909  
910 910 // Check map division
911 911 test_map = map_src;
... ... @@ -921,8 +921,8 @@ void TestGSky::test_GSkymap(void)
921 921 total_ref += map_src(pix,k) / map_src(pix,k);
922 922 }
923 923 }
924   - test_value(total_test, total_ref, 1.0e-3, "Test operator/=(GSkymap)");
925   - test_value(total_new, total_ref, 1.0e-3, "Test operator/(GSkymap)");
  924 + test_value(total_test, total_ref, 1.0e-3, "Test operator/=(GSkyMap)");
  925 + test_value(total_new, total_ref, 1.0e-3, "Test operator/(GSkyMap)");
926 926  
927 927 // Check map scaling
928 928 test_map = map_src;
... ... @@ -975,7 +975,7 @@ void TestGSky::test_GSkymap(void)
975 975 map_dst.save("test_map_dst.fits", true);
976 976  
977 977 // Test map stacking
978   - GSkymap map_stacked = map_src;
  978 + GSkyMap map_stacked = map_src;
979 979 map_stacked.stack_maps();
980 980 double total_stacked = 0.0;
981 981 for (int pix = 0; pix < map_stacked.npix(); ++pix) {
... ... @@ -985,7 +985,7 @@ void TestGSky::test_GSkymap(void)
985 985 test_value(map_stacked.nmaps(), 1, "Test stack_maps() method");
986 986  
987 987 // Test map number changing
988   - GSkymap map_more = map_src;
  988 + GSkyMap map_more = map_src;
989 989 map_more.nmaps(4);
990 990 double total_more = 0.0;
991 991 for (int k = 0; k < map_more.nmaps(); ++k) {
... ... @@ -995,7 +995,7 @@ void TestGSky::test_GSkymap(void)
995 995 }
996 996 test_value(total_more, total_src, 1.0e-3, "Test nmaps() method with more maps");
997 997 test_value(map_more.nmaps(), 4, "Test nmaps() method with more maps");
998   - GSkymap map_less = map_src;
  998 + GSkyMap map_less = map_src;
999 999 map_less.nmaps(1);
1000 1000 double total_less = 0.0;
1001 1001 for (int k = 0; k < map_less.nmaps(); ++k) {
... ... @@ -1007,7 +1007,7 @@ void TestGSky::test_GSkymap(void)
1007 1007 test_value(map_less.nmaps(), 1, "Test nmaps() method with less maps");
1008 1008  
1009 1009 // Test map extraction
1010   - GSkymap map_extract = map_src.extract(0);
  1010 + GSkyMap map_extract = map_src.extract(0);
1011 1011 double total_extract = 0.0;
1012 1012 for (int k = 0; k < map_extract.nmaps(); ++k) {
1013 1013 for (int pix = 0; pix < map_extract.npix(); ++pix) {
... ...
test/test_GSky.hpp
... ... @@ -43,11 +43,11 @@ public:
43 43 virtual std::string classname(void) const { return "TestGSky"; }
44 44 void test_GWcs(void);
45 45 void test_GSkyPixel(void);
46   - void test_GSkymap_healpix_construct(void);
47   - void test_GSkymap_healpix_io(void);
48   - void test_GSkymap_wcs_construct(void);
49   - void test_GSkymap_wcs_io(void);
50   - void test_GSkymap(void);
  46 + void test_GSkyMap_healpix_construct(void);
  47 + void test_GSkyMap_healpix_io(void);
  48 + void test_GSkyMap_wcs_construct(void);
  49 + void test_GSkyMap_wcs_io(void);
  50 + void test_GSkyMap(void);
51 51 void test_GSkyRegions_io(void);
52 52 void test_GSkyRegionCircle_construct(void);
53 53 void test_GSkyRegionCircle_logic(void);
... ...
test/test_GSky.py
... ... @@ -96,7 +96,7 @@ class Test(GPythonTestSuite):
96 96 dir = pixels.inx2dir(i)
97 97 inx = pixels.dir2inx(dir)
98 98 msg = map + " inx2dir/dir2inx check for pixel " + str(i)
99   - err = map + " GSkymap trouble with pixel " + str(i) + " (" + str(inx) + \
  99 + err = map + " GSkyMap trouble with pixel " + str(i) + " (" + str(inx) + \
100 100 "), RA=" + str(dir.ra() * 180 / pi) + ", Dec=" + str(dir.dec() * 180 / pi)
101 101 self.test_assert(i == inx, msg, err)
102 102  
... ... @@ -110,7 +110,7 @@ class Test(GPythonTestSuite):
110 110 dra -= 2.0 * pi
111 111 ddec = abs(dir.dec() - dir_new.dec())
112 112 msg = map + " dir check for pixel " + str(i)
113   - err = map + " GSkymap trouble with pixel " + str(i) + " (" + str(dra) + \
  113 + err = map + " GSkyMap trouble with pixel " + str(i) + " (" + str(dra) + \
114 114 "," + str(ddec) + ")"
115 115 self.test_assert(not (dra > 1.0e-9 or ddec > 1.0e-9), msg, err)
116 116  
... ... @@ -132,7 +132,7 @@ class Test(GPythonTestSuite):
132 132 pass
133 133  
134 134 # Create skymap
135   - pixels = GSkymap(proj, "CEL", 83.6331, 22.0145, -3.7, 2.6, 5, 5, 20)
  135 + pixels = GSkyMap(proj, "CEL", 83.6331, 22.0145, -3.7, 2.6, 5, 5, 20)
136 136 for map in range(pixels.nmaps()):
137 137 for i in range(pixels.npix()):
138 138 pixels[i, map] = i + map * pixels.npix()
... ... @@ -161,14 +161,14 @@ class Test(GPythonTestSuite):
161 161 pass
162 162  
163 163 # Create HEALPix skymap
164   - pixels = GSkymap("GAL", 2, "RING", 2)
  164 + pixels = GSkyMap("GAL", 2, "RING", 2)
165 165 for i in range(pixels.npix()):
166 166 pixels[i] = i + 1.0
167 167 pixels[i, 1] = i + 1.0 + 1000.0
168 168 pixels.save(file1)
169 169  
170 170 # Load HEALPix skymap
171   - pixels = GSkymap(file1)
  171 + pixels = GSkyMap(file1)
172 172  
173 173 # Control coordinate and pixel transformations
174 174 self.test_skymap_pixels(pixels, "HEALPix")
... ... @@ -184,7 +184,7 @@ class Test(GPythonTestSuite):
184 184 pixels.save(file2, True)
185 185  
186 186 # Load again HEALPix skymap
187   - pixels = GSkymap(file1)
  187 + pixels = GSkyMap(file1)
188 188  
189 189 # Return
190 190 return
... ... @@ -323,7 +323,7 @@ class Test(GPythonTestSuite):
323 323 Test the skymap operators.
324 324 """
325 325 # Setup skymaps
326   - map = GSkymap("CAR", "CEL", 83.6331, 22.0145, -3.7, 2.6, 2, 2)
  326 + map = GSkyMap("CAR", "CEL", 83.6331, 22.0145, -3.7, 2.6, 2, 2)
327 327 map[0] = 1.0
328 328 map[1] = 2.0
329 329 map[2] = 3.0
... ...
test/test_healpix_boundaries.py
... ... @@ -23,7 +23,7 @@
23 23 import gammalib
24 24 import matplotlib.pyplot as plt
25 25  
26   -map = gammalib.GSkymap("GAL", 1, "RING")
  26 +map = gammalib.GSkyMap("GAL", 1, "RING")
27 27 print(map)
28 28  
29 29 # Create figures
... ...
test/test_healpix_flux.py
... ... @@ -37,10 +37,10 @@ print(&quot;Pixels %d&quot; % npix)
37 37 for index in range(npix):
38 38  
39 39 # Allocate HealPix map
40   - map = gammalib.GSkymap("GAL", nside, "RING")
  40 + map = gammalib.GSkyMap("GAL", nside, "RING")
41 41  
42 42 # Create WCS map, set Healpix index and merge into WCS map
43   - wcs = gammalib.GSkymap("CAR", "GAL", 0.0, 0.0, -0.1, 0.1, 3600, 1800)
  43 + wcs = gammalib.GSkyMap("CAR", "GAL", 0.0, 0.0, -0.1, 0.1, 3600, 1800)
44 44 map[index] = 1.0
45 45 wcs += map
46 46  
... ...
test/test_model_spatial_const.py
... ... @@ -33,7 +33,7 @@ def test_mc(samples=100000):
33 33 model = gammalib.GModelSpatialDiffuseConst(1.0)
34 34  
35 35 # Create WCS map
36   - map = gammalib.GSkymap("AIT", "GAL", 0.0, 0.0, -1.0, 1.0, 360, 180)
  36 + map = gammalib.GSkyMap("AIT", "GAL", 0.0, 0.0, -1.0, 1.0, 360, 180)
37 37  
38 38 # Set fixed parameters
39 39 energy = gammalib.GEnergy()
... ...
test/test_model_spatial_map.py
... ... @@ -31,7 +31,7 @@ def eval_model(model, binsz=0.01, nbins=1000):
31 31 interpolate the skymap into a finer grid.
32 32 """
33 33 # Create CAR skymap
34   - map = GSkymap("CAR", "CEL", 201.3651, -43.0191, binsz, binsz, nbins, nbins)
  34 + map = GSkyMap("CAR", "CEL", 201.3651, -43.0191, binsz, binsz, nbins, nbins)
35 35  
36 36 # Fill map
37 37 for i in range(map.npix()):
... ...
test/test_skymap_flux.py
1 1 #! /usr/bin/env python
2 2 # ==========================================================================
3   -# This script tests the accuracy of the GSkymap flux computation.
  3 +# This script tests the accuracy of the GSkyMap flux computation.
4 4 #
5 5 # --------------------------------------------------------------------------
6 6 #
... ... @@ -31,9 +31,9 @@ na = 3600
31 31 dr_rad = dr * gammalib.deg2rad
32 32 da_rad = da * gammalib.deg2rad
33 33  
34   -# Allocate GSkymap
35   -map = gammalib.GSkymap("CAR", "GAL", 0.0, 0.0, -1.0, 1.0, 360, 180)
36   -#map = gammalib.GSkymap("GAL", 64, "RING")
  34 +# Allocate GSkyMap
  35 +map = gammalib.GSkyMap("CAR", "GAL", 0.0, 0.0, -1.0, 1.0, 360, 180)
  36 +#map = gammalib.GSkyMap("GAL", 64, "RING")
37 37  
38 38 # Loop over all pixels
39 39 for index in range(map.npix()):
... ...
test/testinst/GTestEventCube.hpp
1 1 /***************************************************************************
2 2 * GTestEventCube.hpp - Test event bin container class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2013-2014 by Jean-Baptiste Cayrou *
  4 + * copyright (C) 2013-2015 by Jean-Baptiste Cayrou *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -32,7 +32,6 @@
32 32 #include <vector>
33 33 #include "GEventCube.hpp"
34 34 #include "GTestEventBin.hpp"
35   -#include "GSkymap.hpp"
36 35 #include "GEbounds.hpp"
37 36 #include "GGti.hpp"
38 37 #include "GEnergy.hpp"
... ...