SourceCatalog#

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

Bases: abc.ABC

Generic source catalog.

This class can be used directly, but it is 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
tableTable

Table with catalog data.

source_name_keystr

Column with source name information

source_name_aliastuple of str

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

Attributes Summary

positions

Source positions (SkyCoord).

tag

Methods Summary

description()

Catalog description (str).

row_index(name)

Look up row index of source by name.

source_name(index)

Look up source name by row index.

to_models(**kwargs)

Create Models object from catalogue

Attributes Documentation

positions#

Source positions (SkyCoord).

tag#

Methods Documentation

abstract classmethod description()[source]#

Catalog description (str).

row_index(name)[source]#

Look up row index of source by name.

Parameters
namestr

Source name

Returns
indexint

Row index of source in table

source_name(index)[source]#

Look up source name by row index.

Parameters
indexint

Row index of source in table

to_models(**kwargs)[source]#

Create Models object from catalogue