diff --git a/doc/source/user_manual/modules/model.rst b/doc/source/user_manual/modules/model.rst index 51a6bb2..b739a19 100644 --- a/doc/source/user_manual/modules/model.rst +++ b/doc/source/user_manual/modules/model.rst @@ -34,7 +34,7 @@ methods. The top section shows the abstract methods, the bottom section shows the methods that are called for :doxy:`GModelSky` models, i.e. models of celestial sources that are folded by the instrument response. -For model evaluation, the ``GObservation::model`` method loops over all +For model evaluation, the :doxy:``GObservation::model`` method loops over all models in the :doxy:`GModels` container and calls the :doxy:`GModel::eval_gradients` method of each model. For :doxy:`GModelSky` models, this invokes an integration over true time, true energy and all possible @@ -48,7 +48,7 @@ performed by the ``GObservation::npred_temp`` and ``GObservation::npred_spec`` methods within the :doxy:`GObservation` class, the spatial integral is done within the :doxy:`GModel` class by invoking the ``GModel::npred`` method. For :doxy:`GModelSky` models, the integral is -performed by the abstract :doxy:`GResponse::npred` method that needs to be +performed by the abstract :doxy:`GResponse::nroi` method that needs to be implemented for each instrument. .. _fig_calltree_model: diff --git a/doc/source/user_manual/modules/obs.rst b/doc/source/user_manual/modules/obs.rst index 69bb7c0..e619313 100644 --- a/doc/source/user_manual/modules/obs.rst +++ b/doc/source/user_manual/modules/obs.rst @@ -234,21 +234,6 @@ Equation :eq:`pirf` is used by the :doxy:`GModelSky::eval` and :doxy:`GModelSky::eval_gradients` methods for computation of the instrument response to a source model (see :ref:`fig_calltree_model`). -Dependent on the source model type (point source, radial source, elliptical -source or diffuse source), -:doxy:`GResponse::irf(GEvent&, GSource&, GObservation&)` -calls the methods -:doxy:`GResponse::irf_ptsrc`, -:doxy:`GResponse::irf_radial`, -:doxy:`GResponse::irf_elliptical` or -:doxy:`GResponse::irf_diffuse`. -All these methods have a default implementation in :doxy:`GResponse`, thus -formally the methods do not need to be implemented in the derived class. -However, except for :doxy:`GResponse::irf_ptsrc`, the code for the methods -has not been written so far, hence if an instrument should support models others -than the point source model, the respective methods need to be implemented in -the instrument specific implementation of the :doxy:`GResponse` class. - A maximum likelihood analysis of the data generally needs the computation of the predicted number of events within the selection region for each source model. Selection region means here the range of measured quantities that is used for @@ -282,17 +267,8 @@ The integration over the region of interest .. math:: N_{\rm ROI} = \int_{\rm ROI} (p', E', t'| d) \, {\rm d}p' -is provided by the :doxy:`GResponse::npred(GSource&, GObservation&)` method. -Dependent on the source model type (point source, radial source, elliptical -source or diffuse source), :doxy:`GResponse::npred(GSource&, GObservation&)` -calls the methods ``GResponse::npred_ptsrc``, ``GResponse::npred_radial``, -``GResponse::npred_elliptical`` or ``GResponse::npred_diffuse``. -All these methods have a default implementation in :doxy:`GResponse`, which -all make use of the pure virtual :doxy:`GResponse::npred(GPhoton&, GObservation&)` -method that needs to be implemented by the instrument specific derived -class. -See :ref:`fig_calltree_model` to see how the :doxy:`GResponse::npred` method is -used in response computations of source models. +is provided by the +:doxy:`GResponse::nroi(GModelSky&, GEnergy&, GTime&, GObservation&)` method. A final word about deadtime corrections. Deadtime corrections need to be taken into account at the level of the instrument diff --git a/include/GXmlElement.hpp b/include/GXmlElement.hpp index 4f63304..8ad6e5c 100644 --- a/include/GXmlElement.hpp +++ b/include/GXmlElement.hpp @@ -142,7 +142,7 @@ GXmlNode* GXmlElement::parent(void) const /***********************************************************************//** * @brief Set parent of XML element * - * @param[in] node Parent of XML element. + * @param[in] parent Parent of XML element. ***************************************************************************/ inline void GXmlElement::parent(GXmlNode* parent) diff --git a/inst/com/src/GCOMResponse.cpp b/inst/com/src/GCOMResponse.cpp index 5798c43..db0fa48 100644 --- a/inst/com/src/GCOMResponse.cpp +++ b/inst/com/src/GCOMResponse.cpp @@ -390,7 +390,9 @@ double GCOMResponse::irf(const GEvent& event, /***********************************************************************//** * @brief Return integral of event probability for a given sky model over ROI * - * @param[in] model Incident photon. + * @param[in] model Sky model. + * @param[in] obsEng Observed photon energy. + * @param[in] obsTime Observed photon arrival time. * @param[in] obs Observation. * @return 0.0 * diff --git a/inst/cta/include/GCTAEdisp2D.hpp b/inst/cta/include/GCTAEdisp2D.hpp index 0d6723c..1320341 100644 --- a/inst/cta/include/GCTAEdisp2D.hpp +++ b/inst/cta/include/GCTAEdisp2D.hpp @@ -180,7 +180,7 @@ const GCTAResponseTable& GCTAEdisp2D::table(void) const /***********************************************************************//** * @brief Set response table * - * @param[in] Response table. + * @param[in] table Response table. ***************************************************************************/ inline void GCTAEdisp2D::table(const GCTAResponseTable& table) diff --git a/inst/cta/src/GCTAEdisp2D.cpp b/inst/cta/src/GCTAEdisp2D.cpp index c023501..c6f04c3 100644 --- a/inst/cta/src/GCTAEdisp2D.cpp +++ b/inst/cta/src/GCTAEdisp2D.cpp @@ -394,7 +394,7 @@ void GCTAEdisp2D::save(const std::string& filename, const bool& clobber) const * @brief Simulate energy dispersion * * @param[in] ran Random number generator. - * @param[in] logE Log10 of the true photon energy (TeV). + * @param[in] logEsrc Log10 of the true photon energy (TeV). * @param[in] theta Offset angle in camera system (rad). Not used. * @param[in] phi Azimuth angle in camera system (rad). Not used. * @param[in] zenith Zenith angle in Earth system (rad). Not used. diff --git a/inst/cta/src/GCTAResponseCube.cpp b/inst/cta/src/GCTAResponseCube.cpp index 264914b..480c868 100644 --- a/inst/cta/src/GCTAResponseCube.cpp +++ b/inst/cta/src/GCTAResponseCube.cpp @@ -380,7 +380,9 @@ double GCTAResponseCube::irf(const GEvent& event, /***********************************************************************//** * @brief Return integral of event probability for a given sky model over ROI * - * @param[in] model Incident photon. + * @param[in] model Sky model. + * @param[in] obsEng Observed photon energy. + * @param[in] obsTime Observed photon arrival time. * @param[in] obs Observation. * @return 0.0 * diff --git a/inst/cta/src/GCTAResponseIrf.cpp b/inst/cta/src/GCTAResponseIrf.cpp index 33f8551..6255ac7 100644 --- a/inst/cta/src/GCTAResponseIrf.cpp +++ b/inst/cta/src/GCTAResponseIrf.cpp @@ -440,9 +440,11 @@ double GCTAResponseIrf::irf(const GEvent& event, /***********************************************************************//** * @brief Return integral of event probability for a given sky model over ROI * - * @param[in] model Incident photon. + * @param[in] model Sky model. + * @param[in] obsEng Observed photon energy. + * @param[in] obsTime Observed photon arrival time. * @param[in] obs Observation. - * @return 0.0 + * @return Event probability. * * @exception GException::feature_not_implemented * Method is not implemented. diff --git a/inst/cta/src/GCTAResponse_helpers.cpp b/inst/cta/src/GCTAResponse_helpers.cpp index ac5334b..b9793d8 100644 --- a/inst/cta/src/GCTAResponse_helpers.cpp +++ b/inst/cta/src/GCTAResponse_helpers.cpp @@ -224,33 +224,7 @@ double cta_npsf_kern_rad_azsym::eval(const double& delta) /***********************************************************************//** * @brief Integration kernel for nedisp() method * - * @param[in] logEobs Observed event energy. - * @return Energy dispersion PDF value. - ***************************************************************************/ -/* -double cta_nedisp_kern::eval(const double& logEobs) -{ - // Get value - double value = (*m_rsp.edisp())(logEobs, - m_logEsrc, - m_theta, - m_phi, - m_zenith, - m_azimuth); - - // Correct for variable substitution - //value *= std::exp(logEobs); - - // Return - return value; -} -*/ - - -/***********************************************************************//** - * @brief Integration kernel for nedisp() method - * - * @param[in] logEobs Logarithm of true photon energy. + * @param[in] logEsrc Logarithm of true photon energy. * @return Nroi. ***************************************************************************/ double cta_nroi_kern::eval(const double& logEsrc) diff --git a/inst/lat/src/GLATResponse.cpp b/inst/lat/src/GLATResponse.cpp index aa397bd..f851401 100644 --- a/inst/lat/src/GLATResponse.cpp +++ b/inst/lat/src/GLATResponse.cpp @@ -491,7 +491,9 @@ double GLATResponse::irf(const GLATEventBin& event, /***********************************************************************//** * @brief Return integral of event probability for a given sky model over ROI * - * @param[in] model Incident photon. + * @param[in] model Sky model. + * @param[in] obsEng Observed photon energy. + * @param[in] obsTime Observed photon arrival time. * @param[in] obs Observation. * @return 0.0 * diff --git a/inst/mwl/src/GMWLResponse.cpp b/inst/mwl/src/GMWLResponse.cpp index 987c99a..1801dd4 100644 --- a/inst/mwl/src/GMWLResponse.cpp +++ b/inst/mwl/src/GMWLResponse.cpp @@ -165,7 +165,9 @@ GMWLResponse* GMWLResponse::clone(void) const /***********************************************************************//** * @brief Return integral of event probability for a given sky model over ROI * - * @param[in] model Incident photon. + * @param[in] model Sky model. + * @param[in] obsEng Observed photon energy. + * @param[in] obsTime Observed photon arrival time. * @param[in] obs Observation. * @return 0.0 * diff --git a/src/obs/GResponse.cpp b/src/obs/GResponse.cpp index fefaff8..a040c04 100644 --- a/src/obs/GResponse.cpp +++ b/src/obs/GResponse.cpp @@ -290,6 +290,8 @@ void GResponse::free_members(void) * * @param[in] model Sky model. * @param[in] event Event. + * @param[in] srcEng Source energy. + * @param[in] srcTime Source time. * @param[in] obs Observation. * @param[in] grad Should model gradients be computed? (default: true) * @return Event probability.