TH2_to_FITS_header¶
-
gammapy.utils.root.
TH2_to_FITS_header
(hist, flipx=True)[source]¶ Create FITS header for a given ROOT histogram.
Assuming TH2 or SkyHist that represents an image in Galactic CAR projection with reference point at GLAT = 0, as is the case for HESS SkyHists.
Formulae and variable names taken from
Plotters::SkyHistToFITS()
in$HESSROOT/plotters/src/FITSUtils.C
Parameters: hist : ROOT.TH2
ROOT histogram
flipx : bool
Flip x-axis?
Returns: header :
Header
FITS header