ecpi.simu.lib.sources module

Section author: ECLAIRs GP team

Sources simulation module

Summary

Classes:

AbstractModelSrc

Base object for the creation of the shadowgram model of different sources

ListModelPointSrcFromCatalog

Manage list of point source

ModelCxbFlat

model for a flat CXB without spectrum

ModelCxbFlatBasedEnergy

Model for a geometrically flat CXB with energy dependence as specified with the Moretti spectrum.

ModelCxbShapeBased

Model for a CXB without spectrum based on the pixel solid angle shape

ModelCxbShapeBasedEnergy

Model for an energy dependent CXB based on the pixel solid angle shape

ModelEarthMoretti

Model for an energy dependent CXB in the presence of Earth in FOV.

ModelFlat

Generic class for flat model

ModelInternalNoise

Model for a flat internal noise, impact on detector of particles in the terrestrial environment The internal noise is independent from wavelength

ModelMeanCXBShapeBasedEnergyWithEarthCalculator

Model for an energy dependent CXB in the presence of Earth in FOV.

ModelMeanCXBShapeBasedEnergyWithEarthSimulator

Model for an energy dependent CXB in the presence of Earth in FOV.

ModelPointSrcIRF

model for point source

ModelPointSrcSinElev

Model for point source.

Class diagram:

Reference

class AbstractModelSrc[source]

Bases: abc.ABC

Base object for the creation of the shadowgram model of different sources

abstract get_model(obs_time=None)[source]

return detector image of model of the source

Parameters

obs_time (float) – observation time in s

Returns

detector image of model of the source

Return type

array(80x80) of float

get_noisy_model(obs_time=None)[source]

Return the shadowgram model with poisson noise.

Parameters

obs_time (float) – observation time in seconds

property name

Get name.

update()[source]

return True if the model is already update with position or not yet defined

class ListModelPointSrcFromCatalog(use_irf=True)[source]

Bases: object

Manage list of point source

init_with_cat_astro(astro_cat)[source]

return a list of ShadowModelPointSrcSinElev from a catalog

attitude used to define fov

Parameters

astro_cat – table with intensoty column

init_with_cat_fov(cat_fov)[source]

Initialize catalog with sources in FOV.

Parameters

cat_fov (CatalogFovEclairs object) – source catalog.

Returns

sources infos

Return type

dict

init_with_cat_swift_2012()[source]

return a list of ShadowModelPointSrcSinElev from the SWIFT/BAT catalog attitude used to define fov

init_with_custom_cat(path_cat)[source]

return a list of ShadowModelPointSrcSinElev from a custom catalog.

Parameters

path_cat (str) – path to custom source catalog.

Returns

sources infos

Return type

dict

set_use_irf(use_irf)[source]
class ModelCxbFlat(cxb_level=1)[source]

Bases: ecpi.simu.lib.sources.ModelFlat

model for a flat CXB without spectrum

class ModelCxbFlatBasedEnergy(solidangle_filename='__to_remove__')[source]

Bases: ecpi.simu.lib.sources.AbstractModelSrc

Model for a geometrically flat CXB with energy dependence as specified with the Moretti spectrum.

get_model(obs_time=None)[source]

return the shadowgram model

Parameters

obs_time (float) – observation time in s

Returns

cxb detector image in ph/pix

Return type

array(float)

Warning

a factor 0.8 is added to this model to

make the count rate equal to the CXB shape case. TBI.

class ModelCxbShapeBased(cxb_level=3035, solidangle_filename='__to_remove__')[source]

Bases: ecpi.simu.lib.sources.AbstractModelSrc

Model for a CXB without spectrum based on the pixel solid angle shape

..warning :: dead code ?

get_model(obs_time=None)[source]

return the shadowgram model

Parameters

obs_time (float) – observation time in s

Returns

cxb detector image in ph/pix

Return type

array(float)

class ModelCxbShapeBasedEnergy(solidangle_filename='__to_remove__')[source]

Bases: ecpi.simu.lib.sources.AbstractModelSrc

Model for an energy dependent CXB based on the pixel solid angle shape

get_model(obs_time=None)[source]

return the shadowgram model

..note: RMF must be handled here at some point ! ..note: doc to Moretti’s model: flux = integral between e_min and e_max of eq. 4 of https://arxiv.org/pdf/0811.1444.pdf

Parameters

obs_time (float) – observation time in s

Returns

cxb detector image in ph/pix

Return type

array(float)

class ModelEarthMoretti(limb=None, vec_earth=None)[source]

Bases: ecpi.simu.lib.sources.AbstractModelSrc

Model for an energy dependent CXB in the presence of Earth in FOV. CXB model is computed with mean shape.

get_model(obs_time=None)[source]

Return the shadowgram model.

Parameters

obs_time (float) – observation time in s

Returns

shadowgram

Return type

2D array(float) with shape 80x80

update()[source]

constructor

Parameters
  • limb (float) – limb angle in degree

  • vec_earth (list/array of size 3) – earth direction unit vector

  • use_numba – whether or not to use pre-compiled function

when computing solid angle. Default is True. :type use_numba: bool

..note: sum of solid angle with real mask accounts for cos theta

class ModelFlat(level)[source]

Bases: ecpi.simu.lib.sources.AbstractModelSrc

Generic class for flat model

get_model(obs_time=None)[source]

return the shadowgram model

Parameters

obs_time (float) – observation time in s

Returns

noise detector image in ph/pix

Return type

array(float)

class ModelInternalNoise(noise_level=0.003)[source]

Bases: ecpi.simu.lib.sources.ModelFlat

Model for a flat internal noise, impact on detector of particles in the terrestrial environment The internal noise is independent from wavelength

get_model(obs_time=None)[source]

return the shadowgram model

Parameters

obs_time (float) – observation time in s

Returns

noise detector image in ph/pix

Return type

array(float)

class ModelMeanCXBShapeBasedEnergyWithEarthCalculator(limb=None, vec_earth=None, use_numba=True)[source]

Bases: ecpi.simu.lib.sources._ModelMeanCXBShapeBasedEnergyWithEarth

Model for an energy dependent CXB in the presence of Earth in FOV. CXB model is computed with mean shape.

class ModelMeanCXBShapeBasedEnergyWithEarthSimulator[source]

Bases: ecpi.simu.lib.sources._ModelMeanCXBShapeBasedEnergyWithEarth

Model for an energy dependent CXB in the presence of Earth in FOV. CXB model is computed with a ray-tracing method.

class ModelPointSrcIRF(info_src)[source]

Bases: ecpi.simu.lib.sources.AbstractModelSrc

model for point source

S_cpt = 0
get_model(obs_time=None)[source]

return the shadowgram model

intensity given in ph/cm2/s in the current channel.

Parameters

obs_time (float) – observation time in s

Returns

cxb detector image in ph/pix

Return type

array(float)

set_coef_hors_axis()[source]

Return coefficient associated to cos theta or sin elev off axis effect.

Returns

coefficient (units ?)

Return type

array(float)

class ModelPointSrcSinElev(info_src)[source]

Bases: ecpi.simu.lib.sources.ModelPointSrcIRF

Model for point source. Elevation angle is in degree.

set_coef_hors_axis()[source]

This function must be renamed as ‘get_coef_hors_axis’. Verbose argument is unused.