Bug #1915
ctobssim throws an exception for map cube
Status: | Closed | Start date: | 01/26/2017 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Knödlseder Jürgen | % Done: | 100% | |
Category: | - | |||
Target version: | 1.2.0 | |||
Duration: |
Description
We are trying to simulate dark matter events with ctools. There is a strange thing that we think we should report it.
With ctools 1.0.1, we run simulations for both 100GeV and 10TeV dark matter successfully. With ctools 1.1.0, it works fine for 10TeV dark matter. However, for 100GeV dark matter the error is shown, please see below (attached xml file and used dark matter map https://www.dropbox.com/s/c9cqeco4igocygt/DM_mapcube_54_WW_100GeV_csth_Ein_mapcubedldb025deg_dr01_lmax359p75bmax89p75?dl=0).
- ctobssim
RA of pointing (degrees) (0-360) [266.364]
Dec of pointing (degrees) (-90-90) [-28.9938]
Radius of FOV (degrees) (0-180) [5.0]
Start time (MET in s) [0.0]
End time (MET in s) [1800000]
Lower energy limit (TeV) [0.1]
Upper energy limit (TeV) [100.0]
Calibration database [prod2]
Instrument response function [South_50h]
Input model XML file [100GeVdm.xml]
Output event data file or observation definition XML file [100GeVdm_500h_prod2.fits]- ERROR encounterted in the execution of ctobssim. Run aborted ...
- ERROR in GModelSpatialDiffuseCube::mc(GEnergy&, GTime&, GRan&): Invalid value. Simulation cone has not been defined or does not overlap with the sky map. Please specify a valid simulation cone.
We know in the newer version of ctools, at lower energies events are not simulated which indeed increases the efficiency. We are not sure if this error is because less massive dark matter has more events at lower energies and they have been thrown or it is a bug with new version of ctools. Could you please give us some help? Thanks a lot for your time as always.
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen almost 8 years ago
Your simulating events above 100 GeV for a 100 GeV DM model. Above 100 GeV your map cube is empty, and for that reason you get the error message. You should therefore restrict the simulation to a maximum energy of 100 GeV.
I will change the error message so that it is clearer.
#2 Updated by Knödlseder Jürgen almost 8 years ago
- Status changed from New to In Progress
- Assigned To set to Knödlseder Jürgen
- Target version set to 1.2.0
#3 Updated by Knödlseder Jürgen almost 8 years ago
- Project changed from ctools to GammaLib
- Subject changed from ctools 1.1.0 to ctobssim throws an exception for map cube
- Target version changed from 1.2.0 to 1.2.0
- % Done changed from 0 to 80
I changed the GammaLib code so that the mc()
methods of the GModelSpatialDiffuseMap
and GModelSpatialDiffuseCube
classes throw an GException::invalid_return_value
exception in case that the sky direction is invalid. The exception is then catched in the GModelSky::mc()
method, and the according photon is simply skipped.
This allows now for a proper handling of empty maps or map cubes.
#4 Updated by Knödlseder Jürgen almost 8 years ago
- Status changed from In Progress to Closed
- % Done changed from 80 to 100
Merged into devel
.