Bug #1611
Unable to use numbers in FITS extension names
Status: | Closed | Start date: | 01/04/2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Knödlseder Jürgen | % Done: | 100% | |
Category: | - | |||
Target version: | - | |||
Duration: |
Description
Christoph Deil reported that he is unable to use numbers in FITS extension names:
In [15]: psf = gammalib.GCTAPsf2D('hess_psf_023523.fits.gz[PSF_2D]') --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-15-e694cf9602ee> in <module>() ----> 1 psf = gammalib.GCTAPsf2D('hess_psf_023523.fits.gz[PSF_2D]') /usr/local/gamma/lib/python3.4/site-packages/gammalib/cta.py in __init__(self, *args) 2853 __init__(GCTAPsf2D self, GCTAPsf2D psf) -> GCTAPsf2D 2854 """ -> 2855 this = _cta.new_GCTAPsf2D(*args) 2856 try: 2857 self.this.append(this) RuntimeError: *** ERROR in GFits::at(std::string&): HDU "POINT SPREAD FUNCTION" not found in FITS file In [14]: gammalib.GCTAResponseIrf().load_psf('hess_psf_023523.fits.gz[PSF_2D]') --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-14-77132b2a0315> in <module>() ----> 1 gammalib.GCTAResponseIrf().load_psf('hess_psf_023523.fits.gz[PSF_2D]') /usr/local/gamma/lib/python3.4/site-packages/gammalib/cta.py in load_psf(self, filename) 1582 def load_psf(self, filename): 1583 """load_psf(GCTAResponseIrf self, std::string const & filename)""" -> 1584 return _cta.GCTAResponseIrf_load_psf(self, filename) 1585 1586 RuntimeError: *** ERROR in GCTAResponseIrf::load_psf(std::string&): File error. FITS file "hess_psf_023523.fits.gz[PSF_2D]" does not contain a valid point spread function table. Please specify a valid point spread function response file.
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen almost 9 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
I modified the GFilename::set_filename()
method so that numbers in extension names are correctly handled.
#2 Updated by Mayer Michael almost 9 years ago
Happy new year! I have tested the new code and it works just fine - thanks.
#3 Updated by Knödlseder Jürgen almost 9 years ago
- Status changed from Feedback to Closed