Commit 58e558e8e157f388e999db1741263c87521862c7
1 parent
84069396
Add CTA time reference.
Showing
2 changed files
with
12 additions
and
3 deletions
src/ctobssim/ctobssim.cpp
| ... | ... | @@ -536,9 +536,11 @@ void ctobssim::set_list(GCTAObservation* obs) |
| 536 | 536 | roi.radius(m_rad); |
| 537 | 537 | |
| 538 | 538 | // Set GTI |
| 539 | - GGti gti; | |
| 540 | - GTime tstart(m_tmin); | |
| 541 | - GTime tstop(m_tmax); | |
| 539 | + GGti gti(m_cta_ref); | |
| 540 | + GTime tstart; | |
| 541 | + GTime tstop; | |
| 542 | + tstart.set(m_tmin, m_cta_ref); | |
| 543 | + tstop.set(m_tmax, m_cta_ref); | |
| 542 | 544 | gti.append(tstart, tstop); |
| 543 | 545 | |
| 544 | 546 | // Set energy boundaries |
| ... | ... | @@ -927,6 +929,11 @@ void ctobssim::init_members(void) |
| 927 | 929 | m_area = 19634954.0 * 1.0e4; //!< pi*(2500^2) m^2 |
| 928 | 930 | m_time_max.secs(1800.0); //!< Maximum length of time slice (s) |
| 929 | 931 | |
| 932 | + // Set CTA time reference. G_CTA_MJDREF is the CTA reference MJD, | |
| 933 | + // which is defined in GCTALib.hpp. This is somehow a kluge. We need | |
| 934 | + // a better mechanism to implement the CTA reference MJD. | |
| 935 | + m_cta_ref.set(G_CTA_MJDREF, "s", "TT", "LOCAL"); | |
| 936 | + | |
| 930 | 937 | // Set logger properties |
| 931 | 938 | log.date(true); |
| 932 | 939 | |
| ... | ... | @@ -965,6 +972,7 @@ void ctobssim::copy_members(const ctobssim& app) |
| 965 | 972 | m_obs = app.m_obs; |
| 966 | 973 | m_use_xml = app.m_use_xml; |
| 967 | 974 | m_read_ahead = app.m_read_ahead; |
| 975 | + m_cta_ref = app.m_cta_ref; | |
| 968 | 976 | |
| 969 | 977 | // Return |
| 970 | 978 | return; | ... | ... |
src/ctobssim/ctobssim.hpp
| ... | ... | @@ -101,6 +101,7 @@ protected: |
| 101 | 101 | GObservations m_obs; //!< Observation container |
| 102 | 102 | bool m_use_xml; //!< Use XML file instead of FITS file |
| 103 | 103 | bool m_read_ahead; //!< Read ahead parameters |
| 104 | + GTimeReference m_cta_ref; //!< CTA time reference | |
| 104 | 105 | }; |
| 105 | 106 | |
| 106 | 107 | #endif /* CTOBSSIM_HPP */ | ... | ... |