Commit dae95b373ae47b354f687777d32c4a07e62d11e3

Authored by Jürgen Knödlseder
2 parents 97a49aa6 eb7c86fc

Merge branch 'omega_to_solidangle' into devel

include/GHealpix.hpp
... ... @@ -101,7 +101,7 @@ private:
101 101 int m_num_pixels; //!< Number of pixels
102 102 double m_fact1; //!<
103 103 double m_fact2; //!<
104   - double m_omega; //!< Solid angle of pixel
  104 + double m_solidangle; //!< Solid angle of pixel
105 105 };
106 106  
107 107  
... ... @@ -181,7 +181,7 @@ const int&amp; GHealpix::nside(void) const
181 181 inline
182 182 double GHealpix::solidangle(const GSkyPixel& pixel) const
183 183 {
184   - return m_omega;
  184 + return m_solidangle;
185 185 }
186 186  
187 187 #endif /* GHEALPIX_HPP */
... ...
inst/com/include/GCOMEventBin.hpp
... ... @@ -74,7 +74,7 @@ public:
74 74  
75 75 // Other methods
76 76 const int& index(void) const { return m_index; }
77   - const double& omega(void) const { return *m_omega; }
  77 + const double& solidangle(void) const { return *m_solidangle; }
78 78 const GEnergy& ewidth(void) const { return *m_ewidth; }
79 79 const double& ontime(void) const { return *m_ontime; }
80 80  
... ... @@ -89,7 +89,7 @@ protected:
89 89 int m_index; //!< Dataspace index
90 90 double* m_counts; //!< Pointer to number of counts
91 91 GCOMInstDir* m_dir; //!< Pointer to bin direction
92   - double* m_omega; //!< Pointer to solid angle of pixel (sr)
  92 + double* m_solidangle; //!< Pointer to solid angle of pixel (sr)
93 93 GTime* m_time; //!< Pointer to bin time
94 94 double* m_ontime; //!< Pointer to ontime of bin (seconds)
95 95 GEnergy* m_energy; //!< Pointer to bin energy
... ...
inst/com/include/GCOMEventCube.hpp
... ... @@ -109,7 +109,7 @@ protected:
109 109 GEnergy m_energy; //!< Event cube mean energy
110 110 GEnergy m_ewidth; //!< Event cube energy bin width
111 111 std::vector<GSkyDir> m_dirs; //!< Array of event scatter directions
112   - std::vector<double> m_omega; //!< Array of solid angles (sr)
  112 + std::vector<double> m_solidangle; //!< Array of solid angles (sr)
113 113 std::vector<double> m_phi; //!< Array of event scatter angles
114 114 std::vector<double> m_dphi; //!< Array of event scatter angles widths
115 115 };
... ...
inst/com/pyext/GCOMEventBin.i
... ... @@ -54,7 +54,7 @@ public:
54 54  
55 55 // Other methods
56 56 const int& index(void) const;
57   - const double& omega(void) const;
  57 + const double& solidangle(void) const;
