Commit 0636ae29fbe8a030b97584f9377e8005232db5cf

Authored by Jürgen Knödlseder
1 parent 1fbf6770

Remove GCOMSelection::zeta_min() and GCOMSelection::zeta_max() methods as those …

…were never used and always introduced confusion about the zetamin argument that is effectively used for Earth Horizon event selection.
ChangeLog
1 -2021-12-02 1 +2021-12-03
2 2
3 * Version 2.0.0 released 3 * Version 2.0.0 released
4 ======================== 4 ========================
5 5
  6 + Remove GCOMSelection::zeta_min() and GCOMSelection::zeta_max()
  7 + methods
6 Add GCOMSelection::fpmtflag(), GCOMSelection::use_d1() and 8 Add GCOMSelection::fpmtflag(), GCOMSelection::use_d1() and
7 GCOMSelection::use_d2() methods (#3917) 9 GCOMSelection::use_d2() methods (#3917)
8 Add GCOMModelDRBPhibarBins class (#3913) 10 Add GCOMModelDRBPhibarBins class (#3913)
1 New Features and Important Changes in GammaLib 2.0.0 1 New Features and Important Changes in GammaLib 2.0.0
2 2
3 -1 December 2021 3 +3 December 2021
4 4
5 5
6 1. Introduction 6 1. Introduction
@@ -128,6 +128,8 @@ The following methods have been removed: @@ -128,6 +128,8 @@ The following methods have been removed:
128 - GFitsTableCol::scale() 128 - GFitsTableCol::scale()
129 - GCOMObservation::drm(GModelSky&) 129 - GCOMObservation::drm(GModelSky&)
130 - GCOMResponse::irf_spatial() 130 - GCOMResponse::irf_spatial()
  131 +- GCOMSelection::zeta_min()
  132 +- GCOMSelection::zeta_max()
131 133
132 The following methods have been renamed: 134 The following methods have been renamed:
133 - none 135 - none
@@ -391,6 +393,11 @@ spatial model gradients (#3203). @@ -391,6 +393,11 @@ spatial model gradients (#3203).
391 393
392 22. COMPTEL interface 394 22. COMPTEL interface
393 --------------------- 395 ---------------------
  396 +Removed GCOMSelection::zeta_min() and GCOMSelection::zeta_max() since event-wise
  397 +zeta selection is actually not used and the zeta cut is applied using the minimum
  398 +value of the corresponding Phibar layer. Having this additional selection was always
  399 +a source of confusion.
  400 +
394 Added GCOMSelection::use_d1() and GCOMSelection::use_d2() methods to control the usage 401 Added GCOMSelection::use_d1() and GCOMSelection::use_d2() methods to control the usage
395 of D1 and D2 modules. The control logic was implemented in GCOMDri and header keywords 402 of D1 and D2 modules. The control logic was implemented in GCOMDri and header keywords
396 with per module information are now written into the DRE FITS files. A D1 and D2 403 with per module information are now written into the DRE FITS files. A D1 and D2
README.md
1 GammaLib information 1 GammaLib information
2 ==================== 2 ====================
3 -* Version: 2.0.0.dev (2 December 2021) 3 +* Version: 2.0.0.dev (3 December 2021)
4 4
5 [![Build Status](https://cta-jenkins.irap.omp.eu/buildStatus/icon?job=gammalib-integrate-os)](https://cta-jenkins.irap.omp.eu/job/gammalib-integrate-os/) 5 [![Build Status](https://cta-jenkins.irap.omp.eu/buildStatus/icon?job=gammalib-integrate-os)](https://cta-jenkins.irap.omp.eu/job/gammalib-integrate-os/)
6 6
doc/source/admin/release_history/2.0.rst
1 .. _2.0: 1 .. _2.0:
2 2
3 -GammaLib 2.0 release (2 December 2021) 3 +GammaLib 2.0 release (3 December 2021)
4 ====================================== 4 ======================================
5 5
6 Overview 6 Overview
@@ -130,6 +130,7 @@ New features @@ -130,6 +130,7 @@ New features
130 Clean up 130 Clean up
131 -------- 131 --------
132 132
  133 +* Remove ``GCOMSelection::zeta_min()`` and ``GCOMSelection::zeta_max()`` methods
133 * [`3560 <https://cta-redmine.irap.omp.eu/issues/3560>`_] - 134 * [`3560 <https://cta-redmine.irap.omp.eu/issues/3560>`_] -
134 Store DRB, DRG and DRX as instances of ``GCOMDri`` instead of ``GSkyMap`` in ``GCOMObservation`` 135 Store DRB, DRG and DRX as instances of ``GCOMDri`` instead of ``GSkyMap`` in ``GCOMObservation``
135 * [`2973 <https://cta-redmine.irap.omp.eu/issues/2973>`_] - 136 * [`2973 <https://cta-redmine.irap.omp.eu/issues/2973>`_] -
inst/com/include/GCOMSelection.hpp
@@ -83,10 +83,6 @@ public: @@ -83,10 +83,6 @@ public:
83 void psd_min(const int& psd_min); 83 void psd_min(const int& psd_min);
84 const int& psd_max(void) const; 84 const int& psd_max(void) const;
85 void psd_max(const int& psd_max); 85 void psd_max(const int& psd_max);
86 - const double& zeta_min(void) const;  
87 - void zeta_min(const double& zeta_min);  
88 - const double& zeta_max(void) const;  
89 - void zeta_max(const double& zeta_max);  
90 const int& reflag_min(void) const; 86 const int& reflag_min(void) const;
91 void reflag_min(const int& reflag_min); 87 void reflag_min(const int& reflag_min);
92 const int& reflag_max(void) const; 88 const int& reflag_max(void) const;
@@ -123,8 +119,6 @@ protected: @@ -123,8 +119,6 @@ protected:
123 int m_tof_max; //!< Maximum TOF window 119 int m_tof_max; //!< Maximum TOF window
124 int m_psd_min; //!< Minimum PSD window 120 int m_psd_min; //!< Minimum PSD window
125 int m_psd_max; //!< Maximum PSD window 121 int m_psd_max; //!< Maximum PSD window
126 - double m_zeta_min; //!< Minimum Earth horizon angle - Phibar window  
127 - double m_zeta_max; //!< Maximum Earth horizon angle - Phibar window  
128 int m_reflag_min; //!< Minimum rejection flag 122 int m_reflag_min; //!< Minimum rejection flag
129 int m_reflag_max; //!< Maximum rejection flag 123 int m_reflag_max; //!< Maximum rejection flag
130 int m_vetoflag_min; //!< Minimum veto flag 124 int m_vetoflag_min; //!< Minimum veto flag
@@ -149,8 +143,6 @@ protected: @@ -149,8 +143,6 @@ protected:
149 mutable int m_num_tof_max; //!< Number of events above TOF threshold 143 mutable int m_num_tof_max; //!< Number of events above TOF threshold
150 mutable int m_num_psd_min; //!< Number of events below PSD threshold 144 mutable int m_num_psd_min; //!< Number of events below PSD threshold
151 mutable int m_num_psd_max; //!< Number of events above PSD threshold 145 mutable int m_num_psd_max; //!< Number of events above PSD threshold
152 - mutable int m_num_zeta_min; //!< Number of events below Zeta threshold  
153 - mutable int m_num_zeta_max; //!< Number of events above Zeta threshold  
154 mutable int m_num_reflag_min; //!< Number of events below rejection flag threshold 146 mutable int m_num_reflag_min; //!< Number of events below rejection flag threshold
155 mutable int m_num_reflag_max; //!< Number of events above rejection flag threshold 147 mutable int m_num_reflag_max; //!< Number of events above rejection flag threshold
156 mutable int m_num_vetoflag_min; //!< Number of events below veto flag threshold 148 mutable int m_num_vetoflag_min; //!< Number of events below veto flag threshold
@@ -378,56 +370,6 @@ void GCOMSelection::psd_max(const int&amp; psd_max) @@ -378,56 +370,6 @@ void GCOMSelection::psd_max(const int&amp; psd_max)
378 370
379 371
380 /***********************************************************************//** 372 /***********************************************************************//**
381 - * @brief Return minimum of Earth horizon selection window  
382 - *  
383 - * @return Minimum of Earth horizon selection window.  
384 - ***************************************************************************/  
385 -inline  
386 -const double& GCOMSelection::zeta_min(void) const  
387 -{  
388 - return (m_zeta_min);  
389 -}  
390 -  
391 -  
392 -/***********************************************************************//**  
393 - * @brief Set minimum of Earth horizon selection window  
394 - *  
395 - * @param[in] zeta_min Minimum of Earth horizon selection window.  
396 - ***************************************************************************/  
397 -inline  
398 -void GCOMSelection::zeta_min(const double& zeta_min)  
399 -{  
400 - m_zeta_min = zeta_min;  
401 - return;  
402 -}  
403 -  
404 -  
405 -/***********************************************************************//**  
406 - * @brief Return maximum of Earth horizon selection window  
407 - *  
408 - * @return Maximum of Earth horizon selection window.  
409 - ***************************************************************************/  
410 -inline  
411 -const double& GCOMSelection::zeta_max(void) const  
412 -{  
413 - return (m_zeta_max);  
414 -}  
415 -  
416 -  
417 -/***********************************************************************//**  
418 - * @brief Set maximum of Earth horizon selection window  
419 - *  
420 - * @param[in] zeta_max Maximum of Earth horizon selection window.  
421 - ***************************************************************************/  
422 -inline  
423 -void GCOMSelection::zeta_max(const double& zeta_max)  
424 -{  
425 - m_zeta_max = zeta_max;  
426 - return;  
427 -}  
428 -  
429 -  
430 -/***********************************************************************//**  
431 * @brief Return minimum of Rejection Flag selection window 373 * @brief Return minimum of Rejection Flag selection window
432 * 374 *
433 * @return Minimum of Rejection Flag selection window. 375 * @return Minimum of Rejection Flag selection window.
inst/com/pyext/GCOMSelection.i
@@ -66,10 +66,6 @@ public: @@ -66,10 +66,6 @@ public:
66 void psd_min(const int& psd_min); 66 void psd_min(const int& psd_min);
67 const int& psd_max(void) const; 67 const int& psd_max(void) const;
68 void psd_max(const int& psd_max); 68 void psd_max(const int& psd_max);
69 - const double& zeta_min(void) const;  
70 - void zeta_min(const double& zeta_min);  
71 - const double& zeta_max(void) const;  
72 - void zeta_max(const double& zeta_max);  
73 const int& reflag_min(void) const; 69 const int& reflag_min(void) const;
74 void reflag_min(const int& reflag_min); 70 void reflag_min(const int& reflag_min);
75 const int& reflag_max(void) const; 71 const int& reflag_max(void) const;
inst/com/src/GCOMSelection.cpp
@@ -183,8 +183,6 @@ void GCOMSelection::init_statistics(void) const @@ -183,8 +183,6 @@ void GCOMSelection::init_statistics(void) const
183 m_num_tof_max = 0; 183 m_num_tof_max = 0;
184 m_num_psd_min = 0; 184 m_num_psd_min = 0;
185 m_num_psd_max = 0; 185 m_num_psd_max = 0;
186 - m_num_zeta_min = 0;  
187 - m_num_zeta_max = 0;  
188 m_num_reflag_min = 0; 186 m_num_reflag_min = 0;
189 m_num_reflag_max = 0; 187 m_num_reflag_max = 0;
190 m_num_vetoflag_min = 0; 188 m_num_vetoflag_min = 0;
@@ -225,9 +223,6 @@ bool GCOMSelection::use_event(const GCOMEventAtom&amp; event) const @@ -225,9 +223,6 @@ bool GCOMSelection::use_event(const GCOMEventAtom&amp; event) const
225 // Increment number of checked events 223 // Increment number of checked events
226 m_num_events_checked++; 224 m_num_events_checked++;
227 225
228 - // Compute zeta for event  
229 - double zeta = event.eha() - event.phibar();  
230 -  
231 // Check for bad minitelescopes 226 // Check for bad minitelescopes
232 if (event.modcom() < 1 || event.modcom() > 98) { 227 if (event.modcom() < 1 || event.modcom() > 98) {
233 m_num_invalid_modcom++; 228 m_num_invalid_modcom++;
@@ -274,14 +269,6 @@ bool GCOMSelection::use_event(const GCOMEventAtom&amp; event) const @@ -274,14 +269,6 @@ bool GCOMSelection::use_event(const GCOMEventAtom&amp; event) const
274 m_num_psd_max++; 269 m_num_psd_max++;
275 use = false; 270 use = false;
276 } 271 }
277 - else if (zeta < m_zeta_min) {  
278 - m_num_zeta_min++;  
279 - use = false;  
280 - }  
281 - else if (zeta > m_zeta_max) {  
282 - m_num_zeta_max++;  
283 - use = false;  
284 - }  
285 else if (event.reflag() < m_reflag_min) { 272 else if (event.reflag() < m_reflag_min) {
286 m_num_reflag_min++; 273 m_num_reflag_min++;
287 use = false; 274 use = false;
@@ -546,12 +533,6 @@ void GCOMSelection::read(const GFitsHDU&amp; hdu) @@ -546,12 +533,6 @@ void GCOMSelection::read(const GFitsHDU&amp; hdu)
546 m_psd_max = hdu.real("PSDMAX"); 533 m_psd_max = hdu.real("PSDMAX");
547 } 534 }
548 535
549 - // Read Earth horizon angle - Phibar selection  
550 - if (hdu.has_card("ZETMIN") && hdu.has_card("ZETMAX")) {  
551 - m_zeta_min = hdu.real("ZETMIN");  
552 - m_zeta_max = hdu.real("ZETMAX");  
553 - }  
554 -  
555 // Read rejection flag selection 536 // Read rejection flag selection
556 if (hdu.has_card("RFLMIN") && hdu.has_card("RFLMAX")) { 537 if (hdu.has_card("RFLMIN") && hdu.has_card("RFLMAX")) {
557 m_reflag_min = hdu.integer("RFLMIN"); 538 m_reflag_min = hdu.integer("RFLMIN");
@@ -615,10 +596,6 @@ void GCOMSelection::read(const GFitsHDU&amp; hdu) @@ -615,10 +596,6 @@ void GCOMSelection::read(const GFitsHDU&amp; hdu)
615 m_num_psd_min = hdu.integer("NPSDLO"); 596 m_num_psd_min = hdu.integer("NPSDLO");
616 m_num_psd_max = hdu.integer("NPSDHI"); 597 m_num_psd_max = hdu.integer("NPSDHI");
617 } 598 }
618 - if (hdu.has_card("NZETLO") && hdu.has_card("NZETHI")) {  
619 - m_num_zeta_min = hdu.integer("NZETLO");  
620 - m_num_zeta_max = hdu.integer("NZETHI");  
621 - }  
622 if (hdu.has_card("NRFLLO") && hdu.has_card("NRFLHI")) { 599 if (hdu.has_card("NRFLLO") && hdu.has_card("NRFLHI")) {
623 m_num_reflag_min = hdu.integer("NRFLLO"); 600 m_num_reflag_min = hdu.integer("NRFLLO");
624 m_num_reflag_max = hdu.integer("NRFLHI"); 601 m_num_reflag_max = hdu.integer("NRFLHI");
@@ -680,10 +657,6 @@ void GCOMSelection::write(GFitsHDU&amp; hdu) const @@ -680,10 +657,6 @@ void GCOMSelection::write(GFitsHDU&amp; hdu) const
680 hdu.card("PSDMIN", m_psd_min, "PSD selection minimum"); 657 hdu.card("PSDMIN", m_psd_min, "PSD selection minimum");
681 hdu.card("PSDMAX", m_psd_max, "PSD selection maximum"); 658 hdu.card("PSDMAX", m_psd_max, "PSD selection maximum");
682 659
683 - // Write Earth horizon angle - Phibar selection  
684 - hdu.card("ZETMIN", m_zeta_min, "[deg] Earth horizon angle - Phibar minimum");  
685 - hdu.card("ZETMAX", m_zeta_max, "[deg] Earth horizon angle - Phibar maximum");  
686 -  
687 // Write rejection flag selection 660 // Write rejection flag selection
688 hdu.card("RFLMIN", m_reflag_min, "Rejection flag minimum"); 661 hdu.card("RFLMIN", m_reflag_min, "Rejection flag minimum");
689 hdu.card("RFLMAX", m_reflag_max, "Rejection flag maximum"); 662 hdu.card("RFLMAX", m_reflag_max, "Rejection flag maximum");
@@ -725,8 +698,6 @@ void GCOMSelection::write(GFitsHDU&amp; hdu) const @@ -725,8 +698,6 @@ void GCOMSelection::write(GFitsHDU&amp; hdu) const
725 hdu.card("NTOFHI", m_num_tof_max, "Number of events > TOFMIN"); 698 hdu.card("NTOFHI", m_num_tof_max, "Number of events > TOFMIN");
726 hdu.card("NPSDLO", m_num_psd_min, "Number of events < PSDMIN"); 699 hdu.card("NPSDLO", m_num_psd_min, "Number of events < PSDMIN");
727 hdu.card("NPSDHI", m_num_psd_max, "Number of events > PSDMAX"); 700 hdu.card("NPSDHI", m_num_psd_max, "Number of events > PSDMAX");
728 - hdu.card("NZETLO", m_num_zeta_min, "Number of events < ZETMIN");  
729 - hdu.card("NZETHI", m_num_zeta_max, "Number of events > ZETMAX");  
730 hdu.card("NRFLLO", m_num_reflag_min, "Number of events < RFLMIN"); 701 hdu.card("NRFLLO", m_num_reflag_min, "Number of events < RFLMIN");
731 hdu.card("NRFLHI", m_num_reflag_max, "Number of events > RFLMAX"); 702 hdu.card("NRFLHI", m_num_reflag_max, "Number of events > RFLMAX");
732 hdu.card("NVFLLO", m_num_vetoflag_min, "Number of events < VFLMIN"); 703 hdu.card("NVFLLO", m_num_vetoflag_min, "Number of events < VFLMIN");
@@ -805,13 +776,6 @@ std::string GCOMSelection::print(const GChatter&amp; chatter) const @@ -805,13 +776,6 @@ std::string GCOMSelection::print(const GChatter&amp; chatter) const
805 result.append(gammalib::str(m_psd_max)+"] < "); 776 result.append(gammalib::str(m_psd_max)+"] < ");
806 result.append(gammalib::str(m_num_psd_max)); 777 result.append(gammalib::str(m_num_psd_max));
807 778
808 - // Append zeta angle selection statistics  
809 - result.append("\n"+gammalib::parformat("Zeta angle selection"));  
810 - result.append(gammalib::str(m_num_zeta_min)+" < [");  
811 - result.append(gammalib::str(m_zeta_min)+" - ");  
812 - result.append(gammalib::str(m_zeta_max)+" deg] < ");  
813 - result.append(gammalib::str(m_num_zeta_max));  
814 -  
815 // Append rejection flag selection statistics 779 // Append rejection flag selection statistics
816 result.append("\n"+gammalib::parformat("Rejection flag selection")); 780 result.append("\n"+gammalib::parformat("Rejection flag selection"));
817 result.append(gammalib::str(m_num_reflag_min)+" < ["); 781 result.append(gammalib::str(m_num_reflag_min)+" < [");
@@ -902,8 +866,6 @@ void GCOMSelection::init_members(void) @@ -902,8 +866,6 @@ void GCOMSelection::init_members(void)
902 m_tof_max = 130; //!< Maximum TOF window 866 m_tof_max = 130; //!< Maximum TOF window
903 m_psd_min = 0; //!< Minimum PSD window 867 m_psd_min = 0; //!< Minimum PSD window
904 m_psd_max = 110; //!< Maximum PSD window 868 m_psd_max = 110; //!< Maximum PSD window
905 - m_zeta_min = 0.0; //!< Minimum Earth horizon angle - Phibar window  
906 - m_zeta_max = 180.0; //!< Maximum Earth horizon angle - Phibar window  
907 m_reflag_min = 1; //!< Minimum rejection flag 869 m_reflag_min = 1; //!< Minimum rejection flag
908 m_reflag_max = 1000; //!< Maximum rejection flag 870 m_reflag_max = 1000; //!< Maximum rejection flag
909 m_vetoflag_min = 0; //!< Minimum veto flag 871 m_vetoflag_min = 0; //!< Minimum veto flag
@@ -942,8 +904,6 @@ void GCOMSelection::copy_members(const GCOMSelection&amp; select) @@ -942,8 +904,6 @@ void GCOMSelection::copy_members(const GCOMSelection&amp; select)
942 m_tof_max = select.m_tof_max; 904 m_tof_max = select.m_tof_max;
943 m_psd_min = select.m_psd_min; 905 m_psd_min = select.m_psd_min;
944 m_psd_max = select.m_psd_max; 906 m_psd_max = select.m_psd_max;
945 - m_zeta_min = select.m_zeta_min;  
946 - m_zeta_max = select.m_zeta_max;  
947 m_reflag_min = select.m_reflag_min; 907 m_reflag_min = select.m_reflag_min;
948 m_reflag_max = select.m_reflag_max; 908 m_reflag_max = select.m_reflag_max;
949 m_vetoflag_min = select.m_vetoflag_min; 909 m_vetoflag_min = select.m_vetoflag_min;
@@ -970,8 +930,6 @@ void GCOMSelection::copy_members(const GCOMSelection&amp; select) @@ -970,8 +930,6 @@ void GCOMSelection::copy_members(const GCOMSelection&amp; select)
970 m_num_tof_max = select.m_num_tof_max; 930 m_num_tof_max = select.m_num_tof_max;
971 m_num_psd_min = select.m_num_psd_min; 931 m_num_psd_min = select.m_num_psd_min;
972 m_num_psd_max = select.m_num_psd_max; 932 m_num_psd_max = select.m_num_psd_max;
973 - m_num_zeta_min = select.m_num_zeta_min;  
974 - m_num_zeta_max = select.m_num_zeta_max;  
975 m_num_reflag_min = select.m_num_reflag_min; 933 m_num_reflag_min = select.m_num_reflag_min;
976 m_num_reflag_max = select.m_num_reflag_max; 934 m_num_reflag_max = select.m_num_reflag_max;
977 m_num_vetoflag_min = select.m_num_vetoflag_min; 935 m_num_vetoflag_min = select.m_num_vetoflag_min;