ecpi.common.instru.model_effect module

Section author: ECLAIRs GP team

Treatment of detector effects

Summary

Classes:

ECLAIRsDetectorEffect

Implementation of detector effects (ARF, IRF, RMF)

ECLAIRsDetectorEffectDefault

Default class of ECLAIRsDetectorEffect

Class diagram:

Functions:

get_idx_first_zero

return idx of the first zero

Reference

class ECLAIRsDetectorEffect[source]

Bases: object

Implementation of detector effects (ARF, IRF, RMF)

arf_percent()[source]
property chan_boundary
property chan_center
chan_nb()[source]
property chan_step
compute_globalefficiency()[source]

Compute global efficiency defined as the elementwise product between efficiency and non uniformity matrices.

get_efficiency()[source]
get_energymax_val(chan)[source]

Return energy value in a given channel index.

Parameters

chan (int) – upper channel index

Returns

energy value

Return type

float

get_energymin_val(chan)[source]

Return energy value in a given channel index.

Parameters

chan (int) – lower channel index

Returns

energy value

Return type

float

get_globalefficiency()[source]
get_irf_array_ijecpi()[source]

Return raw IRF array from EIC

Returns

raw IRF array, ie IRF value for pixel center in array 199x199

Return type

2D numpy array 199x199

get_irf_val_ecllos(y_pix, z_pix, channel=None, ngp=False)[source]

Return IRF value at position with ECLLos referential in pixel unit

Warning

problem with border with array 199x199 ? Need to extrapolate ?

Parameters

y_pix (float) – y position in ECLLos referential in pixel unit

:param z_pix:z position in ECLLos referential in pixel unit :type z_pix: float :param channel: Energy channel index in EIC convention. Default is None. :type channel: int :param ngp: flag to opt for the Nearest Grid Position algorithm. Default is False. :type ngp: bool :param verbose: flag to enable/disable printing of the IRF coeff value. Default is False. :type verbose: bool :return: value of IRF at (y_pix, z_pix) :rtype: float

get_list_rv_rmf()[source]

return a list of generator object for each channel

Returns

list of generator object for each channel

Return type

generator object is an instance of scipy.stats.rv_discrete

get_nonuniformity()[source]
get_rmf_max_channel_def(channel)[source]

return channel where rmf becomes and stay to zero :return: index of first zero on distribution :rtype: int

get_rmf_norm(idx_chan)[source]

Normalize rmf distribution :return: rmf normalize :rtype: numpy array

get_rmf_raw(idx_chan)[source]
Returns

rmf of channel as readed in EIC file

Return type

numpy array

plot_irf(p_mes='')[source]
reduce_channel(nb_chan)[source]
set_arf(path_arf)[source]

Set ARF related attributes from file path

Parameters

path_arf (str) – path to ARF file

set_efficiency(path_efficiency)[source]

Set detector efficiency from file path.

Parameters

path_efficiency (str) – path to detector efficiency file

set_irf(path_irf)[source]

Set IRF related attributes from file path

Parameters

path_irf (str) – path to IRF file

set_nonuniformity(path_nonuniformity)[source]

Set detector non uniformity from file path.

Parameters

path_nonuniformity (str) – path to detector efficiency file

set_rmf(path_rmf)[source]

Set RMF related attributes from file path

Parameters

path_rmf (str) – path to RMF file

simu_rmf_channel(channel, nb_photon)[source]

Compute RMF for only one channel

Parameters
  • channel (int) – [0..nb channel[

  • nb_photon (int) – number of incident photon in channel

Returns

channel number where incident photon was detected

Return type

numpy array with size nb_photon

class ECLAIRsDetectorEffectDefault[source]

Bases: ecpi.common.instru.model_effect.ECLAIRsDetectorEffect

Default class of ECLAIRsDetectorEffect

get_idx_first_zero(p_array)[source]

return idx of the first zero