SourceCatalogGammaCat

class gammapy.catalog.SourceCatalogGammaCat(filename='$GAMMAPY_DATA/catalogs/gammacat/gammacat.fits.gz')[source]

Bases: gammapy.catalog.SourceCatalog

Gammacat open TeV source catalog.

See: https://github.com/gammapy/gamma-cat

One source is represented by SourceCatalogObjectGammaCat.

Parameters
filenamestr

Path to the gamma-cat fits file.

Examples

Load the catalog data:

>>> import astropy.units as u
>>> from gammapy.catalog import SourceCatalogGammaCat
>>> cat = SourceCatalogGammaCat()

Access a source by name:

>>> source = cat['Vela Junior']

Access source spectral data and plot it:

>>> energy_range = [1, 10] * u.TeV
>>> source.spectral_model().plot(energy_range)
>>> source.spectral_model().plot_error(energy_range)
>>> source.flux_points.plot()

Attributes Summary

description

name

positions

Source positions (SkyCoord).

Methods Summary

row_index(self, name)

Look up row index of source by name.

source_name(self, index)

Look up source name by row index.

Attributes Documentation

description = 'An open catalog of gamma-ray sources'
name = 'gamma-cat'
positions

Source positions (SkyCoord).

Methods Documentation

row_index(self, name)

Look up row index of source by name.

Parameters
namestr

Source name

Returns
indexint

Row index of source in table

source_name(self, index)

Look up source name by row index.

Parameters
indexint

Row index of source in table