fermi-lat / Likelihood

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Problem with SEDs in unbinned mode #81

Open eacharles opened 4 years ago

eacharles commented 4 years ago

Copied from here: https://github.com/fermi-lat/pyLikelihood/issues/16

jballet commented 3 years ago

I have a related problem with the value returned by the energyFlux and energyFluxError methods for extended sources when an unbinned component comes into play, after setEnergyRange. I have prepared a simplified test harness at ftp://ftp.cea.fr/incoming/y2k01/jbbglast/testExtended.tgz (available for one week). The 10-year livetime cube and spacecraft file are available at /nfs/farm/g/glast/g/catalog/P8_P305 at SLAC. There are two components in the model, one binned and one unbinned. The unbinned one is used in the main fit, but the SED calculation bears on intervals below its energy range so it should play no role. The SED fit works and gives the same result as the call omitting the unbinned component entirely. The parameter and TS values are correct. The calls to energyFlux and energyFluxError work for the first energy bin in the SED, but not for the others (I have only two in the test harness, but I had many in the original problem) when the source is extended (EXTFornaxA). They return 0 (or a very small number) for all energy bins but the first. This is of course annoying when building a SED. The calls to energyFlux and energyFluxError work fine in all energy bins for point sources (P88Y0844). This was tested in FT 1.3.5.