Commit 0636ae29fbe8a030b97584f9377e8005232db5cf
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.
Showing
7 changed files
with
14 additions
and
108 deletions
ChangeLog
| 1 | -2021-12-02 | |
| 1 | +2021-12-03 | |
| 2 | 2 | |
| 3 | 3 | * Version 2.0.0 released |
| 4 | 4 | ======================== |
| 5 | 5 | |
| 6 | + Remove GCOMSelection::zeta_min() and GCOMSelection::zeta_max() | |
| 7 | + methods | |
| 6 | 8 | Add GCOMSelection::fpmtflag(), GCOMSelection::use_d1() and |
| 7 | 9 | GCOMSelection::use_d2() methods (#3917) |
| 8 | 10 | Add GCOMModelDRBPhibarBins class (#3913) | ... | ... |
NEWS
| 1 | 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 | 6 | 1. Introduction |
| ... | ... | @@ -128,6 +128,8 @@ The following methods have been removed: |
| 128 | 128 | - GFitsTableCol::scale() |
| 129 | 129 | - GCOMObservation::drm(GModelSky&) |
| 130 | 130 | - GCOMResponse::irf_spatial() |
| 131 | +- GCOMSelection::zeta_min() | |
| 132 | +- GCOMSelection::zeta_max() | |
| 131 | 133 | |
| 132 | 134 | The following methods have been renamed: |
| 133 | 135 | - none |
| ... | ... | @@ -391,6 +393,11 @@ spatial model gradients (#3203). |
| 391 | 393 | |
| 392 | 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 | 401 | Added GCOMSelection::use_d1() and GCOMSelection::use_d2() methods to control the usage |
| 395 | 402 | of D1 and D2 modules. The control logic was implemented in GCOMDri and header keywords |
| 396 | 403 | with per module information are now written into the DRE FITS files. A D1 and D2 | ... | ... |
README.md
| 1 | 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 | 5 | [](https://cta-jenkins.irap.omp.eu/job/gammalib-integrate-os/) |
| 6 | 6 | ... | ... |
doc/source/admin/release_history/2.0.rst
| 1 | 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 | 6 | Overview |
| ... | ... | @@ -130,6 +130,7 @@ New features |
| 130 | 130 | Clean up |
| 131 | 131 | -------- |
| 132 | 132 | |
| 133 | +* Remove ``GCOMSelection::zeta_min()`` and ``GCOMSelection::zeta_max()`` methods | |
| 133 | 134 | * [`3560 <https://cta-redmine.irap.omp.eu/issues/3560>`_] - |
| 134 | 135 | Store DRB, DRG and DRX as instances of ``GCOMDri`` instead of ``GSkyMap`` in ``GCOMObservation`` |
| 135 | 136 | * [`2973 <https://cta-redmine.irap.omp.eu/issues/2973>`_] - | ... | ... |
inst/com/include/GCOMSelection.hpp
| ... | ... | @@ -83,10 +83,6 @@ public: |
| 83 | 83 | void psd_min(const int& psd_min); |
| 84 | 84 | const int& psd_max(void) const; |
| 85 | 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 | 86 | const int& reflag_min(void) const; |
| 91 | 87 | void reflag_min(const int& reflag_min); |
| 92 | 88 | const int& reflag_max(void) const; |
| ... | ... | @@ -123,8 +119,6 @@ protected: |
| 123 | 119 | int m_tof_max; //!< Maximum TOF window |
| 124 | 120 | int m_psd_min; //!< Minimum PSD window |
| 125 | 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 | 122 | int m_reflag_min; //!< Minimum rejection flag |
| 129 | 123 | int m_reflag_max; //!< Maximum rejection flag |
| 130 | 124 | int m_vetoflag_min; //!< Minimum veto flag |
| ... | ... | @@ -149,8 +143,6 @@ protected: |
| 149 | 143 | mutable int m_num_tof_max; //!< Number of events above TOF threshold |
| 150 | 144 | mutable int m_num_psd_min; //!< Number of events below PSD threshold |
| 151 | 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 | 146 | mutable int m_num_reflag_min; //!< Number of events below rejection flag threshold |
| 155 | 147 | mutable int m_num_reflag_max; //!< Number of events above rejection flag threshold |
| 156 | 148 | mutable int m_num_vetoflag_min; //!< Number of events below veto flag threshold |
| ... | ... | @@ -378,56 +370,6 @@ void GCOMSelection::psd_max(const int& 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 | 373 | * @brief Return minimum of Rejection Flag selection window |
| 432 | 374 | * |
| 433 | 375 | * @return Minimum of Rejection Flag selection window. | ... | ... |
inst/com/pyext/GCOMSelection.i
| ... | ... | @@ -66,10 +66,6 @@ public: |
| 66 | 66 | void psd_min(const int& psd_min); |
| 67 | 67 | const int& psd_max(void) const; |
| 68 | 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 | 69 | const int& reflag_min(void) const; |
| 74 | 70 | void reflag_min(const int& reflag_min); |
| 75 | 71 | const int& reflag_max(void) const; | ... | ... |
inst/com/src/GCOMSelection.cpp
| ... | ... | @@ -183,8 +183,6 @@ void GCOMSelection::init_statistics(void) const |
| 183 | 183 | m_num_tof_max = 0; |
| 184 | 184 | m_num_psd_min = 0; |
| 185 | 185 | m_num_psd_max = 0; |
| 186 | - m_num_zeta_min = 0; | |
| 187 | - m_num_zeta_max = 0; | |
| 188 | 186 | m_num_reflag_min = 0; |
| 189 | 187 | m_num_reflag_max = 0; |
| 190 | 188 | m_num_vetoflag_min = 0; |
| ... | ... | @@ -225,9 +223,6 @@ bool GCOMSelection::use_event(const GCOMEventAtom& event) const |
| 225 | 223 | // Increment number of checked events |
| 226 | 224 | m_num_events_checked++; |
| 227 | 225 | |
| 228 | - // Compute zeta for event | |
| 229 | - double zeta = event.eha() - event.phibar(); | |
| 230 | - | |
| 231 | 226 | // Check for bad minitelescopes |
| 232 | 227 | if (event.modcom() < 1 || event.modcom() > 98) { |
| 233 | 228 | m_num_invalid_modcom++; |
| ... | ... | @@ -274,14 +269,6 @@ bool GCOMSelection::use_event(const GCOMEventAtom& event) const |
| 274 | 269 | m_num_psd_max++; |
| 275 | 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 | 272 | else if (event.reflag() < m_reflag_min) { |
| 286 | 273 | m_num_reflag_min++; |
| 287 | 274 | use = false; |
| ... | ... | @@ -546,12 +533,6 @@ void GCOMSelection::read(const GFitsHDU& hdu) |
| 546 | 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 | 536 | // Read rejection flag selection |
| 556 | 537 | if (hdu.has_card("RFLMIN") && hdu.has_card("RFLMAX")) { |
| 557 | 538 | m_reflag_min = hdu.integer("RFLMIN"); |
| ... | ... | @@ -615,10 +596,6 @@ void GCOMSelection::read(const GFitsHDU& hdu) |
| 615 | 596 | m_num_psd_min = hdu.integer("NPSDLO"); |
| 616 | 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 | 599 | if (hdu.has_card("NRFLLO") && hdu.has_card("NRFLHI")) { |
| 623 | 600 | m_num_reflag_min = hdu.integer("NRFLLO"); |
| 624 | 601 | m_num_reflag_max = hdu.integer("NRFLHI"); |
| ... | ... | @@ -680,10 +657,6 @@ void GCOMSelection::write(GFitsHDU& hdu) const |
| 680 | 657 | hdu.card("PSDMIN", m_psd_min, "PSD selection minimum"); |
| 681 | 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 | 660 | // Write rejection flag selection |
| 688 | 661 | hdu.card("RFLMIN", m_reflag_min, "Rejection flag minimum"); |
| 689 | 662 | hdu.card("RFLMAX", m_reflag_max, "Rejection flag maximum"); |
| ... | ... | @@ -725,8 +698,6 @@ void GCOMSelection::write(GFitsHDU& hdu) const |
| 725 | 698 | hdu.card("NTOFHI", m_num_tof_max, "Number of events > TOFMIN"); |
| 726 | 699 | hdu.card("NPSDLO", m_num_psd_min, "Number of events < PSDMIN"); |
| 727 | 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 | 701 | hdu.card("NRFLLO", m_num_reflag_min, "Number of events < RFLMIN"); |
| 731 | 702 | hdu.card("NRFLHI", m_num_reflag_max, "Number of events > RFLMAX"); |
| 732 | 703 | hdu.card("NVFLLO", m_num_vetoflag_min, "Number of events < VFLMIN"); |
| ... | ... | @@ -805,13 +776,6 @@ std::string GCOMSelection::print(const GChatter& chatter) const |
| 805 | 776 | result.append(gammalib::str(m_psd_max)+"] < "); |
| 806 | 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 | 779 | // Append rejection flag selection statistics |
| 816 | 780 | result.append("\n"+gammalib::parformat("Rejection flag selection")); |
| 817 | 781 | result.append(gammalib::str(m_num_reflag_min)+" < ["); |
| ... | ... | @@ -902,8 +866,6 @@ void GCOMSelection::init_members(void) |
| 902 | 866 | m_tof_max = 130; //!< Maximum TOF window |
| 903 | 867 | m_psd_min = 0; //!< Minimum PSD window |
| 904 | 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 | 869 | m_reflag_min = 1; //!< Minimum rejection flag |
| 908 | 870 | m_reflag_max = 1000; //!< Maximum rejection flag |
| 909 | 871 | m_vetoflag_min = 0; //!< Minimum veto flag |
| ... | ... | @@ -942,8 +904,6 @@ void GCOMSelection::copy_members(const GCOMSelection& select) |
| 942 | 904 | m_tof_max = select.m_tof_max; |
| 943 | 905 | m_psd_min = select.m_psd_min; |
| 944 | 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 | 907 | m_reflag_min = select.m_reflag_min; |
| 948 | 908 | m_reflag_max = select.m_reflag_max; |
| 949 | 909 | m_vetoflag_min = select.m_vetoflag_min; |
| ... | ... | @@ -970,8 +930,6 @@ void GCOMSelection::copy_members(const GCOMSelection& select) |
| 970 | 930 | m_num_tof_max = select.m_num_tof_max; |
| 971 | 931 | m_num_psd_min = select.m_num_psd_min; |
| 972 | 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 | 933 | m_num_reflag_min = select.m_num_reflag_min; |
| 976 | 934 | m_num_reflag_max = select.m_num_reflag_max; |
| 977 | 935 | m_num_vetoflag_min = select.m_num_vetoflag_min; | ... | ... |