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
Source catalog description (str).
Large scale component model (
SourceCatalogLargeScaleHGPS
).Source catalog name (str).
Source positions (
SkyCoord
).Source association table (
Table
)Gaussian component table (
Table
)Source identification table (
Table
)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).
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
-