Commit 53b71616390e97174807cceb378c0a9949227dfb
1 parent
e7028dbb
Set reference time to CTA reference time in GCTAEventcube, GCTAEventList and GCT…
…ACubeExposure (#2295)
Showing
6 changed files
with
21 additions
and
10 deletions
ChangeLog
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | * Version 1.5.0 released |
| 4 | 4 | ========================= |
| 5 | 5 | |
| 6 | + Set reference time to CTA reference time in GCTAEventcube, GCTAEventList and GCTACubeExposure (#2295) | |
| 6 | 7 | Add GPha::counts_spectrum() and GPha::backscal_spectrum() methods (#2290) |
| 7 | 8 | Add GNdarray sign(), operator*= and operator/= (#2290) |
| 8 | 9 | Add GSkyMap::counts() and GSkyMap::flux() methods and clip() friend operator (#2290) | ... | ... |
NEWS
| ... | ... | @@ -243,6 +243,9 @@ also position fitting is now possible for Fermi-LAT (#604, #2183). |
| 243 | 243 | |
| 244 | 244 | 20. CTA interface |
| 245 | 245 | ----------------- |
| 246 | +Set the Good Time Interval time reference to the CTA time reference in | |
| 247 | +GCTAEventList, GCTAEventCube and GCTACubeExposure (#2295). | |
| 248 | + | |
| 246 | 249 | GCTAObservation and GCTAOnOffObservation handle statistic attribute in XML |
| 247 | 250 | file (#2238). |
| 248 | 251 | ... | ... |
doc/source/admin/release_history/1.5.rst
| ... | ... | @@ -30,6 +30,9 @@ Bug fixes |
| 30 | 30 | Improvements |
| 31 | 31 | ------------ |
| 32 | 32 | |
| 33 | +* [`2295 <https://cta-redmine.irap.omp.eu/issues/2295>`_] - | |
| 34 | + Set reference time to CTA reference time in ``GCTAEventcube``, ``GCTAEventList`` | |
| 35 | + and ``GCTACubeExposure`` | |
| 33 | 36 | * [`2290 <https://cta-redmine.irap.omp.eu/issues/2290>`_] - |
| 34 | 37 | Add ``GSkyMap::counts()`` and ``GSkyMap::flux()`` methods and ``clip()`` |
| 35 | 38 | friend operator, ``GNdarray`` ``sign()``, ``operator*=`` and ``operator/=``, | ... | ... |
inst/cta/src/GCTACubeExposure.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GCTACubeExposure.cpp - CTA cube analysis exposure class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2014-2017 by Chia-Chun Lu * | |
| 4 | + * copyright (C) 2014-2018 by Chia-Chun Lu * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -33,11 +33,7 @@ |
| 33 | 33 | #include "GLog.hpp" |
| 34 | 34 | #include "GObservations.hpp" |
| 35 | 35 | #include "GSkyRegionCircle.hpp" |
| 36 | -#include "GCTACubeExposure.hpp" | |
| 37 | -#include "GCTAObservation.hpp" | |
| 38 | -#include "GCTAResponseIrf.hpp" | |
| 39 | -#include "GCTAEventCube.hpp" | |
| 40 | -#include "GCTAEventList.hpp" | |
| 36 | +#include "GCTALib.hpp" | |
| 41 | 37 | |
| 42 | 38 | /* __ Method name definitions ____________________________________________ */ |
| 43 | 39 | #define G_FILL_CUBE "GCTACubeExposure::fill_cube(GCTAObservation&, GLog*)" |
| ... | ... | @@ -583,6 +579,9 @@ void GCTACubeExposure::init_members(void) |
| 583 | 579 | m_wgt_left = 0.0; |
| 584 | 580 | m_wgt_right = 0.0; |
| 585 | 581 | |
| 582 | + // Set CTA time reference for GTIs | |
| 583 | + m_gti.reference(GTimeReference(G_CTA_MJDREF, "s", "TT", "LOCAL")); | |
| 584 | + | |
| 586 | 585 | // Return |
| 587 | 586 | return; |
| 588 | 587 | } | ... | ... |
inst/cta/src/GCTAEventCube.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GCTAEventCube.cpp - CTA event bin container class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2017 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2018 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -30,8 +30,7 @@ |
| 30 | 30 | #endif |
| 31 | 31 | #include "GTools.hpp" |
| 32 | 32 | #include "GFits.hpp" |
| 33 | -#include "GCTAException.hpp" | |
| 34 | -#include "GCTAEventCube.hpp" | |
| 33 | +#include "GCTALib.hpp" | |
| 35 | 34 | |
| 36 | 35 | /* __ Method name definitions ____________________________________________ */ |
| 37 | 36 | #define G_NAXIS "GCTAEventCube::naxis(int)" |
| ... | ... | @@ -710,6 +709,9 @@ void GCTAEventCube::init_members(void) |
| 710 | 709 | // Prepare event bin |
| 711 | 710 | init_bin(); |
| 712 | 711 | |
| 712 | + // Set CTA time reference for GTIs | |
| 713 | + m_gti.reference(GTimeReference(G_CTA_MJDREF, "s", "TT", "LOCAL")); | |
| 714 | + | |
| 713 | 715 | // Return |
| 714 | 716 | return; |
| 715 | 717 | } | ... | ... |
inst/cta/src/GCTAEventList.cpp
| ... | ... | @@ -43,7 +43,7 @@ |
| 43 | 43 | #include "GFitsTableULongCol.hpp" |
| 44 | 44 | #include "GTime.hpp" |
| 45 | 45 | #include "GTimeReference.hpp" |
| 46 | -#include "GCTAEventList.hpp" | |
| 46 | +#include "GCTALib.hpp" | |
| 47 | 47 | #include "GCTASupport.hpp" |
| 48 | 48 | |
| 49 | 49 | /* __ Method name definitions ____________________________________________ */ |
| ... | ... | @@ -974,6 +974,9 @@ void GCTAEventList::init_members(void) |
| 974 | 974 | m_irf_names.clear(); |
| 975 | 975 | m_irf_values.clear(); |
| 976 | 976 | |
| 977 | + // Set CTA time reference for GTIs | |
| 978 | + m_gti.reference(GTimeReference(G_CTA_MJDREF, "s", "TT", "LOCAL")); | |
| 979 | + | |
| 977 | 980 | // Return |
| 978 | 981 | return; |
| 979 | 982 | } | ... | ... |