Change request #1656

Access IRF columns by name, not by index

Added by Deil Christoph about 8 years ago. Updated about 8 years ago.

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

100%

Category:-
Target version:1.1.0
Duration:

Description

This is a continuation of https://github.com/gammapy/gamma-astro-data-formats/issues/21#issuecomment-178595981

For the moment, the order of the parameter blocks in the FITS file are hardwired in GCTAPsf2D which is anyways a bad idea. Enhancing GCTAPsf2D so that the required parameter blocks are dynamically extracted from the column names would handle the two formats transparently. So we would not need to use the version header keyword for that (and to increment the number).
You may create a change request asking for an automatic detection of the parameter blocks based on column names. Note that this implies that the column names will then be fixed.
We also need to change GCTAResponseIrf::load_psf which for the moment checks the presence of columns and infers from that whether to use a Gaussian or a King PSF. We just need to remove the table.contains(“SCALE”) condition.

I agree that accessing columns by name, not by index is much better.
Please change this in Gammalib.

In all the specs we’re writing, we specify column names, there is no requirement stated on column order.
Example: http://gamma-astro-data-formats.readthedocs.org/en/latest/irfs/psf/psf_3gauss/index.html

(If the 3-gauss parametrisation needs discussion or possible, let’s defer this to a separate issue.)


Recurrence

No recurrence.

History

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

  • Status changed from New to Closed
  • Assigned To set to Knödlseder Jürgen
  • Target version set to 1.1.0
  • % Done changed from 0 to 100

The information from response tables is now extracted on basis of the column names and not the column index in a table. The SCALE column is not needed anymore for the 3-Gaussian PSF.

Code has been merged into devel.

Also available in: Atom PDF