Support #1873

cssens gets stuck for second energy bin

Added by Yang Lili over 7 years ago. Updated about 7 years ago.

Status:ClosedStart date:10/25/2016
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.2.0
Duration:

Description

At first, I was trying to use this tool to get the sensitivity for diffuse sources, but it didn’t work. In case I didn’t do anything wrong or stupid, I tried crab to see how cssens works, as seen below

  1. cssens
    Calibration database [prod2]
    Instrument response function [South_0.5h] South_50h
    Effective exposure time (s) [180000.0] 18000
    Radius of ROI (deg) [5.0]
    Input model XML file [$CTOOLS/share/models/crab.xml]
    Source name [Crab]
    Lower energy limit (TeV) [0.020] 0.1
    Upper energy limit (TeV) [200.0] 100
    Number of energy bins for differential sensitivity computation [21]

Then the calculation keeps repeating in the first energy bin, giving the results below,

loge,emin,emax,crab_flux,photon_flux,energy_flux,sensitivity
-0.928571428571,0.1,0.138949549437,0.0180332909182,4.0821996488e-12,7.64194439176e-13,2.32078640804e-12

It looks the calculation can not move on after the first energy bin.

2016-10-25T09:26:47: ======================
2016-10-25T09:26:47: | Simulate observation |
2016-10-25T09:26:47: ======================
2016-10-25T09:26:47: === CTA observation (id=000000) ===
2016-10-25T09:26:47: Simulation cone ...........: RA=266.405 deg, Dec=-28.9362 deg, radius=5.5 deg
2016-10-25T09:26:47: Time interval .............: 3.15576e+08 - 3.15594e+08 s
2016-10-25T09:26:47: Photon energy range .......: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Event energy range ........: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Simulation area ..........: 3.77263e+09 cm2
2016-10-25T09:26:47: Use model ................: Crab
2016-10-25T09:26:47: Normalization ............: 1 [Crab]
2016-10-25T09:26:47: Flux .....................: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: Normalized flux ..........: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: MC source events .........: 0 (all source models)
2016-10-25T09:26:47: Photon energy range .......: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Event energy range ........: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Simulation area ..........: 3.77263e+09 cm2
2016-10-25T09:26:47: Use model ................: Crab
2016-10-25T09:26:47: Normalization ............: 1 [Crab]
2016-10-25T09:26:47: Flux .....................: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: Normalized flux ..........: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: MC source events .........: 0 (all source models)
2016-10-25T09:26:47: Photon energy range .......: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Event energy range ........: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Simulation area ..........: 3.77263e+09 cm2
2016-10-25T09:26:47: Use model ................: Crab
2016-10-25T09:26:47: Normalization ............: 1 [Crab]
2016-10-25T09:26:47: Flux .....................: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: Normalized flux ..........: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: MC source events .........: 0 (all source models)
2016-10-25T09:26:47: Photon energy range .......: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Event energy range ........: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Simulation area ..........: 3.77263e+09 cm2
2016-10-25T09:26:47: Use model ................: Crab
2016-10-25T09:26:47: Normalization ............: 1 [Crab]
2016-10-25T09:26:47: Flux .....................: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: Normalized flux ..........: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: MC source events .........: 0 (all source models)
2016-10-25T09:26:47: Photon energy range .......: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Event energy range ........: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Simulation area ..........: 3.77263e+09 cm2
2016-10-25T09:26:47: Use model ................: Crab
2016-10-25T09:26:47: Normalization ............: 1 [Crab]
2016-10-25T09:26:47: Flux .....................: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: Normalized flux ..........: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: MC source events .........: 0 (all source models)
2016-10-25T09:26:47: Photon energy range .......: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Event energy range ........: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Simulation area ..........: 3.77263e+09 cm2
2016-10-25T09:26:47: Use model ................: Crab
2016-10-25T09:26:47: Normalization ............: 1 [Crab]
2016-10-25T09:26:47: Flux .....................: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: Normalized flux ..........: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: MC source events .........: 0 (all source models)
2016-10-25T09:26:47: Photon energy range .......: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Event energy range ........: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Simulation area ..........: 3.77263e+09 cm2
2016-10-25T09:26:47: Use model ................: Crab
2016-10-25T09:26:47: Normalization ............: 1 [Crab]
2016-10-25T09:26:47: Flux .....................: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: Normalized flux ..........: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: MC source events .........: 0 (all source models)
2016-10-25T09:26:47: Photon energy range .......: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Event energy range ........: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Simulation area ..........: 3.77263e+09 cm2
2016-10-25T09:26:47: Use model ................: Crab
2016-10-25T09:26:47: Normalization ............: 1 [Crab]
2016-10-25T09:26:47: Flux .....................: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: Normalized flux ..........: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: MC source events .........: 0 (all source models)
2016-10-25T09:26:47: Photon energy range .......: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Event energy range ........: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Simulation area ..........: 3.77263e+09 cm2
2016-10-25T09:26:47: Use model ................: Crab
2016-10-25T09:26:47: Normalization ............: 1 [Crab]
2016-10-25T09:26:47: Flux .....................: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: Normalized flux ..........: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: MC source events .........: 0 (all source models)
2016-10-25T09:26:47: Photon energy range .......: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Event energy range ........: 138.95 GeV - 138.95 GeV
2016-10-25T09:26:47: Simulation area ..........: 3.77263e+09 cm2
2016-10-25T09:26:47: Use model ................: Crab
2016-10-25T09:26:47: Normalization ............: 1 [Crab]
2016-10-25T09:26:47: Flux .....................: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: Normalized flux ..........: 0 [Crab] photons/cm2/s
2016-10-25T09:26:47: MC source events .........: 0 (all source models)
2016-10-25T09:26:47: MC source photons .........: 0 [Crab]
2016-10-25T09:26:47: MC source events ..........: 0 [Crab]
2016-10-25T09:27:13: MC events outside ROI .....: 0
2016-10-25T09:27:13: MC background events ......: 0
2016-10-25T09:27:13: MC events .................: 0 (all models)
2016-10-25T09:27:13:


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 7 years ago

  • Status changed from New to In Progress
  • Assigned To set to Knödlseder Jürgen
  • Target version set to 1.2.0

Thanks for reporting that. It seems that in a recent refactoring of the code the handling of the energy boundaries got corrupted. I will look into that.

#2 Updated by Knödlseder Jürgen over 7 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100

I fixed the problem, code is merged into devel.

I keep the status on feedback until you have verified that the code also works for you as expected.

#3 Updated by Knödlseder Jürgen over 7 years ago

  • Subject changed from cssens to cssens gets stuck for second energy bin

#4 Updated by Knödlseder Jürgen about 7 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF