Commit 95b93e02c1ecf747770fb02598f1cf3b56b5c52a

Authored by Michael Mayer
1 parent 04b1443d

Added PhotonFlux and EnergyFlux to the list of normalisation parameter for upper limit computation

Showing 1 changed file with 8 additions and 1 deletions
src/ctulimit/ctulimit.cpp
@@ -619,6 +619,12 @@ void ctulimit::get_model_parameter(void) @@ -619,6 +619,12 @@ void ctulimit::get_model_parameter(void)
619 else if (m_skymodel->spectral()->has_par("Prefactor")) { 619 else if (m_skymodel->spectral()->has_par("Prefactor")) {
620 m_model_par = &(m_skymodel->spectral()->operator[]("Prefactor")); 620 m_model_par = &(m_skymodel->spectral()->operator[]("Prefactor"));
621 } 621 }
  622 + else if (m_skymodel->spectral()->has_par("PhotonFlux")) {
  623 + m_model_par = &(m_skymodel->spectral()->operator[]("PhotonFlux"));
  624 + }
  625 + else if (m_skymodel->spectral()->has_par("EnergyFlux")) {
  626 + m_model_par = &(m_skymodel->spectral()->operator[]("EnergyFlux"));
  627 + }
622 else if (m_skymodel->spectral()->has_par("Integral")) { 628 else if (m_skymodel->spectral()->has_par("Integral")) {
623 m_model_par = &(m_skymodel->spectral()->operator[]("Integral")); 629 m_model_par = &(m_skymodel->spectral()->operator[]("Integral"));
624 } 630 }
@@ -627,7 +633,8 @@ void ctulimit::get_model_parameter(void) @@ -627,7 +633,8 @@ void ctulimit::get_model_parameter(void)
627 } 633 }
628 else { 634 else {
629 std::string msg = "Require spectral parameter \"Normalization\", " 635 std::string msg = "Require spectral parameter \"Normalization\", "
630 - "\"Prefactor\", \"Integral\" or \"Value\" for " 636 + "\"Prefactor\", \"PhotonFlux\", \"EnergyFlux\", "
  637 + "\"Integral\" or \"Value\" for "
631 "upper limit computation. The specified source " 638 "upper limit computation. The specified source "
632 "\""+m_srcname+"\" does not have such a parameter."; 639 "\""+m_srcname+"\" does not have such a parameter.";
633 throw GException::invalid_value(G_GET_MODEL_PARAMETER, msg); 640 throw GException::invalid_value(G_GET_MODEL_PARAMETER, msg);