SourceCatalogHGPS¶
-
class
gammapy.catalog.
SourceCatalogHGPS
(filename=None, 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
.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
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
copy
()Copy catalog gaussian_component
(row_idx)Gaussian component ( SourceCatalogObjectHGPSComponent
).row_index
(name)Look up row index of source by name. source_name
(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
()¶ Copy catalog
-
gaussian_component
(row_idx)[source]¶ Gaussian component (
SourceCatalogObjectHGPSComponent
).
-
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
-