Commit 2224015603fc2b153fb3842b9a24a831517ade68

Authored by Jürgen Knödlseder
1 parent bf3c48ec

Adapt to new GammaLib interface

Showing 1 changed file with 2 additions and 3 deletions
src/ctobssim/ctobssim.cpp
@@ -730,8 +730,8 @@ void ctobssim::simulate_source(GCTAObservation* obs, const GModels& models, @@ -730,8 +730,8 @@ void ctobssim::simulate_source(GCTAObservation* obs, const GModels& models,
730 GEnergy e_true_min = emin; 730 GEnergy e_true_min = emin;
731 GEnergy e_true_max = emax; 731 GEnergy e_true_max = emax;
732 if (rsp->use_edisp()) { 732 if (rsp->use_edisp()) {
733 - e_true_min = rsp->ebounds_src(e_true_min).emin();  
734 - e_true_max = rsp->ebounds_src(e_true_max).emax(); 733 + e_true_min = rsp->ebounds(e_true_min).emin();
  734 + e_true_max = rsp->ebounds(e_true_max).emax();
735 } 735 }
736 736
737 // Dump energy range 737 // Dump energy range
@@ -762,7 +762,6 @@ void ctobssim::simulate_source(GCTAObservation* obs, const GModels& models, @@ -762,7 +762,6 @@ void ctobssim::simulate_source(GCTAObservation* obs, const GModels& models,
762 // number of simulated photons to m_max_photons. 762 // number of simulated photons to m_max_photons.
763 // The photon rate is estimated from the model flux 763 // The photon rate is estimated from the model flux
764 // and used to set the duration of the time slice. 764 // and used to set the duration of the time slice.
765 - //double flux = model->spectral()->flux(emin, emax);  
766 double flux = get_model_flux(model, emin, emax, 765 double flux = get_model_flux(model, emin, emax,
767 dir, rad); 766 dir, rad);
768 double rate = flux * m_area; 767 double rate = flux * m_area;