Bug #901

Error with Fermi LAT caldb in ctools

Added by Schulz Anneli over 11 years ago. Updated over 11 years ago.

Status:NewStart date:06/12/2013
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

0%

Category:-
Target version:-
Duration:

Description

If you have an old version of ctools and update to a new one you might get the following error:

RuntimeError: *** ERROR in GFits::open(std::string&): Unable to open FITS file "/Users/schulz/software/ctools/share/caldb/data/glast/lat/bcf/ea/aeff_P7SOURCE_V6_front.fits" (status=104)

the problem is that the CALDB for fermi lat is no longer in the ctools but in gammalib. so you have to adapt the $CALDB path and include the gammalib caldb path:

export CALDB=$GAMMALIB/share/caldb/:$CALDB


Recurrence

No recurrence.

History

#1 Updated by Schulz Anneli over 11 years ago

  • Description updated (diff)

#2 Updated by Schulz Anneli over 11 years ago

This also leads to the fact that the example scripts ($CTOOLS/share/examples/python/make_unbinned_analysis.py and ...binned... ) in python don’t work anymore with the default parameters since the paths are wrongly specified.

First you have to adjust the IRF name to a filename which is in $GAMMALIB/share/caldb/cta/
e.g. from “cta_dummy_irf” to “kb_A_50h_v3”
(Alternatively copy cta_dummy_irf from $CTOOLS... to $GAMMALIB...)

Second you need to adjust the model path: from model_name="${GAMMALIB}/share/models/crab.xml” to "${CTOOLS}/share/models/crab.xml”
and in model.xml: from "$GAMMALIB/share/models/bkg_dummy.txt” to "$CTOOLS/share/models/bkg_dummy.txt”
( Alternatively you can just decide to have the models folder also in $GAMMALIB/share/)

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

  • Assigned To set to Knödlseder Jürgen

Can you try using

GAMMALIB_CALDB=/usr/local/gamma/share/caldb

In fact, GAMMALIB_CALDB takes now precedence over CALDB to avoid conflicts with the Fermi Science Tools.

But I guess you problem is more related to the fact that you installed gammalib and ctools in different paths, which is likely not tested in detail. I’ll look into this when I find some time.

Also available in: Atom PDF