SourceCatalogGammaCat

class gammapy.catalog.SourceCatalogGammaCat(filename='$GAMMA_CAT/output/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:

filename : str

Path to the gamma-cat fits file.

Examples

Load the catalog data:

>>> from gammapy.catalog import SourceCatalogGammaCat
>>> cat = SourceCatalogGammaCat()

Access a source by name:

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

Access source spectral data and plot it:

>>> source.spectral_model.plot()
>>> source.spectral_model.plot_error()
>>> source.flux_points.plot()

Attributes Summary

description
name
positions Source positions (SkyCoord).

Methods Summary

copy() Copy catalog
row_index(name) Look up row index of source by name.
source_name(index) Look up source name by row index.
to_sky_models() Convert to a SkyModels.

Attributes Documentation

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

Source positions (SkyCoord).

Methods Documentation

copy()

Copy catalog

row_index(name)

Look up row index of source by name.

Parameters:

name : str

Source name

Returns:

index : int

Row index of source in table

source_name(index)

Look up source name by row index.

Parameters:

index : int

Row index of source in table

to_sky_models()[source]

Convert to a SkyModels.

TODO: add an option whether to skip or raise on missing models or data.