SimuEclairsEnergyChannel

class SimuEclairsEnergyChannel(sim_effect=None)[source]

Bases: object

Main class to simalute ECLAIRs instrument with energy chanel

Constructor

Parameters:sim_effect (ECLAIRsDetectorEffect) – ECLAIRs detector default.

Methods Summary

add_nonuniformity([factor]) Add non uniformity on the pixels of the detector.
add_src(model_src_obj) add a source to the list
add_src_astroparticule() Add flat internal noise from particles on the detector.
add_src_cxb() Add energy dependent CXB source based on the pixel solid angle shape.
add_src_cxb_flat([level]) Add flat CXB source.
add_src_cxb_flat_moretti_spectrum() Add flat CXB source with Moretti Spectrum
add_src_cxb_lvl([level]) Add CXB source based on the pixel solid angle shape.
create_evts() Create events for every energy channel.
get_list_src()
get_shadow_channel(idx)
plot_channel(idx[, p_mes])
print_nb_photon()
raz_chan_shadows() raz all channel with float64 type
set_chan_shadows(chan_shadows_) Setter for chan_shadows class attribute.
set_context_simu(duration[, t_start]) set the context parameters for the simulation
set_range_channel(start_chan, end_chan) Set energy range [start_chan, end_chan] of simulation
set_src_point_with_catalog_fov(cat_fov[, …]) reset all source l_ponc_src and init with cat fov
set_src_point_with_catalog_swift(…) reset all source l_ponc_src and init with swift catalog
simu_arf_binomial() apply arf with binomial process to conserve integer value
simu_arf_mean() This method introduces real (ie not integer) number of photon can be replaced by binomial random processing.
simu_global_noise_poisson() Simulation of random Poisson noise for each shadowgram (ie.
simu_rmf() RMF random simulation
simu_src([idx_chan, l_src]) simulation of sources
write_events(working_directory, observation) Write ECL-EVT-SEC .fits files.
write_shadowgrams(working_directory, …[, …]) Write shadowgrams in .fits files.

Methods Documentation

add_nonuniformity(factor=0.8)[source]

Add non uniformity on the pixels of the detector.

Parameters:factor

???

add_src(model_src_obj)[source]

add a source to the list

Parameters:model_src_obj (mdl_src.ModelSrcInterface) – initialized source object
Returns:status of add
Return type:boolean
add_src_astroparticule()[source]

Add flat internal noise from particles on the detector.

Returns:status of add
Return type:boolean
add_src_cxb()[source]

Add energy dependent CXB source based on the pixel solid angle shape.

Returns:status of add
Return type:boolean
add_src_cxb_flat(level=1)[source]

Add flat CXB source.

Parameters:level (float [ph/cm2/s]) – offset level for the CXB.
Returns:status of add
Return type:boolean
add_src_cxb_flat_moretti_spectrum()[source]

Add flat CXB source with Moretti Spectrum

Parameters:level (float [ph/cm2/s]) – offset level for the CXB.
Returns:status of add
Return type:boolean
add_src_cxb_lvl(level=1)[source]

Add CXB source based on the pixel solid angle shape.

Parameters:level (float [ph/cm2/s]) – offset level for the CXB.
Returns:status of add
Return type:boolean
create_evts()[source]

Create events for every energy channel.

get_list_src()[source]
get_shadow_channel(idx)[source]
plot_channel(idx, p_mes='')[source]
print_nb_photon()[source]
raz_chan_shadows()[source]

raz all channel with float64 type

set_chan_shadows(chan_shadows_)[source]

Setter for chan_shadows class attribute.

Parameters:chan_shadows (3D array (channel, shadowgram)) – shadowgrams per energy channel
set_context_simu(duration, t_start=0)[source]

set the context parameters for the simulation

Parameters:
  • duration (float) – simulation time in s
  • t_start (float) – start time of the simulated observation in s from mjdref
set_range_channel(start_chan, end_chan)[source]

Set energy range [start_chan, end_chan] of simulation

Parameters:
  • start_chan (integer) –
  • end_chan (integer) –
Returns:

True if check start_chan, end_chan are ok

Return type:

Boolean

set_src_point_with_catalog_fov(cat_fov, use_irf=False)[source]

reset all source l_ponc_src and init with cat fov cat_fov is an user catalog can by used for debug, analysis and test .. cat_fov must have intensity array shape

Parameters:
  • cat_fov (CatalogFovBasic) – sidx_chanources catalog with energy
  • use_irf (bool) – whether or not to use IRF.
set_src_point_with_catalog_swift(att_eclairs, use_irf)[source]

reset all source l_ponc_src and init with swift catalog

Parameters:
simu_arf_binomial()[source]

apply arf with binomial process to conserve integer value

simu_arf_mean()[source]

This method introduces real (ie not integer) number of photon can be replaced by binomial random processing. Add poisson noise at end

simu_global_noise_poisson()[source]

Simulation of random Poisson noise for each shadowgram (ie. each energy channel)

simu_rmf()[source]

RMF random simulation

input: attribut array shadowgram is incident photon by channel ouput: attribut array shadowgram becomes detected photon by channel

simu_src(idx_chan=None, l_src=None)[source]

simulation of sources

Parameters:
  • idx_chan (int >0) – channel index to be simulated. Default=None for all channel
  • l_src (list(string)) – list of sources to be simulated. Default=None for all initiated sources
write_events(working_directory, observation)[source]

Write ECL-EVT-SEC .fits files.

Parameters:
  • working_dir (str) – PATH/directory where to save files
  • observation (EclairsObservation) – observation parameters
write_shadowgrams(working_directory, simulation_id, limit_shadowgrams=50)[source]

Write shadowgrams in .fits files.

Parameters:
  • working_dir (str) – PATH/directory where to save files
  • simulation_id (int) – source ID