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

positions

Source positions (SkyCoord).

tag

Methods Summary

row_index(name)

Look up row index of source by name.

source_name(index)

Look up source name by row index.

Attributes Documentation

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

Source positions (SkyCoord).

tag = 'gamma-cat'

Methods Documentation

row_index(name)

Look up row index of source by name.

Parameters
namestr

Source name

Returns
indexint

Row index of source in table

source_name(index)

Look up source name by row index.

Parameters
indexint

Row index of source in table