Output File

The current state of the ROI can be written at any point by calling write_roi.

>>> gta.write_roi('output.npy')

The output file will contain all information about the state of the ROI as calculated up to that point in the analysis including model parameters and measured source characteristics (flux, TS, NPred). An XML model file will also be saved for each analysis component.

The output file can be read with load:

>>> o = np.load('output.npy').flat[0]
>>> print(o.keys())
['roi', 'config', 'sources','version']

The output file is organized in four top-level of dictionaries:

File Dictionary
Key Type Description
roi dict A dictionary containing information about the ROI as a whole.
sources dict A dictionary containing information for individual sources in the model (diffuse and point-like). Each element of this dictionary maps to a single source in the ROI model.
config dict The configuration dictionary of the GTAnalysis instance.
version dict The version of the fermiPy package that was used to run the analysis. This is automatically generated from the git release tag.

ROI Dictionary

Source Dictionary

The sources dictionary contains one element per source keyed to the source name. The following table lists the elements of the source dictionary and their descriptions.

Source Dictionary
Key Type Description
ra float Right ascension.
dec float Declination.
glon float Galactic Longitude.
glat float Galactic Latitude.
ts float Source test statistic.
params dict Dictionary of spectral parameters.
Npred float Number of predicted counts from this source integrated over the analysis energy range.
model_counts ndarray Vector of predicted counts for this source in each analysis energy bin.
sed dict Output of SED analysis. See SED Analysis for more information.
extension dict Output of extension analysis. See Extension Fitting for more information.
localize dict Output of localization analysis. See Source Localization for more information.
flux ndarray Photon flux and uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated over analysis energy range
flux100 ndarray Photon flux and uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 100 MeV to 316 GeV.
flux1000 ndarray Photon flux and uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 1 GeV to 316 GeV.
flux10000 ndarray Photon flux and uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 10 GeV to 316 GeV.
eflux ndarray Energy flux and uncertainty (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated over analysis energy range
eflux100 ndarray Energy flux and uncertainty (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 100 MeV to 316 GeV.
eflux1000 ndarray Energy flux and uncertainty (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 1 GeV to 316 GeV.
eflux10000 ndarray Energy flux and uncertainty (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 10 GeV to 316 GeV.
dfde ndarray Differential photon flux and uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}~\mathrm{MeV}^{-1}\)) evaluated at the pivot energy.
dfde100 ndarray Differential photon flux and uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}~\mathrm{MeV}^{-1}\)) evaluated at 100 MeV.
dfde1000 ndarray Differential photon flux and uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}~\mathrm{MeV}^{-1}\)) evaluated at 1 GeV.
dfde10000 ndarray Differential photon flux and uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}~\mathrm{MeV}^{-1}\)) evaluated at 10 GeV.
e2dfde ndarray E^2 times the differential photon flux and uncertainty (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) evaluated at the pivot energy.
e2dfde100 ndarray E^2 times the differential photon flux and uncertainty (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) evaluated at 100 MeV.
e2dfde1000 ndarray E^2 times the differential photon flux and uncertainty (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) evaluated at 1 GeV.
e2dfde10000 ndarray E^2 times the differential photon flux and uncertainty (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) evaluated at 10 GeV.