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:
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 |
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.
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. |
sed |
dict | Output of SED analysis. See SED Analysis for more information. |
ra |
float | Right ascension of the source in deg. |
dec |
float | Declination of the source in deg. |
glon |
float | Galactic Longitude of the source in deg. |
glat |
float | Galactic Latitude of the source in deg. |
offset_ra |
float | Angular offset from ROI center along RA. |
offset_dec |
float | Angular offset from ROI center along DEC |
offset_glon |
float | Angular offset from ROI center along GLON. |
offset_glat |
float | Angular offset from ROI center along GLAT. |
offset_roi_edge |
float | Distance from the edge of the ROI in deg. Negative (positive) values indicate locations inside (outside) the ROI. |
offset |
float | Angular offset from ROI center. |
pos_sigma |
float | 1-sigma uncertainty (deg) on the source position. |
pos_sigma_semimajor |
float | 1-sigma uncertainty (deg) on the source position along major axis. |
pos_sigma_semiminor |
float | 1-sigma uncertainty (deg) on the source position along minor axis. |
pos_angle |
float | Position angle (deg) of the positional uncertainty ellipse. |
pos_r68 |
float | 68% uncertainty (deg) on the source position. |
pos_r95 |
float | 95% uncertainty (deg) on the source position. |
pos_r99 |
float | 99% uncertainty (deg) on the source position. |
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. |
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. |