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 about 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 str 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
name str Name of the source.
Source_Name str Name of the source.
SpatialModel str Spatial model.
SpatialWidth float Spatial size parameter.
SpatialType str Spatial type string. This corresponds to the type attribute of the spatialModel component in the XML model.
SourceType str Source type string (PointSource or DiffuseSource).
SpectrumType str Spectrum type string. This corresponds to the type attribute of the spectrum component in the XML model (e.g. PowerLaw, LogParabola, etc.).
Spatial_Filename str Path to spatial template associated to this source.
Spectrum_Filename str Path to file associated to the spectral model of this source.
correlation dict Dictionary of correlation coefficients.
model_counts ndarray Vector of predicted counts for this source in each analysis energy bin.
model_counts_wt 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.
ra float Right ascension of the source (deg).
dec float Declination of the source (deg).
glon float Galactic longitude of the source (deg).
glat float Galactic latitude of the source (deg).
ra_err float Std. deviation of positional uncertainty in right ascension (deg).
dec_err float Std. deviation of positional uncertainty in declination (deg).
glon_err float Std. deviation of positional uncertainty in galactic longitude (deg).
glat_err float Std. deviation of positional uncertainty in galactic latitude (deg).
pos_err float 1-sigma positional uncertainty (deg).
pos_r68 float 68% positional uncertainty (deg).
pos_r95 float 95% positional uncertainty (deg).
pos_r99 float 99% positional uncertainty (deg).
pos_err_semimajor float 1-sigma uncertainty (deg) along major axis of uncertainty ellipse.
pos_err_semiminor float 1-sigma uncertainty (deg) along minor axis of uncertainty ellipse.
pos_angle float Position angle of uncertainty ellipse with respect to major axis.
pos_gal_cov ndarray Covariance matrix of positional uncertainties in local projection in galactic coordinates.
pos_gal_corr ndarray Correlation matrix of positional uncertainties in local projection in galactic coordinates.
pos_cel_cov ndarray Covariance matrix of positional uncertainties in local projection in celestial coordinates.
pos_cel_corr ndarray Correlation matrix of positional uncertainties in local projection in celestial coordinates.
offset_ra float Right ascension offset from ROI center in local celestial projection (deg).
offset_dec float Declination offset from ROI center in local celestial projection (deg).
offset_glon float Galactic longitude offset from ROI center in local galactic projection (deg).
offset_glat float Galactic latitude offset from ROI center in local galactic projection (deg).
offset_roi_edge float Distance from the edge of the ROI (deg). Negative (positive) values indicate locations inside (outside) the ROI.
offset float Angular offset from ROI center (deg).
param_names ndarray Names of spectral parameters.
param_values ndarray Spectral parameter values.
param_errors ndarray Spectral parameters errors.
ts float Source test statistic.
loglike float Log-likelihood of the model evaluated at the best-fit normalization of the source.
loglike_scan ndarray Log-likelihood values for scan of source normalization.
dloglike_scan ndarray Delta Log-likelihood values for scan of source normalization.
eflux_scan ndarray Energy flux values for scan of source normalization.
flux_scan ndarray Flux values for scan of source normalization.
norm_scan ndarray Normalization parameters values for scan of source normalization.
npred float Number of predicted counts from this source integrated over the analysis energy range.
npred_wt float Number of predicted counts from this source integrated over the analysis energy range.
pivot_energy float Decorrelation energy in MeV.
flux float Photon flux (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated over analysis energy range
flux100 float Photon flux (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 100 MeV to 316 GeV.
flux1000 float Photon flux (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 1 GeV to 316 GeV.
flux10000 float Photon flux (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 10 GeV to 316 GeV.
flux_err float Photon flux uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated over analysis energy range
flux100_err float Photon flux uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 100 MeV to 316 GeV.
flux1000_err float Photon flux uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 1 GeV to 316 GeV.
flux10000_err float Photon flux uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 10 GeV to 316 GeV.
flux_ul95 float 95% CL upper limit on the photon flux (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated over analysis energy range
flux100_ul95 float 95% CL upper limit on the photon flux (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 100 MeV to 316 GeV.
flux1000_ul95 float 95% CL upper limit on the photon flux (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 1 GeV to 316 GeV.
flux10000_ul95 float 95% CL upper limit on the photon flux (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 10 GeV to 316 GeV.
eflux float Energy flux (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated over analysis energy range
eflux100 float Energy flux (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 100 MeV to 316 GeV.
eflux1000 float Energy flux (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 1 GeV to 316 GeV.
eflux10000 float Energy flux (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 10 GeV to 316 GeV.
eflux_err float Energy flux uncertainty (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated over analysis energy range
eflux100_err float Energy flux uncertainty (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 100 MeV to 316 GeV.
eflux1000_err float Energy flux uncertainty (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 1 GeV to 316 GeV.
eflux10000_err float Energy flux uncertainty (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 10 GeV to 316 GeV.
eflux_ul95 float 95% CL upper limit on the energy flux (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated over analysis energy range
eflux100_ul95 float 95% CL upper limit on the energy flux (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 100 MeV to 316 GeV.
eflux1000_ul95 float 95% CL upper limit on the energy flux (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 1 GeV to 316 GeV.
eflux10000_ul95 float 95% CL upper limit on the energy flux (\(\mathrm{MeV}~\mathrm{cm}^{-2}~\mathrm{s}^{-1}\)) integrated from 10 GeV to 316 GeV.
dnde float Differential photon flux (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}~\mathrm{MeV}^{-1}\)) evaluated at the pivot energy.
dnde100 float Differential photon flux (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}~\mathrm{MeV}^{-1}\)) evaluated at 100 MeV.
dnde1000 float Differential photon flux (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}~\mathrm{MeV}^{-1}\)) evaluated at 1 GeV.
dnde10000 float Differential photon flux (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}~\mathrm{MeV}^{-1}\)) evaluated at 10 GeV.
dnde_err float Differential photon flux uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}~\mathrm{MeV}^{-1}\)) evaluated at the pivot energy.
dnde100_err float Differential photon flux uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}~\mathrm{MeV}^{-1}\)) evaluated at 100 MeV.
dnde1000_err float Differential photon flux uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}~\mathrm{MeV}^{-1}\)) evaluated at 1 GeV.
dnde10000_err float Differential photon flux uncertainty (\(\mathrm{cm}^{-2}~\mathrm{s}^{-1}~\mathrm{MeV}^{-1}\)) evaluated at 10 GeV.
dnde_index float Logarithmic slope of the differential photon spectrum evaluated at the pivot energy.
dnde100_index float Logarithmic slope of the differential photon spectrum evaluated at 100 MeV.
dnde1000_index float Logarithmic slope of the differential photon spectrum evaluated evaluated at 1 GeV.
dnde10000_index float Logarithmic slope of the differential photon spectrum evaluated at 10 GeV.