SimuEclairsEnergyChannel¶
-
class
SimuEclairsEnergyChannel(mdl_effect=None)[source]¶ Bases:
objectECLAIRs simulation with energy chanel during stable pointing
User Guide: * defined first the context of simulation with context attribut : ** t_start, duration ** if necessary attitude for catalog swift and earth ** if necessary sat pos for earth * add some sky sources ** with methods like add_srcxxxx() ** from catalog with method set_src_point_with_catalog_xxx() * set energy band of simulation with * simulate sky source in photon with simu_src() * add some detector effect ** simu_arf_xxx ** simu_rmf (to check !!) * add poisson noise * result : image detector by channel in count
Constructor
Parameters: mdl_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([cxb_mode])Add CXB source depending on model name cxb_mode. add_src_point_with_catalog_astro(cat_astro)add all sources in cat_astro that are in FOV add_src_point_with_catalog_fov(cat_fov[, …])add all sources from cat_fov add_src_point_with_catalog_swift(use_irf)reset all source l_ponc_src and init with swift catalog create_evts()Create events for every energy channel. del_src(name_src)del_src_all()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_range_channel(start_chan, end_chan)Set energy range [start_chan, end_chan] of simulation set_src_point_with_custom_catalog(path_cat, …)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(cxb_mode='shape_moretti')[source]¶ Add CXB source depending on model name cxb_mode.
Note
to set properly the levels in ‘flat’ and ‘shape’ modes
- with specific level, do
- flat = ModelFlat(my_level) add_src(flat)
Parameters: cxb_mode – CXB model to be added. Default is “no_cxb”. Possible choices are: flat”, “flat_moretti”, “shape”, “shape_moretti”, “shape_moretti_earth”. :type cxb_mode: str :return: status of add :rtype: boolean
-
add_src_point_with_catalog_astro(cat_astro, use_irf=False)[source]¶ add all sources in cat_astro that are in FOV cat_astro is an user catalog can by used for debug, analysis and test .. cat_fov must have intensity array shape
Parameters: - cat_astro (CatalogAstroXXXX) – sidx_chanources catalog with energy
- use_irf (bool) – whether or not to use IRF.
-
add_src_point_with_catalog_fov(cat_fov, use_irf=False)[source]¶ add all sources from 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) – sources catalog with energy
- use_irf (bool) – whether or not to use IRF.
-
add_src_point_with_catalog_swift(use_irf)[source]¶ reset all source l_ponc_src and init with swift catalog
Parameters: use_irf (bool) – whether or not to use IRF.
-
set_chan_shadows(chan_shadows_)[source]¶ Setter for chan_shadows class attribute.
Parameters: chan_shadows (3D array (channel, shadowgram)) – shadowgrams per energy channel
-
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_custom_catalog(path_cat, use_irf)[source]¶ reset all source l_ponc_src and init with swift catalog
Parameters: - path_cat (str) – path to custom source catalog.
- use_irf (bool) – whether or not to use IRF.
-
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
-