Commit 0bb6c9ac48a06849bb2a4e0300632c6e5134a755

Authored by Jürgen Knödlseder
2 parents caae47aa 606ee413

Merge branch '1982-add-phase-info' into integration

ChangeLog
... ... @@ -3,6 +3,7 @@
3 3 * Version 1.3.0 released
4 4 =========================
5 5  
  6 + Add GEventList::has_phase() and GEventList::has_detxy() methods (#1982)
6 7 Add GEventList::append_column() method (#1991)
7 8 Add scalar addition and subtraction operators to matrix classes (#1990)
8 9 Allow fitting of scale parameter in composite models (#1992)
... ...
... ... @@ -48,6 +48,10 @@ The following methods have been added:
48 48 - GCTAAeffArf::ebounds()
49 49 - GCTAAeffPerfTable::ebounds()
50 50 - GCTAEventList::append_column(GFitsTableCol&)
  51 +- GCTAEventList::has_phase(bool&)
  52 +- GCTAEventList::has_phase()
  53 +- GCTAEventList::has_detxy(bool&)
  54 +- GCTAEventList::has_detxy()
51 55  
52 56 The following methods have been removed:
53 57 - ...
... ... @@ -218,6 +222,9 @@ FITS columns to an event list. The method checks whether the length of the
218 222 FITS column is compatible with the number of events that are present in the
219 223 event list (#1991).
220 224  
  225 +Add GCTAEventList::has_phase() and GCTAEventList::has_detxy() getter and setter
  226 +methods to manipulate the event list information flags (#1982).
  227 +
221 228  
222 229 21. COMPTEL interface
223 230 ---------------------
... ...
inst/cta/include/GCTAEventList.hpp
... ... @@ -97,7 +97,11 @@ public:
97 97 void irf_cache(const std::string& name, const int& index,
98 98 const double& irf) const;
99 99 const std::string& gtiname(void) const;
100   -
  100 + void has_phase(const bool& has_phase);
  101 + void has_detxy(const bool& has_detxy);
  102 + const bool& has_phase() const;
  103 + const bool& has_detxy() const;
  104 +
101 105 protected:
102 106 // Protected methods
103 107 void init_members(void);
... ... @@ -204,4 +208,58 @@ const std::string& GCTAEventList::gtiname(void) const
204 208 return (m_gti_extname);
205 209 }
206 210  
  211 +
  212 +/***********************************************************************//**
  213 + * @brief Set phase information flag
  214 + *
  215 + * @param[in] has_phase Phase information flag.
  216 + *
  217 + * Sets the phase information flag of the event list.
  218 + ***************************************************************************/
  219 +inline
  220 +void GCTAEventList::has_phase(const bool& has_phase)
  221 +{
  222 + m_has_phase = has_phase;
  223 + return;
  224 +}
  225 +
  226 +
  227 +/***********************************************************************//**
  228 + * @brief Set the DETX/DETY information flag
  229 + *
  230 + * @param[in] has_detxy DETX/DETY information flag.
  231 + *
  232 + * Set the DETX/DETY information flag.
  233 + ***************************************************************************/
  234 +inline
  235 +void GCTAEventList::has_detxy(const bool& has_detxy)
  236 +{
  237 + m_has_detxy = has_detxy;
  238 + return;
  239 +}
  240 +
  241 +
  242 +/*************************************************************************
  243 + * @brief Return phase information flag
  244 + *
  245 + * @return True if phase information is available, false otherwise.
  246 + ***************************************************************************/
  247 +inline
  248 +const bool& GCTAEventList::has_phase() const
  249 +{
  250 + return m_has_phase;
  251 +}
  252 +
  253 +
  254 +/*************************************************************************
  255 + * @brief Return DETX/DETY information flag
  256 + *
  257 + * @return True if DETX/DETY information is available, false otherwise.
  258 + ***************************************************************************/
  259 +inline
  260 +const bool& GCTAEventList::has_detxy() const
  261 +{
  262 + return m_has_detxy;
  263 +}
  264 +
207 265 #endif /* GCTAEVENTLIST_HPP */
... ...
inst/cta/pyext/GCTAEventList.i
... ... @@ -70,6 +70,10 @@ public:
70 70 void irf_cache(const std::string& name, const int& index,
71 71 const double& irf) const;
72 72 const std::string& gtiname(void) const;
  73 + void has_phase(const bool& has_phase);
  74 + void has_detxy(const bool& has_detxy);
  75 + const bool& has_phase() const;
  76 + const bool& has_detxy() const;
73 77 };
74 78  
75 79  
... ...
src/model/GModelTemporalPhaseCurve.cpp
... ... @@ -342,7 +342,7 @@ GTimes GModelTemporalPhaseCurve::mc(const double& rate, const GTime& tmin,
342 342 * Reads the temporal information from an XML element. The XML element should
343 343 * have the format
344 344 *
345   - * <temporalModel type="PhaseCurve" file="..">
  345 + * <temporalModel type="PhaseCurve" file="phase.fits">
346 346 * <parameter name="Normalization" scale="1" value="1" min="0.1" max="10" free="0"/>
347 347 * <parameter name="MJD" scale="1" value="51544.5" min="0.0" max="1e10" free="0"/>
348 348 * <parameter name="Phase" scale="1" value="0.0" min="0.0" max="1e10" free="1"/>
... ... @@ -388,7 +388,7 @@ void GModelTemporalPhaseCurve::read(const GXmlElement&amp; xml)
388 388 * Writes the temporal information into an XML element. The XML element will
389 389 * have the format
390 390 *
391   - * <temporalModel type="PhaseCurve" file="..">
  391 + * <temporalModel type="PhaseCurve" file="phase.fits">
392 392 * <parameter name="Normalization" scale="1" value="1" min="0.1" max="10" free="0"/>
393 393 * <parameter name="MJD" scale="1" value="51544.5" min="0.0" max="1e10" free="0"/>
394 394 * <parameter name="Phase" scale="1" value="0.0" min="0.0" max="1e10" free="1"/>
... ...