SourceCatalogHGPS¶
-
class
gammapy.catalog.SourceCatalogHGPS(filename=None, hdu='HGPS_SOURCES')[source]¶ Bases:
gammapy.catalog.SourceCatalogHESS Galactic plane survey (HGPS) source catalog.
Reference: https://www.mpi-hd.mpg.de/hfm/HESS/hgps/
One source is represented by
SourceCatalogObjectHGPS.An extensive tutorial is available here: hgps.html
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)
More examples here: hgps.html
Attributes Summary
descriptionSource catalog description (str). large_scale_componentLarge scale component model ( SourceCatalogLargeScaleHGPS).nameSource catalog name (str). positionsSource positions ( SkyCoord).table_associationsSource association table ( Table)table_componentsGaussian component table ( Table)table_identificationsSource identification table ( Table)table_large_scale_componentLarge scale component table ( Table)Methods Summary
copy(self)Copy catalog 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
-
copy(self)¶ Copy catalog
-
gaussian_component(self, row_idx)[source]¶ Gaussian component (
SourceCatalogObjectHGPSComponent).
-
row_index(self, 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(self, index)¶ Look up source name by row index.
Parameters: - index : int
Row index of source in table
-