CatalogAstroWithEnergySpecSampling

class CatalogAstroWithEnergySpecSampling(p_energy_sampling)[source]

Bases: common.sky.catalog.CatalogBase

Represent astro catalog source in equatorial coordinate with its energy spectrum sampling (ph/cm2/s)

Parameters:p_energy_sampling (numpy.array with dimension 1) – defined boundary of energy spectrum

Methods Summary

add_from_catalog(other_catalog) add to this catalog the sources from the other catalog
add_src(info_src) add a source to the catalog
get_catalog() return the table of the catalog
get_nb_element() return the number of sources in the catalog
get_row_with_name(name)
plot_first_fluxes(nb)
plot_flux(idx)
plot_flux_name(p_name)
plot_fluxes(l_idx)
plot_on_sphere([p_title, show, save]) plot the sources on a sphere
read_catalog(name_file) init the sources table from a fits file
remove_src(p_name) remove a source from the catalog
save_catalog(name_file) write the catalog table into a fits file
sort_by_flux() bof intensity est un tableau, critère de trie ? le premier élément ?

Methods Documentation

add_from_catalog(other_catalog)

add to this catalog the sources from the other catalog

if metadata from the catalogs do not match, an error is raised

Parameters:other_catalog (CatalogBase) – catalog from sources are added
add_src(info_src)

add a source to the catalog

‘elev’,’dir’,’intensity’,’name’

Parameters:info_src ([ float, float, float, string ]) – [‘elev’,’dir’,’intensity’,’name’]
get_catalog()

return the table of the catalog

Retunr:table of the catalog
Return type:astropy.table.Table
get_nb_element()

return the number of sources in the catalog

The number of sources is computed from the ‘name’ column

Returns:number of sources in the catalog
Return type:int
get_row_with_name(name)
plot_first_fluxes(nb)[source]
plot_flux(idx)[source]
plot_flux_name(p_name)[source]
plot_fluxes(l_idx)[source]
plot_on_sphere(p_title=None, show=True, save=None)

plot the sources on a sphere

Warning

self.name_file_cat must be manually set

Parameters:
  • p_title (string) – title of the plot. Default=None
  • show (bool) – show the plot. Default=True.
  • save (string) – PATH/name of the file to save in. If None, no saving. Default=None.
read_catalog(name_file)

init the sources table from a fits file

If there already are sources in the catalog, there are deleted.

The file must be a fits file with a table data

Parameters:name_file (string) – PATH/name of the file to read
remove_src(p_name)

remove a source from the catalog

Parameters:p_name (string) – name of source to remove
save_catalog(name_file)

write the catalog table into a fits file

If the file already exists, it is overwrite.

Parameters:name_file (string) – PATH/name of the file to save into
sort_by_flux()[source]

bof intensity est un tableau, critère de trie ? le premier élément ?