SourceCatalogHGPS

class gammapy.catalog.SourceCatalogHGPS(filename='$GAMMAPY_DATA/catalogs/hgps_catalog_v1.fits.gz', hdu='HGPS_SOURCES')[source]

Bases: gammapy.catalog.SourceCatalog

HESS Galactic plane survey (HGPS) source catalog.

Reference: https://www.mpi-hd.mpg.de/hfm/HESS/hgps/

One source is represented by SourceCatalogObjectHGPS.

Examples

Let’s assume you have downloaded the HGPS catalog FITS file, e.g. via:

curl -O https://www.mpi-hd.mpg.de/hfm/HESS/hgps/data/hgps_catalog_v1.fits.gz

Then you can load it up like this:

>>> from gammapy.catalog import SourceCatalogHGPS
>>> filename = 'hgps_catalog_v1.fits.gz'
>>> cat = SourceCatalogHGPS(filename)

Access a source by name:

>>> source = cat['HESS J1843-033']
>>> print(source)

Access source spectral data and plot it:

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

Gaussian component information can be accessed as well, either via the source, or via the catalog:

>>> source.components
>>> cat.gaussian_component(83)

Attributes Summary

description

Source catalog description (str).

large_scale_component

Large scale component model (SourceCatalogLargeScaleHGPS).

name

Source catalog name (str).

positions

Source positions (SkyCoord).

table_associations

Source association table (Table)

table_components

Gaussian component table (Table)

table_identifications

Source identification table (Table)

table_large_scale_component

Large scale component table (Table)

Methods Summary

gaussian_component(self, row_idx)

Gaussian component (SourceCatalogObjectHGPSComponent).

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 = 'H.E.S.S. Galactic plane survey (HGPS) source catalog'

Source catalog description (str).

large_scale_component

Large scale component model (SourceCatalogLargeScaleHGPS).

name = 'hgps'

Source catalog name (str).

positions

Source positions (SkyCoord).

table_associations

Source association table (Table)

table_components

Gaussian component table (Table)

table_identifications

Source identification table (Table)

table_large_scale_component

Large scale component table (Table)

Methods Documentation

gaussian_component(self, row_idx)[source]

Gaussian component (SourceCatalogObjectHGPSComponent).

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