IRF cubes will be stored as BINTABLES following the Fermi Convention similar to how it was done in GADF.
Issues to solve
support both binned axes and nodes (nodes meaning a single point, not a bin)
binned axes should have a reference point (that is not necessarily the center)
need metadata that describes any value transforms/untransforms that are applied (e.g. energy → log10, zenith → cos)
each axis should have: name, unit, type (node or bin → use CREF# for this?), value_transform (log/lin/sqrt/cos), interpolation_scheme (linear, cubic, bspline...)
do we recommend transforming the values or the bins? (e.g. store E in log bins, or logE in linear bins?)
what to do about units of the axes if the values are transformed?
Either the axes are transformed and the axis column has the correct unit
or the values are transformed and then they have to be unitless, so the transform has to be something like lambda E: log10(E / (1 *u.TeV)) → a finite set of these transforms could be allowed.
Recommendation should be that the bins in the IRF are as "linear" as possible, which means usually transforming the values. Than ensures that when using linear or cubic interpolation, you don't introduce problems.
Currently gammapy mixes value transform (e.g. log, sqrt) and interpolation scheme (linear, cubic, etc): for each transform value, it hard-codes an interpolation scheme. It may be better to specify both in VODF, e.g. value_transform=sqrt and interp=linear between bins.
Using CREF to show if the columns are bins are nodes and how they map to the eventlist columns:, which comes from HEASARC CALDB spec Note there the interplation scheme is always assumed to be linear, so there is no keyword for that. We can invent one.
Note currently gammapy does not read the CREF column, and simp,y hard-codes the column-matrix mapping. That should be opened as an issue in gammapy
IRF cubes will be stored as BINTABLES following the Fermi Convention similar to how it was done in GADF.
Issues to solve
support both binned axes and nodes (nodes meaning a single point, not a bin)
binned axes should have a reference point (that is not necessarily the center)
need metadata that describes any value transforms/untransforms that are applied (e.g. energy → log10, zenith → cos)
CREF#
for this?), value_transform (log/lin/sqrt/cos), interpolation_scheme (linear, cubic, bspline...)lambda E: log10(E / (1 *u.TeV))
→ a finite set of these transforms could be allowed.value_transform=sqrt
andinterp=linear
between bins.Using CREF to show if the columns are bins are nodes and how they map to the eventlist columns:, which comes from HEASARC CALDB spec Note there the interplation scheme is always assumed to be linear, so there is no keyword for that. We can invent one.
Note currently gammapy does not read the CREF column, and simp,y hard-codes the column-matrix mapping. That should be opened as an issue in gammapy