Change request #2850

Missking keywords in Fermi LAT source maps HDUs

Added by Tibaldo Luigi about 5 years ago. Updated about 5 years ago.

Status:ClosedStart date:03/12/2019
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.6.0
Duration:

Description

Since LAT Science Tools 11 the model maps HDUs in output from gtsrcmaps miss WCS keywords, thus GammaLib cannot read them properly. The WCS keywords are still present in the Primary HDU, that is the count map.
GammaLib should be modified to read the missing keywords from the Primary HDU. An example output from gtsrcmaps is attached.

srcmaps.fits (1.54 MB) Tibaldo Luigi, 03/12/2019 02:39 PM


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen about 5 years ago

  • Status changed from New to In Progress

To reproduce the problem with the attached file:

>>> import gammalib
>>> e=gammalib.GLATEventCube('srcmaps.fits')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/gamma/lib/python2.7/site-packages/gammalib/lat.py", line 652, in __init__
    this = _lat.new_GLATEventCube(*args)
ValueError: *** ERROR in GFitsHeaderCard& GFitsHeader::at(std::string&): Invalid argument. Keyword "CTYPE1" not found in FITS header.

#2 Updated by Knödlseder Jürgen about 5 years ago

  • Tracker changed from Feature to Change request
  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100

I added a kludge that deals with missing header keywords, and verified that the above small Python code succeeds.

Code is merged into devel. Would be good @luigi if you could check that everything is okay.

#3 Updated by Tibaldo Luigi about 5 years ago

I tested on the joint HESS/Fermi Crab analysis and it works properly.

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

  • Status changed from Feedback to Closed

Also available in: Atom PDF