Commit 53b71616390e97174807cceb378c0a9949227dfb

Authored by Jürgen Knödlseder
1 parent e7028dbb

Set reference time to CTA reference time in GCTAEventcube, GCTAEventList and GCT…

…ACubeExposure (#2295)
ChangeLog
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 * Version 1.5.0 released 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 Add GPha::counts_spectrum() and GPha::backscal_spectrum() methods (#2290) 7 Add GPha::counts_spectrum() and GPha::backscal_spectrum() methods (#2290)
7 Add GNdarray sign(), operator*= and operator/= (#2290) 8 Add GNdarray sign(), operator*= and operator/= (#2290)
8 Add GSkyMap::counts() and GSkyMap::flux() methods and clip() friend operator (#2290) 9 Add GSkyMap::counts() and GSkyMap::flux() methods and clip() friend operator (#2290)
@@ -243,6 +243,9 @@ also position fitting is now possible for Fermi-LAT (#604, #2183). @@ -243,6 +243,9 @@ also position fitting is now possible for Fermi-LAT (#604, #2183).
243 243
244 20. CTA interface 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 GCTAObservation and GCTAOnOffObservation handle statistic attribute in XML 249 GCTAObservation and GCTAOnOffObservation handle statistic attribute in XML
247 file (#2238). 250 file (#2238).
248 251
doc/source/admin/release_history/1.5.rst
@@ -30,6 +30,9 @@ Bug fixes @@ -30,6 +30,9 @@ Bug fixes
30 Improvements 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 * [`2290 <https://cta-redmine.irap.omp.eu/issues/2290>`_] - 36 * [`2290 <https://cta-redmine.irap.omp.eu/issues/2290>`_] -
34 Add ``GSkyMap::counts()`` and ``GSkyMap::flux()`` methods and ``clip()`` 37 Add ``GSkyMap::counts()`` and ``GSkyMap::flux()`` methods and ``clip()``
35 friend operator, ``GNdarray`` ``sign()``, ``operator*=`` and ``operator/=``, 38 friend operator, ``GNdarray`` ``sign()``, ``operator*=`` and ``operator/=``,
inst/cta/src/GCTACubeExposure.cpp
1 /*************************************************************************** 1 /***************************************************************************
2 * GCTACubeExposure.cpp - CTA cube analysis exposure class * 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 * 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 *
@@ -33,11 +33,7 @@ @@ -33,11 +33,7 @@
33 #include "GLog.hpp" 33 #include "GLog.hpp"
34 #include "GObservations.hpp" 34 #include "GObservations.hpp"
35 #include "GSkyRegionCircle.hpp" 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 /* __ Method name definitions ____________________________________________ */ 38 /* __ Method name definitions ____________________________________________ */
43 #define G_FILL_CUBE "GCTACubeExposure::fill_cube(GCTAObservation&, GLog*)" 39 #define G_FILL_CUBE "GCTACubeExposure::fill_cube(GCTAObservation&, GLog*)"
@@ -583,6 +579,9 @@ void GCTACubeExposure::init_members(void) @@ -583,6 +579,9 @@ void GCTACubeExposure::init_members(void)
583 m_wgt_left = 0.0; 579 m_wgt_left = 0.0;
584 m_wgt_right = 0.0; 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 // Return 585 // Return
587 return; 586 return;
588 } 587 }
inst/cta/src/GCTAEventCube.cpp
1 /*************************************************************************** 1 /***************************************************************************
2 * GCTAEventCube.cpp - CTA event bin container class * 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 * 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 *
@@ -30,8 +30,7 @@ @@ -30,8 +30,7 @@
30 #endif 30 #endif
31 #include "GTools.hpp" 31 #include "GTools.hpp"
32 #include "GFits.hpp" 32 #include "GFits.hpp"
33 -#include "GCTAException.hpp"  
34 -#include "GCTAEventCube.hpp" 33 +#include "GCTALib.hpp"
35 34
36 /* __ Method name definitions ____________________________________________ */ 35 /* __ Method name definitions ____________________________________________ */
37 #define G_NAXIS "GCTAEventCube::naxis(int)" 36 #define G_NAXIS "GCTAEventCube::naxis(int)"
@@ -710,6 +709,9 @@ void GCTAEventCube::init_members(void) @@ -710,6 +709,9 @@ void GCTAEventCube::init_members(void)
710 // Prepare event bin 709 // Prepare event bin
711 init_bin(); 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 // Return 715 // Return
714 return; 716 return;
715 } 717 }
inst/cta/src/GCTAEventList.cpp
@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 #include "GFitsTableULongCol.hpp" 43 #include "GFitsTableULongCol.hpp"
44 #include "GTime.hpp" 44 #include "GTime.hpp"
45 #include "GTimeReference.hpp" 45 #include "GTimeReference.hpp"
46 -#include "GCTAEventList.hpp" 46 +#include "GCTALib.hpp"
47 #include "GCTASupport.hpp" 47 #include "GCTASupport.hpp"
48 48
49 /* __ Method name definitions ____________________________________________ */ 49 /* __ Method name definitions ____________________________________________ */
@@ -974,6 +974,9 @@ void GCTAEventList::init_members(void) @@ -974,6 +974,9 @@ void GCTAEventList::init_members(void)
974 m_irf_names.clear(); 974 m_irf_names.clear();
975 m_irf_values.clear(); 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 // Return 980 // Return
978 return; 981 return;
979 } 982 }