Commit 2eec961dd7354a6bab20bfae785b7fc261dff38b
1 parent
654219f9
Signal that NodeFunction cannot be used.
Showing
1 changed file
with
6 additions
and
0 deletions
src/ctulimit/ctulimit.cpp
| ... | ... | @@ -546,6 +546,12 @@ void ctulimit::get_model_parameter(void) |
| 546 | 546 | "upper limit computation."; |
| 547 | 547 | throw GException::invalid_value(G_GET_MODEL_PARAMETER, msg); |
| 548 | 548 | } |
| 549 | + if (m_skymodel->spectral()->type() == "NodeFunction") { | |
| 550 | + std::string msg = "\"NodeFunction\" cannot be used as spectral " | |
| 551 | + "model for an upper limit computation. " | |
| 552 | + "Please specify another spectral model."; | |
| 553 | + throw GException::invalid_value(G_GET_MODEL_PARAMETER, msg); | |
| 554 | + } | |
| 549 | 555 | if (m_skymodel->spectral()->has_par("Normalization")) { |
| 550 | 556 | m_model_par = &(m_skymodel->spectral()->operator[]("Normalization")); |
| 551 | 557 | } | ... | ... |