58 58 const GEnergy& ewidth(void) const;
59 59 const double& ontime(void) const;
60 60 };
... ...
inst/com/src/GCOMEventBin.cpp
... ... @@ -182,7 +182,7 @@ GCOMEventBin* GCOMEventBin::clone(void) const
182 182 double GCOMEventBin::size(void) const
183 183 {
184 184 // Compute bin size
185   - double size = omega() * ewidth().MeV() * ontime();
  185 + double size = solidangle() * ewidth().MeV() * ontime();
186 186  
187 187 // Return bin size
188 188 return size;
... ... @@ -253,20 +253,20 @@ std::string GCOMEventBin::print(const GChatter&amp; chatter) const
253 253 void GCOMEventBin::init_members(void)
254 254 {
255 255 // Allocate members
256   - m_alloc = true;
257   - m_index = -1; // Signals that event bin does not correspond to cube
258   - m_counts = new double;
259   - m_dir = new GCOMInstDir;
260   - m_omega = new double;
261   - m_time = new GTime;
262   - m_ontime = new double;
263   - m_energy = new GEnergy;
264   - m_ewidth = new GEnergy;
  256 + m_alloc = true;
  257 + m_index = -1; // Signals that event bin does not correspond to cube
  258 + m_counts = new double;
  259 + m_dir = new GCOMInstDir;
  260 + m_solidangle = new double;
  261 + m_time = new GTime;
  262 + m_ontime = new double;
  263 + m_energy = new GEnergy;
  264 + m_ewidth = new GEnergy;
265 265  
266 266 // Initialise members
267 267 *m_counts = 0.0;
268 268 m_dir->clear();
269   - *m_omega = 0.0;
  269 + *m_solidangle = 0.0;
270 270 m_time->clear();
271 271 *m_ontime = 0.0;
272 272 m_energy->clear();
... ... @@ -289,15 +289,15 @@ void GCOMEventBin::copy_members(const GCOMEventBin&amp; bin)
289 289  
290 290  
291 291 // Copy members by cloning
292   - m_alloc = true;
293   - m_index = bin.m_index;
294   - m_counts = new double(*bin.m_counts);
295   - m_dir = new GCOMInstDir(*bin.m_dir);
296   - m_omega = new double(*bin.m_omega);
297   - m_time = new GTime(*bin.m_time);
298   - m_ontime = new double(*bin.m_ontime);
299   - m_energy = new GEnergy(*bin.m_energy);
300   - m_ewidth = new GEnergy(*bin.m_ewidth);
  292 + m_alloc = true;
  293 + m_index = bin.m_index;
  294 + m_counts = new double(*bin.m_counts);
  295 + m_dir = new GCOMInstDir(*bin.m_dir);
  296 + m_solidangle = new double(*bin.m_solidangle);
  297 + m_time = new GTime(*bin.m_time);
  298 + m_ontime = new double(*bin.m_ontime);
  299 + m_energy = new GEnergy(*bin.m_energy);
  300 + m_ewidth = new GEnergy(*bin.m_ewidth);
301 301  
302 302 // Return
303 303 return;
... ... @@ -321,24 +321,24 @@ void GCOMEventBin::free_members(void)
321 321 {
322 322 // If memory was allocated then free members now
323 323 if (m_alloc) {
324   - if (m_counts != NULL) delete m_counts;
325   - if (m_dir != NULL) delete m_dir;
326   - if (m_omega != NULL) delete m_omega;
327   - if (m_time != NULL) delete m_time;
328   - if (m_ontime != NULL) delete m_ontime;
329   - if (m_energy != NULL) delete m_energy;
330   - if (m_ewidth != NULL) delete m_ewidth;
  324 + if (m_counts != NULL) delete m_counts;
  325 + if (m_dir != NULL) delete m_dir;
  326 + if (m_solidangle != NULL) delete m_solidangle;
  327 + if (m_time != NULL) delete m_time;
  328 + if (m_ontime != NULL) delete m_ontime;
  329 + if (m_energy != NULL) delete m_energy;
  330 + if (m_ewidth != NULL) delete m_ewidth;
331 331 }
332 332  
333 333 // Signal member pointers as free
334   - m_alloc = false;
335   - m_counts = NULL;
336   - m_dir = NULL;
337   - m_omega = NULL;
338   - m_time = NULL;
339   - m_ontime = NULL;
340   - m_energy = NULL;
341   - m_ewidth = NULL;
  334 + m_alloc = false;
  335 + m_counts = NULL;
  336 + m_dir = NULL;
  337 + m_solidangle = NULL;
  338 + m_time = NULL;
  339 + m_ontime = NULL;
  340 + m_energy = NULL;
  341 + m_ewidth = NULL;
342 342  
343 343 // Return
344 344 return;
... ...
inst/com/src/GCOMEventCube.cpp
... ... @@ -624,7 +624,7 @@ void GCOMEventCube::init_members(void)
624 624 m_energy.clear();
625 625 m_ewidth.clear();
626 626 m_dirs.clear();
627   - m_omega.clear();
  627 + m_solidangle.clear();
628 628 m_phi.clear();
629 629 m_dphi.clear();
630 630  
... ... @@ -648,16 +648,16 @@ void GCOMEventCube::init_members(void)
648 648 void GCOMEventCube::copy_members(const GCOMEventCube& cube)
649 649 {
650 650 // Copy members
651   - m_dir = cube.m_dir;
652   - m_map = cube.m_map;
653   - m_time = cube.m_time;
654   - m_ontime = cube.m_ontime;
655   - m_energy = cube.m_energy;
656   - m_ewidth = cube.m_ewidth;
657   - m_dirs = cube.m_dirs;
658   - m_omega = cube.m_omega;
659   - m_phi = cube.m_phi;
660   - m_dphi = cube.m_dphi;
  651 + m_dir = cube.m_dir;
  652 + m_map = cube.m_map;
  653 + m_time = cube.m_time;
  654 + m_ontime = cube.m_ontime;
  655 + m_energy = cube.m_energy;
  656 + m_ewidth = cube.m_ewidth;
  657 + m_dirs = cube.m_dirs;
  658 + m_solidangle = cube.m_solidangle;
  659 + m_phi = cube.m_phi;
  660 + m_dphi = cube.m_dphi;
661 661  
662 662 // Prepare event bin
663 663 init_bin();
... ... @@ -698,18 +698,18 @@ void GCOMEventCube::set_scatter_directions(void)
698 698  
699 699 // Clear vectors
700 700 m_dirs.clear();
701   - m_omega.clear();
  701 + m_solidangle.clear();
702 702  
703 703 // Reserve space for pixel directions and solid angles
704 704 m_dirs.reserve(npix());
705   - m_omega.reserve(npix());
  705 + m_solidangle.reserve(npix());
706 706  
707 707 // Set pixel directions and solid angles
708 708 for (int iy = 0; iy < npsi(); ++iy) {
709 709 for (int ix = 0; ix < nchi(); ++ix) {
710 710 GSkyPixel pixel = GSkyPixel(double(ix), double(iy));
711 711 m_dirs.push_back(m_map.pix2dir(pixel));
712   - m_omega.push_back(m_map.solidangle(pixel));
  712 + m_solidangle.push_back(m_map.solidangle(pixel));
713 713 }
714 714 }
715 715  
... ... @@ -808,7 +808,7 @@ void GCOMEventCube::set_times(void)
808 808 * @brief Initialise event bin
809 809 *
810 810 * This method initialises the event bin. The event bin is cleared and all
811   - * fixed pointers are set. Only the m_counts and the m_omega member of the
  811 + * fixed pointers are set. Only the m_counts and the m_solidangle member of the
812 812 * event bin will be set to NULL, but these will be set by the set_bin method
813 813 * which is called before any event bin access.
814 814 ***************************************************************************/
... ... @@ -816,13 +816,13 @@ void GCOMEventCube::init_bin(void)
816 816 {
817 817 // Prepare event bin
818 818 m_bin.free_members();
819   - m_bin.m_counts = NULL; //!< Will be set by set_bin method
820   - m_bin.m_dir = &m_dir; //!< Content will be set by set_bin method
821   - m_bin.m_omega = NULL; //!< Will be set by set_bin method
822   - m_bin.m_time = &m_time; //!< Fixed content
823   - m_bin.m_ontime = &m_ontime; //!< Fixed content
824   - m_bin.m_energy = &m_energy; //!< Fixed content
825   - m_bin.m_ewidth = &m_ewidth; //!< Fixed content
  819 + m_bin.m_counts = NULL; //!< Will be set by set_bin method
  820 + m_bin.m_dir = &m_dir; //!< Content will be set by set_bin method
  821 + m_bin.m_solidangle = NULL; //!< Will be set by set_bin method
  822 + m_bin.m_time = &m_time; //!< Fixed content
  823 + m_bin.m_ontime = &m_ontime; //!< Fixed content
  824 + m_bin.m_energy = &m_energy; //!< Fixed content
  825 + m_bin.m_ewidth = &m_ewidth; //!< Fixed content
826 826  
827 827 // Return
828 828 return;
... ... @@ -855,7 +855,7 @@ void GCOMEventCube::set_bin(const int&amp; index)
855 855 #endif
856 856  
857 857 // Check for the existence of sky directions and solid angles
858   - if (m_dirs.size() != npix() || m_omega.size() != npix()) {
  858 + if (m_dirs.size() != npix() || m_solidangle.size() != npix()) {
859 859 throw GCOMException::no_dirs(G_SET_BIN);
860 860 }
861 861  
... ... @@ -872,7 +872,7 @@ void GCOMEventCube::set_bin(const int&amp; index)
872 872  
873 873 // Set pointers
874 874 m_bin.m_counts = const_cast<double*>(&(m_map.pixels()[index]));
875   - m_bin.m_omega = &(m_omega[ipix]);
  875 + m_bin.m_solidangle = &(m_solidangle[ipix]);
876 876  
877 877 // Return
878 878 return;
... ...
inst/com/test/test_COM.cpp
... ... @@ -362,8 +362,8 @@ void TestGCOMObservation::test_event_bin(void)
362 362 std::string text = bin.print();
363 363 test_assert(text == "1", "Test print() method.");
364 364  
365   - // omega method
366   - test_value(bin.omega(), 0.0, 1.0e-10, "Test omega() method.");
  365 + // solidangle method
  366 + test_value(bin.solidangle(), 0.0, 1.0e-10, "Test solidangle() method.");
367 367  
368 368 // ewidth method
369 369 GEnergy ewidth = bin.ewidth();
... ...
inst/cta/include/GCTAEventBin.hpp
... ... @@ -91,7 +91,7 @@ protected:
91 91 GCTAInstDir* m_dir; //!< Pointer to bin direction
92 92 GTime* m_time; //!< Pointer to bin time
93 93 double* m_counts; //!< Pointer to number of counts
94   - double* m_omega; //!< Pointer to solid angle of pixel (sr)
  94 + double* m_solidangle; //!< Pointer to solid angle of pixel (sr)
95 95 GEnergy* m_ewidth; //!< Pointer to energy width of bin
96 96 double* m_ontime; //!< Pointer to ontime of bin (seconds)
97 97 };
... ...
inst/cta/include/GCTAEventCube.hpp
... ... @@ -103,7 +103,7 @@ protected:
103 103 GCTAEventBin m_bin; //!< Actual event bin
104 104 GTime m_time; //!< Event cube mean time
105 105 std::vector<GCTAInstDir> m_dirs; //!< Array of event directions
106   - std::vector<double> m_omega; //!< Array of solid angles (sr)
  106 + std::vector<double> m_solidangle; //!< Array of solid angles (sr)
107 107 std::vector<GEnergy> m_energies; //!< Array of log mean energies
108 108 std::vector<GEnergy> m_ewidth; //!< Array of energy bin widths
109 109 double m_ontime; //!< Event cube ontime (sec)
... ...
inst/cta/src/GCTAEventBin.cpp
... ... @@ -348,13 +348,13 @@ double GCTAEventBin::error(void) const
348 348 const double& GCTAEventBin::solidangle(void) const
349 349 {
350 350 // Throw an exception if solid angle pointer is not valid
351   - if (m_omega == NULL) {
  351 + if (m_solidangle == NULL) {
352 352 throw GCTAException::no_member(G_SOLIDANGLE,
353 353 "Invalid solid angle pointer.");
354 354 }
355 355  
356 356 // Return solid angle
357   - return *m_omega;
  357 + return *m_solidangle;
358 358 }
359 359  
360 360  
... ... @@ -440,13 +440,13 @@ std::string GCTAEventBin::print(const GChatter&amp; chatter) const
440 440 void GCTAEventBin::init_members(void)
441 441 {
442 442 // Initialise members
443   - m_energy = NULL;
444   - m_dir = NULL;
445   - m_time = NULL;
446   - m_counts = NULL;
447   - m_omega = NULL;
448   - m_ewidth = NULL;
449   - m_ontime = NULL;
  443 + m_energy = NULL;
  444 + m_dir = NULL;
  445 + m_time = NULL;
  446 + m_counts = NULL;
  447 + m_solidangle = NULL;
  448 + m_ewidth = NULL;
  449 + m_ontime = NULL;
450 450  
451 451 // Return
452 452 return;
... ... @@ -461,13 +461,13 @@ void GCTAEventBin::init_members(void)
461 461 void GCTAEventBin::copy_members(const GCTAEventBin& bin)
462 462 {
463 463 // Copy members
464   - m_energy = bin.m_energy;
465   - m_dir = bin.m_dir;
466   - m_time = bin.m_time;
467   - m_counts = bin.m_counts;
468   - m_omega = bin.m_omega;
469   - m_ewidth = bin.m_ewidth;
470   - m_ontime = bin.m_ontime;
  464 + m_energy = bin.m_energy;
  465 + m_dir = bin.m_dir;
  466 + m_time = bin.m_time;
  467 + m_counts = bin.m_counts;
  468 + m_solidangle = bin.m_solidangle;
  469 + m_ewidth = bin.m_ewidth;
  470 + m_ontime = bin.m_ontime;
471 471  
472 472 // Return
473 473 return;
... ...
inst/cta/src/GCTAEventCube.cpp
... ... @@ -528,7 +528,7 @@ void GCTAEventCube::init_members(void)
528 528 m_bin.clear();
529 529 m_time.clear();
530 530 m_dirs.clear();
531   - m_omega.clear();
  531 + m_solidangle.clear();
532 532 m_energies.clear();
533 533 m_ewidth.clear();
534 534 m_ontime = 0.0;
... ... @@ -546,14 +546,14 @@ void GCTAEventCube::init_members(void)
546 546 void GCTAEventCube::copy_members(const GCTAEventCube& cube)
547 547 {
548 548 // Copy members
549   - m_map = cube.m_map;
550   - m_bin = cube.m_bin;
551   - m_time = cube.m_time;
552   - m_dirs = cube.m_dirs;
553   - m_omega = cube.m_omega;
554   - m_energies = cube.m_energies;
555   - m_ewidth = cube.m_ewidth;
556   - m_ontime = cube.m_ontime;
  549 + m_map = cube.m_map;
  550 + m_bin = cube.m_bin;
  551 + m_time = cube.m_time;
  552 + m_dirs = cube.m_dirs;
  553 + m_solidangle = cube.m_solidangle;
  554 + m_energies = cube.m_energies;
  555 + m_ewidth = cube.m_ewidth;
  556 + m_ontime = cube.m_ontime;
557 557  
558 558 // Return
559 559 return;
... ... @@ -660,11 +660,11 @@ void GCTAEventCube::set_directions(void)
660 660  
661 661 // Clear old pixel directions and solid angle
662 662 m_dirs.clear();
663   - m_omega.clear();
  663 + m_solidangle.clear();
664 664  
665 665 // Reserve space for pixel directions and solid angles
666 666 m_dirs.reserve(npix());
667   - m_omega.reserve(npix());
  667 + m_solidangle.reserve(npix());
668 668  
669 669 // Set pixel directions and solid angles
670 670 for (int iy = 0; iy < ny(); ++iy) {
... ... @@ -672,11 +672,11 @@ void GCTAEventCube::set_directions(void)
672 672 try {
673 673 GSkyPixel pixel = GSkyPixel(double(ix), double(iy));
674 674 m_dirs.push_back(GCTAInstDir(m_map.pix2dir(pixel)));
675   - m_omega.push_back(m_map.solidangle(pixel));
  675 + m_solidangle.push_back(m_map.solidangle(pixel));
676 676 }
677 677 catch (GException::wcs_invalid_x_y& e) {
678 678 m_dirs.push_back(GCTAInstDir());
679   - m_omega.push_back(0.0);
  679 + m_solidangle.push_back(0.0);
680 680 }
681 681 }
682 682 }
... ... @@ -789,7 +789,7 @@ void GCTAEventCube::set_bin(const int&amp; index)
789 789 }
790 790  
791 791 // Check for the existence of sky directions and solid angles
792   - if (m_dirs.size() != npix() || m_omega.size() != npix()) {
  792 + if (m_dirs.size() != npix() || m_solidangle.size() != npix()) {
793 793 throw GCTAException::no_dirs(G_SET_BIN);
794 794 }
795 795  
... ... @@ -798,13 +798,13 @@ void GCTAEventCube::set_bin(const int&amp; index)
798 798 int ieng = index / npix();
799 799  
800 800 // Set pointers
801   - m_bin.m_counts = const_cast<double*>(&(m_map.pixels()[index]));
802   - m_bin.m_energy = &(m_energies[ieng]);
803   - m_bin.m_time = &m_time;
804   - m_bin.m_dir = &(m_dirs[ipix]);
805   - m_bin.m_omega = &(m_omega[ipix]);
806   - m_bin.m_ewidth = &(m_ewidth[ieng]);
807   - m_bin.m_ontime = &m_ontime;
  801 + m_bin.m_counts = const_cast<double*>(&(m_map.pixels()[index]));
  802 + m_bin.m_energy = &(m_energies[ieng]);
  803 + m_bin.m_time = &m_time;
  804 + m_bin.m_dir = &(m_dirs[ipix]);
  805 + m_bin.m_solidangle = &(m_solidangle[ipix]);
  806 + m_bin.m_ewidth = &(m_ewidth[ieng]);
  807 + m_bin.m_ontime = &m_ontime;
808 808  
809 809 // Return
810 810 return;
... ...
inst/lat/include/GLATEventBin.hpp
... ... @@ -73,7 +73,7 @@ public:
73 73 virtual std::string print(const GChatter& chatter = NORMAL) const;
74 74  
75 75 // Other methods
76   - const double& omega(void) const;
  76 + const double& solidangle(void) const;
77 77 const GEnergy& ewidth(void) const;
78 78 const double& ontime(void) const;
79 79 const int& index(void) const;
... ... @@ -96,7 +96,7 @@ protected:
96 96 GLATInstDir* m_dir; //!< Pointer to bin direction
97 97 GTime* m_time; //!< Pointer to bin time
98 98 double* m_counts; //!< Pointer to number of counts
99   - double* m_omega; //!< Pointer to solid angle of pixel (sr)
  99 + double* m_solidangle; //!< Pointer to solid angle of pixel (sr)
100 100 GEnergy* m_ewidth; //!< Pointer to energy width of bin
101 101 double* m_ontime; //!< Pointer to ontime of bin (seconds)
102 102 };
... ...
inst/lat/include/GLATEventCube.hpp
... ... @@ -112,7 +112,7 @@ protected:
112 112 GTime m_time; //!< Event cube mean time
113 113 double m_ontime; //!< Event cube ontime (sec)
114 114 std::vector<GLATInstDir> m_dirs; //!< Array of event directions
115   - std::vector<double> m_omega; //!< Array of solid angles (sr)
  115 + std::vector<double> m_solidangle; //!< Array of solid angles (sr)
116 116 std::vector<GEnergy> m_energies; //!< Array of log mean energies
117 117 std::vector<GEnergy> m_ewidth; //!< Array of energy bin widths
118 118 std::vector<GSkymap*> m_srcmap; //!< Pointers to source maps
... ...
inst/lat/pyext/GLATEventBin.i
... ... @@ -57,7 +57,7 @@ public:
57 57 virtual void counts(const double& counts);
58 58  
59 59 // Other methods
60   - const double& omega(void) const;
  60 + const double& solidangle(void) const;
61 61 const GEnergy& ewidth(void) const;
62 62 const double& ontime(void) const;
63 63 const int& index(void) const;
... ...
inst/lat/src/GLATEventBin.cpp
... ... @@ -40,7 +40,7 @@
40 40 #define G_TIME "GLATEventBin::time()"
41 41 #define G_COUNTS_GET "GLATEventBin::counts()"
42 42 #define G_COUNTS_SET "GLATEventBin::counts(double&)"
43   -#define G_OMEGA "GLATEventBin::omega()"
  43 +#define G_SOLIDANGLE "GLATEventBin::solidangle()"
44 44 #define G_EWIDTH "GLATEventBin::ewidth()"
45 45 #define G_ONTIME "GLATEventBin::ontime()"
46 46  
... ... @@ -189,7 +189,7 @@ GLATEventBin* GLATEventBin::clone(void) const
189 189 double GLATEventBin::size(void) const
190 190 {
191 191 // Compute bin size
192   - double size = omega() * ewidth().MeV() * ontime();
  192 + double size = solidangle() * ewidth().MeV() * ontime();
193 193  
194 194 // Return bin size
195 195 return size;
... ... @@ -347,16 +347,16 @@ double GLATEventBin::error(void) const
347 347 *
348 348 * Returns reference to the solid angle of the event bin.
349 349 ***************************************************************************/
350   -const double& GLATEventBin::omega(void) const
  350 +const double& GLATEventBin::solidangle(void) const
351 351 {
352 352 // Throw an exception if solid angle pointer is not valid
353   - if (m_omega == NULL) {
354   - throw GLATException::no_member(G_OMEGA,
  353 + if (m_solidangle == NULL) {
  354 + throw GLATException::no_member(G_SOLIDANGLE,
355 355 "Invalid solid angle pointer.");
356 356 }
357 357  
358 358 // Return solid angle
359   - return *m_omega;
  359 + return *m_solidangle;
360 360 }
361 361  
362 362  
... ... @@ -442,17 +442,17 @@ std::string GLATEventBin::print(const GChatter&amp; chatter) const
442 442 void GLATEventBin::init_members(void)
443 443 {
444 444 // Initialise members
445   - m_cube = NULL;
446   - m_index = -1;
447   - m_ipix = -1;
448   - m_ieng = -1;
449   - m_energy = NULL;
450   - m_dir = NULL;
451   - m_time = NULL;
452   - m_counts = NULL;
453   - m_omega = NULL;
454   - m_ewidth = NULL;
455   - m_ontime = NULL;
  445 + m_cube = NULL;
  446 + m_index = -1;
  447 + m_ipix = -1;
  448 + m_ieng = -1;
  449 + m_energy = NULL;
  450 + m_dir = NULL;
  451 + m_time = NULL;
  452 + m_counts = NULL;
  453 + m_solidangle = NULL;
  454 + m_ewidth = NULL;
  455 + m_ontime = NULL;
456 456  
457 457 // Return
458 458 return;
... ... @@ -467,17 +467,17 @@ void GLATEventBin::init_members(void)
467 467 void GLATEventBin::copy_members(const GLATEventBin& bin)
468 468 {
469 469 // Copy members
470   - m_cube = bin.m_cube;
471   - m_index = bin.m_index;
472   - m_ipix = bin.m_ipix;
473   - m_ieng = bin.m_ieng;
474   - m_energy = bin.m_energy;
475   - m_dir = bin.m_dir;
476   - m_time = bin.m_time;
477   - m_counts = bin.m_counts;
478   - m_omega = bin.m_omega;
479   - m_ewidth = bin.m_ewidth;
480   - m_ontime = bin.m_ontime;
  470 + m_cube = bin.m_cube;
  471 + m_index = bin.m_index;
  472 + m_ipix = bin.m_ipix;
  473 + m_ieng = bin.m_ieng;
  474 + m_energy = bin.m_energy;
  475 + m_dir = bin.m_dir;
  476 + m_time = bin.m_time;
  477 + m_counts = bin.m_counts;
  478 + m_solidangle = bin.m_solidangle;
  479 + m_ewidth = bin.m_ewidth;
  480 + m_ontime = bin.m_ontime;
481 481  
482 482 // Return
483 483 return;
... ...
inst/lat/src/GLATEventCube.cpp
... ... @@ -622,7 +622,7 @@ void GLATEventCube::init_members(void)
622 622 m_srcmap_names.clear();
623 623 m_enodes.clear();
624 624 m_dirs.clear();
625   - m_omega.clear();
  625 + m_solidangle.clear();
626 626 m_energies.clear();
627 627 m_ewidth.clear();
628 628 m_ontime = 0.0;
... ... @@ -646,7 +646,7 @@ void GLATEventCube::copy_members(const GLATEventCube&amp; cube)
646 646 m_ontime = cube.m_ontime;
647 647 m_enodes = cube.m_enodes;
648 648 m_dirs = cube.m_dirs;
649   - m_omega = cube.m_omega;
  649 + m_solidangle = cube.m_solidangle;
650 650 m_energies = cube.m_energies;
651 651 m_ewidth = cube.m_ewidth;
652 652  
... ... @@ -813,18 +813,18 @@ void GLATEventCube::set_directions(void)
813 813  
814 814 // Clear old pixel directions and solid angle
815 815 m_dirs.clear();
816   - m_omega.clear();
  816 + m_solidangle.clear();
817 817  
818 818 // Reserve space for pixel directions and solid angles
819 819 m_dirs.reserve(npix());
820   - m_omega.reserve(npix());
  820 + m_solidangle.reserve(npix());
821 821  
822 822 // Set pixel directions and solid angles
823 823 for (int iy = 0; iy < ny(); ++iy) {
824 824 for (int ix = 0; ix < nx(); ++ix) {
825 825 GSkyPixel pixel = GSkyPixel(double(ix), double(iy));
826 826 m_dirs.push_back(GLATInstDir(m_map.pix2dir(pixel)));
827   - m_omega.push_back(m_map.solidangle(pixel));
  827 + m_solidangle.push_back(m_map.solidangle(pixel));
828 828 }
829 829 }
830 830  
... ... @@ -939,7 +939,7 @@ void GLATEventCube::set_bin(const int&amp; index)
939 939 }
940 940  
941 941 // Check for the existence of sky directions and solid angles
942   - if (m_dirs.size() != npix() || m_omega.size() != npix()) {
  942 + if (m_dirs.size() != npix() || m_solidangle.size() != npix()) {
943 943 throw GLATException::no_dirs(G_SET_BIN);
944 944 }
945 945  
... ... @@ -949,14 +949,14 @@ void GLATEventCube::set_bin(const int&amp; index)
949 949 m_bin.m_ieng = index / npix();
950 950  
951 951 // Set pointers
952   - m_bin.m_cube = this;
953   - m_bin.m_counts = const_cast<double*>(&(m_map.pixels()[index]));
954   - m_bin.m_energy = &(m_energies[m_bin.m_ieng]);
955   - m_bin.m_time = &m_time;
956   - m_bin.m_dir = &(m_dirs[m_bin.m_ipix]);
957   - m_bin.m_omega = &(m_omega[m_bin.m_ipix]);
958   - m_bin.m_ewidth = &(m_ewidth[m_bin.m_ieng]);
959   - m_bin.m_ontime = &m_ontime;
  952 + m_bin.m_cube = this;
  953 + m_bin.m_counts = const_cast<double*>(&(m_map.pixels()[index]));
  954 + m_bin.m_energy = &(m_energies[m_bin.m_ieng]);
  955 + m_bin.m_time = &m_time;
  956 + m_bin.m_dir = &(m_dirs[m_bin.m_ipix]);
  957 + m_bin.m_solidangle = &(m_solidangle[m_bin.m_ipix]);
  958 + m_bin.m_ewidth = &(m_ewidth[m_bin.m_ieng]);
  959 + m_bin.m_ontime = &m_ontime;
960 960  
961 961 // Return
962 962 return;
... ...
inst/lat/src/GLATResponse.cpp
... ... @@ -410,7 +410,7 @@ double GLATResponse::irf(const GLATEventBin&amp; event,
410 410  
411 411 // Divide by solid angle and ontime since source maps are given in units of
412 412 // counts/pixel/MeV.
413   - rsp /= (event.omega() * event.ontime());
  413 + rsp /= (event.solidangle() * event.ontime());
414 414  
415 415 } // endelse: diffuse response was present
416 416  
... ...
src/sky/GHealpix.cpp
... ... @@ -122,7 +122,7 @@ GHealpix::GHealpix(const int&amp; nside,
122 122 m_num_pixels = 12 * m_npface;
123 123 m_fact2 = 4.0 / m_num_pixels;
124 124 m_fact1 = 2 * m_nside * m_fact2;
125   - m_omega = gammalib::fourpi / m_num_pixels;
  125 + m_solidangle = gammalib::fourpi / m_num_pixels;
126 126 m_order = nside2order(m_nside);
127 127  
128 128 // Return
... ... @@ -300,7 +300,7 @@ void GHealpix::read(const GFitsHDU&amp; hdu)
300 300 m_num_pixels = 12 * m_npface;
301 301 m_fact2 = 4.0 / m_num_pixels;
302 302 m_fact1 = 2 * m_nside * m_fact2;
303   - m_omega = gammalib::fourpi / m_num_pixels;
  303 + m_solidangle = gammalib::fourpi / m_num_pixels;
304 304 m_order = nside2order(m_nside);
305 305  
306 306 // Return
... ... @@ -516,7 +516,7 @@ std::string GHealpix::print(const GChatter&amp; chatter) const
516 516 result.append("\n"+gammalib::parformat("Order"));
517 517 result.append(gammalib::str(m_order));
518 518 result.append("\n"+gammalib::parformat("Solid angle per pixel"));
519   - result.append(gammalib::str(m_omega)+" sr");
  519 + result.append(gammalib::str(m_solidangle)+" sr");
520 520 result.append("\n"+gammalib::parformat("Ordering")+ordering());
521 521  
522 522 } // endif: chatter was not silent
... ... @@ -547,7 +547,7 @@ void GHealpix::init_members(void)
547 547 m_num_pixels = 0;
548 548 m_fact1 = 0.0;
549 549 m_fact2 = 0.0;
550   - m_omega = 0.0;
  550 + m_solidangle = 0.0;
551 551  
552 552 // Construct conversion arrays
553 553 for (int m = 0; m < 0x100; ++m) {
... ... @@ -580,7 +580,7 @@ void GHealpix::copy_members(const GHealpix&amp; proj)
580 580 m_num_pixels = proj.m_num_pixels;
581 581 m_fact1 = proj.m_fact1;
582 582 m_fact2 = proj.m_fact2;
583   - m_omega = proj.m_omega;
  583 + m_solidangle = proj.m_solidangle;
584 584  
585 585 // Return
586 586 return;
... ...
src/sky/GWcs.cpp
... ... @@ -452,10 +452,10 @@ double GWcs::solidangle(const GSkyPixel&amp; pixel) const
452 452 double h = dir5.dist(dir6);
453 453  
454 454 // Compute solid angle
455   - double omega = 0.5*(h*(a+b));
  455 + double solidangle = 0.5*(h*(a+b));
456 456  
457 457 // Return solid angle
458   - return omega;
  458 + return solidangle;
459 459 }
460 460  
461 461  
... ...