FermipyDatasetsReader#

class gammapy.datasets.FermipyDatasetsReader(filename, edisp_bins=0)[source]#

Bases: DatasetReader

Create datasets from Fermi-LAT files.

Parameters:
filenamestr

Path to Fermipy configuration file (tested only for v1.3.1).

edisp_binsint

Number of margin bins to slice in energy. Default is 0. For now only maps created with edisp_bins=0 in fermipy configuration are supported, in that case the emin/emax in the fermipy configuration will correspond to the true energy range for gammapy, and a value edisp_bins>0 should be set here in order to apply the energy dispersion correctly. With a binning of 8 to 10 bins per decade, it is recommended to use edisp_bins ≥ 2 (See https://fermi.gsfc.nasa.gov/ssc/data/analysis/documentation/Pass8_edisp_usage.html)

Attributes Summary

tag

Methods Summary

create_dataset(counts_file, exposure_file, ...)

Create a map dataset from Fermi-LAT files.

read()

Create Fermi-LAT map datasets from Fermipy configuration file.

Attributes Documentation

tag = 'fermipy'#

Methods Documentation

static create_dataset(counts_file, exposure_file, psf_file, edisp_file, isotropic_file=None, edisp_bins=0, name=None)[source]#

Create a map dataset from Fermi-LAT files.

Parameters:
counts_filestr

Counts file path.

exposure_filestr

Exposure file path.

psf_filestr

Point spread function file path.

edisp_filestr

Energy dispersion file path.

isotropic_filestr, optional

Isotropic file path. Default is None

edisp_binsint

Number of margin bins to slice in energy. Default is 0. For now only maps created with edisp_bins=0 in fermipy configuration are supported, in that case the emin/emax in the fermipy configuration will correspond to the true energy range for gammapy, and a value edisp_bins>0 should be set here in order to apply the energy dispersion correctly. With a binning of 8 to 10 bins per decade, it is recommended to use edisp_bins ≥ 2 (See https://fermi.gsfc.nasa.gov/ssc/data/analysis/documentation/Pass8_edisp_usage.html)

namestr, optional

Dataset name. The default is None, and the name is randomly generated.

Returns:
datasetMapDataset

Map dataset.

read()[source]#

Create Fermi-LAT map datasets from Fermipy configuration file.

Returns:
datasetDatasets

Map datasets.