CatalogIdentifiedSources¶
-
class
CatalogIdentifiedSources[source]¶ Bases:
ecpi.common.sky.catalog.CatalogFovBasiccatalog of x-ray sources identified by IMAG format from General Program Software Description
constructor
Initialized without any source.
- meta_col = {‘sourceID’ : ‘Source ID’,
- ‘Y’ : “rounded sky pixel [-99:99]”, ‘Z’ : “rounded sky pixel [-99:99]”, ‘Y_fit’ : “sky pixel [-99:99]”, ‘error_Y’: ‘error in x at 90% c.l.’, ‘Z_fit’ : “sky pixel [-99:99]”, ‘error_Z’: ‘error in y at 90% c.l.’, ‘ra’: ‘Right Ascension (0.:360.)’, ‘dec’: ‘Declination (-90.:90.)’, ‘errorrad’: ‘error radius at 90% c.l.’, ‘flux’: ‘fit flux’, ‘pflux’: ‘pixel flux’, ‘errflux’: ‘error in fit flux’, ‘snr’: ‘snr at the source position’, ‘name’: ‘identified source name’, ‘dist_src’: ‘distance to identified, catalog source’, ‘class’: ‘identified source type code’ }
Methods Summary
add_from_catalog(other_catalog)add to this catalog the sources from the other catalog add_from_catalogFOVECLAIRs(eclairs_catal)add to the sources catalog a simple ECLAIRs catalog CatalogFovEclairs add_src(info_src)add a source to the catalog arf_correction(dpix, energy_range)apply the arf correction to the sources fluxes cos_theta_correction([instru_eclairs, verbose])apply off axis corrections on the flux of the sources from_astro_catalog(p_cat_radec[, …])add sources from an astro catalog and convert coordinate in elevation, direction from_astro_catalog_with_spectrum(p_cat_radec)get_catalog()return the table of the catalog 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 irf_correction(dpix[, verbose])Apply the irf correction matrix to the sources fluxes. 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(file_path[, attitude, tstart, …])write the catalog table into a fits file ECL-SOPcos_theta_correction-IMA set_ptg_instru(p_ptg_instru)set the pointing object associated to this catalog to_astro_catalog([verbose])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_from_catalogFOVECLAIRs(eclairs_catal)[source]¶ add to the sources catalog a simple ECLAIRs catalog CatalogFovEclairs
the unkown data are left blank
Note
metadata_confilts may cause warnings
Parameters: eclairs_catal (CatalogFovEclairs) – sources catalog the sources are added from (elev, dir, intensity, name)
-
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’]
-
arf_correction(dpix, energy_range)[source]¶ apply the arf correction to the sources fluxes
Parameters: - dpix (ECLAIRsDetectorEffectDefault) – instrument effects
- energy_range ([int, int]) – energy range (in PI) [low_energy, high_energy]
-
cos_theta_correction(instru_eclairs=<ecpi.common.instru.model_geom.InstruECLAIRs object>, verbose=None)[source]¶ apply off axis corrections on the flux of the sources
Parameters: - instru_eclairs (InstruECLAIRs) – ECLAIRs instrument
- verbose (bool (default False)) – activate print outputs
-
from_astro_catalog(p_cat_radec: ecpi.common.sky.catalog.CatalogAstroSourcesBasic, p_limit_elevation=0)¶ add sources from an astro catalog and convert coordinate in elevation, direction
- p_cat : catalaog in ra , dec coordinate
- p_limit_elevation deg
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_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
-
irf_correction(dpix, verbose=None)[source]¶ Apply the irf correction matrix to the sources fluxes.
XXX TODO: use et_irf_val_ecllos interface that will perform interpolation in the end.
Parameters: - dpix (ECLAIRsDetectorEffectDefault) – instrument effects
- verbose (bool (default False)) – activate print outputs
-
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(file_path, attitude=['', '', ''], tstart='0', tstop='1', creator='IMAG?', proc_id='01')[source]¶ write the catalog table into a fits file ECL-SOPcos_theta_correction-IMA
common keywords are included
filename is ‘ECL-SOP-IMA-‘ + proc_id + ‘.fits’
Parameters: - file_path (string) – PATH to the directory where to write the file
- attitude ([float, float, float]) – [ra, dec, ori] in degrees
- tstart (float) – start time of the observation in s from mjdref
- tstop (float) – end time of the observation in s from mjdref
- creator (string) – program that has generated the file. Default=’IMAG?’
- proc_id (string) – id of the process. Default=”01”.
-
set_ptg_instru(p_ptg_instru: ecpi.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(verbose=False)¶ return an astro catalog in ra, dec coordinates based on the source table
Note
need set_ptg_instru
Returns: astro catalog Return type: CatalogAstroSourcesBasic