Commit 88c2e5576688653bcb53bdb891ce4f904f6d197f

Authored by Jürgen Knödlseder
1 parent 3233a1d2

Rename GSkymap to GSkyMap.

cscripts/csresmap.py
@@ -251,8 +251,8 @@ class csresmap(ctools.cscript): @@ -251,8 +251,8 @@ class csresmap(ctools.cscript):
251 251
252 # Use input file directly if given 252 # Use input file directly if given
253 if self.m_use_maps: 253 if self.m_use_maps:
254 - countmap = gammalib.GSkymap(self["inobs"].filename())  
255 - modelmap = gammalib.GSkymap(self.m_modcube) 254 + countmap = gammalib.GSkyMap(self["inobs"].filename())
  255 + modelmap = gammalib.GSkyMap(self.m_modcube)
256 256
257 else: 257 else:
258 258
@@ -303,7 +303,7 @@ class csresmap(ctools.cscript): @@ -303,7 +303,7 @@ class csresmap(ctools.cscript):
303 model["debug"].boolean(self.m_debug) 303 model["debug"].boolean(self.m_debug)
304 model.run() 304 model.run()
305 305
306 - # Get model map into GSkymap object 306 + # Get model map into GSkyMap object
307 modelmap = model.cube().map().copy() 307 modelmap = model.cube().map().copy()
308 308
309 309
cscripts/obsutils.py
@@ -232,7 +232,7 @@ def cntmap(obs, proj="TAN", coord="GAL", xval=0.0, yval=0.0, \ @@ -232,7 +232,7 @@ def cntmap(obs, proj="TAN", coord="GAL", xval=0.0, yval=0.0, \
232 outname - Counts map FITS filename (default: cntmap.fits) 232 outname - Counts map FITS filename (default: cntmap.fits)
233 """ 233 """
234 # Allocate counts map 234 # Allocate counts map
235 - map = gammalib.GSkymap(proj, coord, xval, yval, -binsz, binsz, nxpix, nypix, 1) 235 + map = gammalib.GSkyMap(proj, coord, xval, yval, -binsz, binsz, nxpix, nypix, 1)
236 236
237 # Set maximum pixel number 237 # Set maximum pixel number
238 maxpixel = nxpix * nypix 238 maxpixel = nxpix * nypix
@@ -284,7 +284,7 @@ def modmap(obs, eref=0.1, proj="TAN", coord="GAL", xval=0.0, yval=0.0, \ @@ -284,7 +284,7 @@ def modmap(obs, eref=0.1, proj="TAN", coord="GAL", xval=0.0, yval=0.0, \
284 outname - Model map FITS filename (default: modmap.fits) 284 outname - Model map FITS filename (default: modmap.fits)
285 """ 285 """
286 # Allocate model map 286 # Allocate model map
287 - map = gammalib.GSkymap(proj, coord, xval, yval, -binsz, binsz, nxpix, nypix, 1) 287 + map = gammalib.GSkyMap(proj, coord, xval, yval, -binsz, binsz, nxpix, nypix, 1)
288 288
289 # Set reference energy, time and direction. The time is not initialised and is 289 # Set reference energy, time and direction. The time is not initialised and is
290 # in fact not used (as the IRF is assumed to be time independent for now). 290 # in fact not used (as the IRF is assumed to be time independent for now).
cscripts/tsmerge.py
@@ -37,13 +37,13 @@ class maps: @@ -37,13 +37,13 @@ class maps:
37 fits = gammalib.GFits(fitsfile) 37 fits = gammalib.GFits(fitsfile)
38 38
39 # get TS map 39 # get TS map
40 - self.tsmap = gammalib.GSkymap() 40 + self.tsmap = gammalib.GSkyMap()
41 self.tsmap.read(fits[0]) 41 self.tsmap.read(fits[0])
42 42
43 # Get status map 43 # Get status map
44 if not fits.contains("STATUS MAP"): 44 if not fits.contains("STATUS MAP"):
45 self.error("No extension \"STATUS MAP\" found in \""+self.filename+"\"") 45 self.error("No extension \"STATUS MAP\" found in \""+self.filename+"\"")
46 - self.statusmap = gammalib.GSkymap() 46 + self.statusmap = gammalib.GSkyMap()
47 self.statusmap.read(fits["STATUS MAP"]) 47 self.statusmap.read(fits["STATUS MAP"])
48 48
49 # Get other maps 49 # Get other maps
@@ -51,7 +51,7 @@ class maps: @@ -51,7 +51,7 @@ class maps:
51 self.mapnames = [] 51 self.mapnames = []
52 for hdu in fits: 52 for hdu in fits:
53 if hdu.extname() != "IMAGE" and hdu.extname() != "STATUS MAP": 53 if hdu.extname() != "IMAGE" and hdu.extname() != "STATUS MAP":
54 - skymap = gammalib.GSkymap() 54 + skymap = gammalib.GSkyMap()
55 skymap.read(hdu) 55 skymap.read(hdu)
56 self.maps.append(skymap) 56 self.maps.append(skymap)
57 self.mapnames.append(hdu.extname()) 57 self.mapnames.append(hdu.extname())
pyext/ctool.i
@@ -93,7 +93,7 @@ public: @@ -93,7 +93,7 @@ public:
93 93
94 // Protected methods that create objects from user parameters 94 // Protected methods that create objects from user parameters
95 GEbounds create_ebounds(void); 95 GEbounds create_ebounds(void);
96 - GSkymap create_map(const GObservations& obs); 96 + GSkyMap create_map(const GObservations& obs);
97 GCTAEventCube create_cube(const GObservations& obs); 97 GCTAEventCube create_cube(const GObservations& obs);
98 GCTAObservation create_cta_obs(void); 98 GCTAObservation create_cta_obs(void);
99 99
pyext/ctskymap.i
1 /*************************************************************************** 1 /***************************************************************************
2 * ctskymap - Sky mapping tool * 2 * ctskymap - Sky mapping tool *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 - * copyright (C) 2012-2014 by Juergen Knoedlseder * 4 + * copyright (C) 2012-2015 by Juergen Knoedlseder *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
6 * * 6 * *
7 * This program is free software: you can redistribute it and/or modify * 7 * This program is free software: you can redistribute it and/or modify *
@@ -47,7 +47,7 @@ public: @@ -47,7 +47,7 @@ public:
47 void clear(void); 47 void clear(void);
48 void run(void); 48 void run(void);
49 void save(void); 49 void save(void);
50 - const GSkymap& map(void) const; 50 + const GSkyMap& map(void) const;
51 }; 51 };
52 52
53 53
pyext/cttsmap.i
1 /*************************************************************************** 1 /***************************************************************************
2 * cttsmap - TS map calculation tool * 2 * cttsmap - TS map calculation tool *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 - * copyright (C) 2014 by Michael Mayer * 4 + * copyright (C) 2014-2015 by Michael Mayer *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
6 * * 6 * *
7 * This program is free software: you can redistribute it and/or modify * 7 * This program is free software: you can redistribute it and/or modify *
@@ -48,7 +48,7 @@ public: @@ -48,7 +48,7 @@ public:
48 void run(void); 48 void run(void);
49 void save(void); 49 void save(void);
50 const GObservations& obs(void) const; 50 const GObservations& obs(void) const;
51 - const GSkymap& tsmap(void) const; 51 + const GSkyMap& tsmap(void) const;
52 }; 52 };
53 53
54 54
src/ctbin/ctbin.hpp
@@ -96,7 +96,7 @@ protected: @@ -96,7 +96,7 @@ protected:
96 96
97 // Protected members 97 // Protected members
98 GObservations m_obs; //!< Observation container 98 GObservations m_obs; //!< Observation container
99 - GSkymap m_cube; //!< Event cube 99 + GSkyMap m_cube; //!< Event cube
100 GEbounds m_ebounds; //!< Energy boundaries 100 GEbounds m_ebounds; //!< Energy boundaries
101 GGti m_gti; //!< Good time intervals 101 GGti m_gti; //!< Good time intervals
102 double m_ontime; //!< Total ontime 102 double m_ontime; //!< Total ontime
src/ctcubemask/ctcubemask.cpp
@@ -407,7 +407,7 @@ void ctcubemask::apply_mask(GCTAObservation* obs) @@ -407,7 +407,7 @@ void ctcubemask::apply_mask(GCTAObservation* obs)
407 if (cube != NULL) { 407 if (cube != NULL) {
408 408
409 // Extract event cube and energy boundaries 409 // Extract event cube and energy boundaries
410 - GSkymap map = cube->map(); 410 + GSkyMap map = cube->map();
411 const GEbounds& ebounds = cube->ebounds(); 411 const GEbounds& ebounds = cube->ebounds();
412 412
413 // Initialise energy selection 413 // Initialise energy selection
src/ctskymap/ctskymap.hpp
@@ -61,7 +61,7 @@ public: @@ -61,7 +61,7 @@ public:
61 void clear(void); 61 void clear(void);
62 void run(void); 62 void run(void);
63 void save(void); 63 void save(void);
64 - const GSkymap& map(void) const; 64 + const GSkyMap& map(void) const;
65 65
66 protected: 66 protected:
67 // Protected methods 67 // Protected methods
@@ -79,7 +79,7 @@ protected: @@ -79,7 +79,7 @@ protected:
79 79
80 // Protected members 80 // Protected members
81 GObservations m_obs; //!< Observation container 81 GObservations m_obs; //!< Observation container
82 - GSkymap m_skymap; //!< Sky map 82 + GSkyMap m_skymap; //!< Sky map
83 }; 83 };
84 84
85 85
@@ -89,7 +89,7 @@ protected: @@ -89,7 +89,7 @@ protected:
89 * @return Reference to observation container 89 * @return Reference to observation container
90 ***************************************************************************/ 90 ***************************************************************************/
91 inline 91 inline
92 -const GSkymap& ctskymap::map(void) const 92 +const GSkyMap& ctskymap::map(void) const
93 { 93 {
94 return m_skymap; 94 return m_skymap;
95 } 95 }
src/cttsmap/cttsmap.cpp
@@ -537,7 +537,7 @@ void cttsmap::get_parameters(void) @@ -537,7 +537,7 @@ void cttsmap::get_parameters(void)
537 } 537 }
538 538
539 // Create sky map based on task parameters 539 // Create sky map based on task parameters
540 - GSkymap map = create_map(m_obs); 540 + GSkyMap map = create_map(m_obs);
541 541
542 // Initialise maps from user parameters 542 // Initialise maps from user parameters
543 init_maps(map); 543 init_maps(map);
@@ -563,19 +563,19 @@ void cttsmap::get_parameters(void) @@ -563,19 +563,19 @@ void cttsmap::get_parameters(void)
563 * 563 *
564 * Initialises skymaps that will contain map information. 564 * Initialises skymaps that will contain map information.
565 ***************************************************************************/ 565 ***************************************************************************/
566 -void cttsmap::init_maps(const GSkymap& map) 566 +void cttsmap::init_maps(const GSkyMap& map)
567 { 567 {
568 // Initialise map information 568 // Initialise map information
569 m_tsmap.clear(); 569 m_tsmap.clear();
570 570
571 // Create skymap 571 // Create skymap
572 - m_tsmap = GSkymap(map); 572 + m_tsmap = GSkyMap(map);
573 573
574 // Initialise map information 574 // Initialise map information
575 m_statusmap.clear(); 575 m_statusmap.clear();
576 576
577 // Create status map 577 // Create status map
578 - m_statusmap = GSkymap(map); 578 + m_statusmap = GSkyMap(map);
579 579
580 // Initialise maps of free parameters 580 // Initialise maps of free parameters
581 if (m_testsource != NULL) { 581 if (m_testsource != NULL) {
src/cttsmap/cttsmap.hpp
@@ -73,7 +73,7 @@ public: @@ -73,7 +73,7 @@ public:
73 void run(void); 73 void run(void);
74 void save(void); 74 void save(void);
75 const GObservations& obs(void) const; 75 const GObservations& obs(void) const;
76 - const GSkymap& tsmap(void) const; 76 + const GSkyMap& tsmap(void) const;
77 77
78 protected: 78 protected:
79 // Protected methods 79 // Protected methods
@@ -81,7 +81,7 @@ protected: @@ -81,7 +81,7 @@ protected:
81 void copy_members(const cttsmap& app); 81 void copy_members(const cttsmap& app);
82 void free_members(void); 82 void free_members(void);
83 void get_parameters(void); 83 void get_parameters(void);
84 - void init_maps(const GSkymap& map); 84 + void init_maps(const GSkyMap& map);
85 85
86 // User parameters 86 // User parameters
87 std::string m_srcname; //!< Name of source which is moved around 87 std::string m_srcname; //!< Name of source which is moved around
@@ -94,10 +94,10 @@ protected: @@ -94,10 +94,10 @@ protected:
94 94
95 // Protected members 95 // Protected members
96 GObservations m_obs; //!< Observation container 96 GObservations m_obs; //!< Observation container
97 - GSkymap m_tsmap; //!< TS map  
98 - GSkymap m_statusmap; //!< Map of computed bins 97 + GSkyMap m_tsmap; //!< TS map
  98 + GSkyMap m_statusmap; //!< Map of computed bins
99 std::vector<std::string> m_mapnames; //!< Names of free parameters 99 std::vector<std::string> m_mapnames; //!< Names of free parameters
100 - std::vector<GSkymap> m_maps; //!< Sky maps for each free parameter 100 + std::vector<GSkyMap> m_maps; //!< Sky maps for each free parameter
101 GModel* m_testsource; //!< Pointer to test source for TS computation 101 GModel* m_testsource; //!< Pointer to test source for TS computation
102 }; 102 };
103 103
@@ -120,7 +120,7 @@ const GObservations&amp; cttsmap::obs(void) const @@ -120,7 +120,7 @@ const GObservations&amp; cttsmap::obs(void) const
120 * @return Reference to TS skymap 120 * @return Reference to TS skymap
121 ***************************************************************************/ 121 ***************************************************************************/
122 inline 122 inline
123 -const GSkymap& cttsmap::tsmap(void) const 123 +const GSkyMap& cttsmap::tsmap(void) const
124 { 124 {
125 return m_tsmap; 125 return m_tsmap;
126 } 126 }
src/support/ctool.cpp
@@ -475,7 +475,7 @@ GEbounds ctool::create_ebounds(void) @@ -475,7 +475,7 @@ GEbounds ctool::create_ebounds(void)
475 * nxpix - Number of pixels in Right Ascension or longitude 475 * nxpix - Number of pixels in Right Ascension or longitude
476 * nypix - Number of pixels in Declination or latitude 476 * nypix - Number of pixels in Declination or latitude
477 ***************************************************************************/ 477 ***************************************************************************/
478 -GSkymap ctool::create_map(const GObservations& obs) 478 +GSkyMap ctool::create_map(const GObservations& obs)
479 { 479 {
480 // Read task parameters 480 // Read task parameters
481 double xref = 0.0; 481 double xref = 0.0;
@@ -510,7 +510,7 @@ GSkymap ctool::create_map(const GObservations&amp; obs) @@ -510,7 +510,7 @@ GSkymap ctool::create_map(const GObservations&amp; obs)
510 } // endif: got mean pointing as reference 510 } // endif: got mean pointing as reference
511 511
512 // Initialise sky map 512 // Initialise sky map
513 - GSkymap map = GSkymap(proj, coordsys, xref, yref, -binsz, binsz, 513 + GSkyMap map = GSkyMap(proj, coordsys, xref, yref, -binsz, binsz,
514 nxpix, nypix, 1); 514 nxpix, nypix, 1);
515 515
516 // Return sky map 516 // Return sky map
@@ -543,7 +543,7 @@ GSkymap ctool::create_map(const GObservations&amp; obs) @@ -543,7 +543,7 @@ GSkymap ctool::create_map(const GObservations&amp; obs)
543 GCTAEventCube ctool::create_cube(const GObservations& obs) 543 GCTAEventCube ctool::create_cube(const GObservations& obs)
544 { 544 {
545 // Get skymap 545 // Get skymap
546 - GSkymap map = create_map(obs); 546 + GSkyMap map = create_map(obs);
547 547
548 // Set energy boundaries 548 // Set energy boundaries
549 GEbounds ebounds = create_ebounds(); 549 GEbounds ebounds = create_ebounds();
src/support/ctool.hpp
@@ -75,7 +75,7 @@ protected: @@ -75,7 +75,7 @@ protected:
75 75
76 // Protected methods that create objects from user parameters 76 // Protected methods that create objects from user parameters
77 GEbounds create_ebounds(void); 77 GEbounds create_ebounds(void);
78 - GSkymap create_map(const GObservations& obs); 78 + GSkyMap create_map(const GObservations& obs);
79 GCTAEventCube create_cube(const GObservations& obs); 79 GCTAEventCube create_cube(const GObservations& obs);
80 GCTAObservation create_cta_obs(void); 80 GCTAObservation create_cta_obs(void);
81 81