Change request #2850
Missking keywords in Fermi LAT source maps HDUs
Status: | Closed | Start date: | 03/12/2019 | |
---|---|---|---|---|
Priority: | Normal | Due 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.
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen over 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 over 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 over 5 years ago
I tested on the joint HESS/Fermi Crab analysis and it works properly.
#4 Updated by Knödlseder Jürgen over 5 years ago
- Status changed from Feedback to Closed