Commit a91a5996830c4c8c19fd517c0807045720b589de

Authored by knodlseder
1 parent 2d58fa4f

pass observation to IRF method

Showing 1 changed file with 3 additions and 5 deletions
src/model/GModel.cpp
@@ -616,9 +616,8 @@ GModelSpectral* GModel::xml_spectral(const GXmlElement& spectral) const @@ -616,9 +616,8 @@ GModelSpectral* GModel::xml_spectral(const GXmlElement& spectral) const
616 * @param[in] event Observed event. 616 * @param[in] event Observed event.
617 * @param[in] srcEng True photon energy. 617 * @param[in] srcEng True photon energy.
618 * @param[in] srcTime True photon arrival time. 618 * @param[in] srcTime True photon arrival time.
619 - * @param[in] rsp Instrument response function.  
620 - * @param[in] pnt Instrument pointing direction.  
621 - * @parem[in] grad Compute also model gradients (default=false). 619 + * @param[in] obs Observation.
  620 + * @parem[in] grad Compute also model gradients? (default=false)
622 * 621 *
623 * This method computes the spatial model component for a given true photon 622 * This method computes the spatial model component for a given true photon
624 * energy and arrival time. 623 * energy and arrival time.
@@ -634,11 +633,10 @@ double GModel::spatial(const GEvent& event, @@ -634,11 +633,10 @@ double GModel::spatial(const GEvent& event,
634 if (m_spatial != NULL) { 633 if (m_spatial != NULL) {
635 634
636 // Get current pointing and response function 635 // Get current pointing and response function
637 - GPointing* pnt = obs.pointing(event.time());  
638 GResponse* rsp = obs.response(event.time()); 636 GResponse* rsp = obs.response(event.time());
639 637
640 // Get IRF value 638 // Get IRF value
641 - double irf = rsp->irf(event, *this, srcEng, srcTime, *pnt); 639 + double irf = rsp->irf(event, *this, srcEng, srcTime, obs);
642 640
643 // Compute source model 641 // Compute source model
644 double source = 1.0; 642 double source = 1.0;