CatalogFovEclairs

class CatalogFovEclairs(instru_eclairs=None)[source]

Bases: common.sky.catalog.CatalogFovBasic

catalog of x-ray sources for the ECLAIRs instrument

constructor ECLAIRs geometry initialization (in cm)

size of the sky array = 200

init with no source

Parameters:instru_eclairs (InstruECLAIRs) – ECLAIRs instrument

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
add_src_pix(info_src_pix) add a source in sky pixel coordinates to the catalog
from_astro_catalog(p_cat_radec[, …]) add sources from an astro catalog
from_astro_catalog_with_spectrum(p_cat_radec)
get_catalog() return the table of the catalog
get_catalog_sky_pix() return the catalog with the position of the sources in pixel of the sky array
get_nb_element() return the number of sources in the catalog
get_row_with_name(name)
intensity_with_channel(nb_chan) raz all catalog and change format
plot_on_astro_sphere([p_title, show, save]) plot the sources on the sky, with RA and DEC
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
save_catalog_pix(name_file) save the catalog in pix format to a fits file
set_ptg_instru(p_ptg_instru) set the pointing object associated to this catalog
to_astro_catalog() return an astro catalog in ra, dec coordinates based on the source table

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’]
add_src_pix(info_src_pix)[source]

add a source in sky pixel coordinates to the catalog

‘pix_y’,’pix_z’,’intensity’,’name’

(0,0) is at the center of the sky array

Parameters:info_src_pix ([ float, float, float, string]) – sky pixel info of the source [‘pix_y’,’pix_z’,’intensity’,’name’]
from_astro_catalog(p_cat_radec: common.sky.catalog.CatalogAstroSourcesBasic, p_limit_elevation=0)[source]

add sources from an astro catalog

Only sources in the FOV will be added

Note

need set_ptg_instru

Parameters:
  • p_cat_radec (CatalogAstroSourcesBasic) – catalog in ra, dec coordinates
  • p_limit_elevation (float) – limit in elevation in deg. Default is 0.
from_astro_catalog_with_spectrum(p_cat_radec)
get_catalog()

return the table of the catalog

Retunr:table of the catalog
Return type:astropy.table.Table
get_catalog_sky_pix()[source]

return the catalog with the position of the sources in pixel of the sky array

(0,0) is at the center of the sky array

Returns:catalog table with sources positions in sky_pix format
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)
intensity_with_channel(nb_chan)

raz all catalog and change format

plot_on_astro_sphere(p_title=None, show=True, save=None)

plot the sources on the sky, with RA and DEC

Note

different to plot_on_sphere that plot with elev and dir

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.
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
save_catalog_pix(name_file)[source]

save the catalog in pix format to a fits file

Parameters:name_file (string) – PATH/name of the fits file
set_ptg_instru(p_ptg_instru: common.mission.attitude.AttitudeVT)

set the pointing object associated to this catalog

Parameters:p_ptg_instru (pointing_instrument.AttitudeVT) – pointing of the instrument for this catalog
to_astro_catalog()

return an astro catalog in ra, dec coordinates based on the source table

Note

need set_ptg_instru

Returns:astro catalog
Return type:CatalogAstroSourcesBasic