SourceCatalog

class gammapy.catalog.SourceCatalog(table, source_name_key='Source_Name', source_name_alias=())[source]

Bases: object

Generic source catalog.

This class can be used directly, but it’s mostly used as a base class for the other source catalog classes.

This is a thin wrapper around Table, which is stored in the catalog.table attribute.

Parameters:

table : Table

Table with catalog data.

source_name_key : str

Column with source name information

source_name_alias : tuple of str

Columns with source name aliases. This will allow accessing the source row by alias names as well.

Attributes Summary

positions SkyCoord

Methods Summary

copy() Copy catalog
info() Print info string.
row_index(name) Look up row index of source by name.
select_image_region(image) Select all source within an image
source_name(index) Look up source name by row index.

Attributes Documentation

positions

SkyCoord

Methods Documentation

copy()[source]

Copy catalog

info()[source]

Print info string.

row_index(name)[source]

Look up row index of source by name.

Parameters:

name : str

Source name

Returns:

index : int

Row index of source in table

select_image_region(image)[source]

Select all source within an image

Parameters:

image : SkyImage

Sky image

Returns:

catalog : SourceCatalog

Source catalog selection.

source_name(index)[source]

Look up source name by row index.

Parameters:

index : int

Row index of source in table