Feature #1069

Document which ctool works with which instrument

Added by Owen Ellis over 10 years ago. Updated over 10 years ago.

Status:NewStart date:01/09/2014
Priority:NormalDue date:
Assigned To:-% Done:

0%

Category:-
Target version:-
Duration:

Description

I’m trying to run a Fermi LAT analysis with the ctools and get errors about missing header keywords:

eowen@hfm-1307f:~/analyses/ctools_crab$ ctlike
Event list, counts map or observation definition file [counts.fits] 
*** ERROR encounterted in the execution of ctlike. Run aborted ...
*** ERROR in GFitsHeaderCard& GFitsHeader::at(std::string&): Invalid argument.
Keyword "RA_PNT" not found in FITS header.
eowen@hfm-1307f:~/analyses/ctools_crab$ ctselect
Input event list or observation definition file [/home/eowen/data/fermi/photon/lat_photon_weekly_w009_p130_v001.fits] 
*** ERROR in GFitsTable::operator[](std::string&): Column "MULTIP" not found in table
*** ERROR encounterted in the execution of ctselect. Run aborted ...

The ctselect help page doesn’t mention for which instruments it works:
http://cta.irap.omp.eu/ctools/doc/ctselect.html

The ctlike help page explicitly mentions that it’s for CTA analysis, but it should work for HESS and Fermi LAT, too, I think.
http://cta.irap.omp.eu/ctools/doc/ctlike.html

Maybe add a section for each ctool listing the instruments it supports?

How can I run ctselect, ctmodel and ctlike for Fermi LAT data?


Recurrence

No recurrence.

History

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

The ctools are only intended to work for CTA data, and HESS, MAGIC, VERITAS in CTA data format.

ctlike can indeed also digest Fermi/LAT data, but not in the way you’re trying to do this. To use Fermi/LAT data, you have to define the data in an observation definition XML file. Here an example (from the gammalib source code, see inst/lat/test/data/p6v3):

<observation_list title="observation library">
  <observation name="Crab" id="00001" instrument="LAT">
    <parameter name="CountsMap"    file="$(PACKAGE_SOURCE)/inst/lat/test/data/p6v3/srcmap.fits"/>
    <parameter name="ExposureMap"  file="$(PACKAGE_SOURCE)/inst/lat/test/data/p6v3/binned_expmap.fits"/>
    <parameter name="LiveTimeCube" file="$(PACKAGE_SOURCE)/inst/lat/test/data/p6v3/ltcube.fits"/>
    <parameter name="IRF"          value="P6_v3_diff"/>
  </observation>
</observation_list>

You can then pass this file instead of counts.fits to ctlike, and it should work.

But you’re fully right: the documentation of ctools is too sparse for the moment. All this has to be written down. I’m actually trying to get a first complete set of gammalib documents, once this is done, I’m also going to improve the ctools documentation.

Also available in: Atom PDF